musrfit  1.9.2
PMusrRoot2Xml Class Reference

Public Member Functions

 PMusrRoot2Xml (const char *fileName, bool quiet, bool keep)
 
virtual ~PMusrRoot2Xml ()
 
virtual Bool_t IsValid ()
 
virtual TString GetXmlDumpFileName ()
 
virtual UInt_t GetNoOfDecayHistos ()
 
virtual UInt_t GetNoOfExpectedHistos ()
 
virtual UInt_t GetNoOfHistos ()
 
virtual UInt_t GetNoOfRedGreenOffsets ()
 
virtual UInt_t GetNoOfDetectors ()
 

Private Types

enum  EFolderTag { eUnkown, eDecayAnaModule, eSlowControlAnaModule }
 

Private Member Functions

virtual void SortHistoFolders ()
 
virtual void DumpFolder (TFolder *folder, UInt_t offset)
 
virtual void DumpObjArray (TObjArray *obj, UInt_t offset)
 
virtual void DumpEntry (TObject *obj, UInt_t offset)
 
virtual void CheckClass (TObject *obj, TString str, UInt_t offset)
 
virtual void GetType (TString entry, TString &type)
 
virtual void GetLabel (TString entry, TString &label)
 

Private Attributes

std::vector< std::string > fXmlData
 keeps the XML structure dump of the ROOT file More...
 
Bool_t fQuiet
 true = suppress output while converting More...
 
Bool_t fKeep
 true = keep the XML dump file More...
 
Bool_t fValid
 true if the conversion was fine More...
 
TString fFileName
 file name of the ROOT file More...
 
TString fXmlDumpFileName
 file name of the XML dump file More...
 
EFolderTag fFolderTag
 switch indicating which kind of TFolder object is found More...
 
UInt_t fNoOfDecayHistos
 number of decay histos in the DecayAnaModule More...
 
UInt_t fNoOfHistos
 number of histos from run header More...
 
UInt_t fNoOfRedGreenOffsets
 number of RedGreen offsets More...
 
UInt_t fNoOfDetectors
 number of detector entries in the header More...
 

Detailed Description

class which converts the structure of a ROOT file into a XML file.

Definition at line 61 of file musrRootValidation.cpp.

Member Enumeration Documentation

◆ EFolderTag

Enumerator
eUnkown 
eDecayAnaModule 
eSlowControlAnaModule 

Definition at line 76 of file musrRootValidation.cpp.

Constructor & Destructor Documentation

◆ PMusrRoot2Xml()

PMusrRoot2Xml::PMusrRoot2Xml ( const char *  fileName,
bool  quiet,
bool  keep 
)

Constructor. Reads the ROOT file and converts its structure to an XML dump file.

Definition at line 105 of file musrRootValidation.cpp.

References CheckClass(), eUnkown, fFileName, fFolderTag, fNoOfDecayHistos, fNoOfDetectors, fNoOfHistos, fNoOfRedGreenOffsets, fQuiet, fValid, fXmlData, fXmlDumpFileName, and SortHistoFolders().

◆ ~PMusrRoot2Xml()

PMusrRoot2Xml::~PMusrRoot2Xml ( )
virtual

Destructor.

Definition at line 169 of file musrRootValidation.cpp.

References fKeep, and fXmlDumpFileName.

Member Function Documentation

◆ CheckClass()

void PMusrRoot2Xml::CheckClass ( TObject *  obj,
TString  str,
UInt_t  offset 
)
privatevirtual
Parameters
objobject to be checked
strtag telling what kind of object it is
offsetneeded to indent dump info

Definition at line 386 of file musrRootValidation.cpp.

References DumpEntry(), DumpFolder(), DumpObjArray(), eDecayAnaModule, eSlowControlAnaModule, eUnkown, fFolderTag, and fXmlData.

Referenced by DumpFolder(), and PMusrRoot2Xml().

◆ DumpEntry()

void PMusrRoot2Xml::DumpEntry ( TObject *  obj,
UInt_t  offset 
)
privatevirtual

Dump content.

Parameters
objobject found in the ROOT file to be dumped
offsetneeded to indent dump info

Definition at line 339 of file musrRootValidation.cpp.

References eDecayAnaModule, eSlowControlAnaModule, eUnkown, fFolderTag, fNoOfDecayHistos, and fXmlData.

Referenced by CheckClass().

◆ DumpFolder()

void PMusrRoot2Xml::DumpFolder ( TFolder *  folder,
UInt_t  offset 
)
privatevirtual

Dump folder structure.

Parameters
folderTFolder object found in the ROOT file
offsetneeded to indent dump info

Definition at line 236 of file musrRootValidation.cpp.

References CheckClass(), and fQuiet.

Referenced by CheckClass().

◆ DumpObjArray()

void PMusrRoot2Xml::DumpObjArray ( TObjArray *  obj,
UInt_t  offset 
)
privatevirtual

Dump object array content structure.

Parameters
objobject array found in the ROOT file
offsetneeded to indent dump info

Definition at line 259 of file musrRootValidation.cpp.

References fNoOfDetectors, fNoOfHistos, fNoOfRedGreenOffsets, fQuiet, fXmlData, GetLabel(), and GetType().

Referenced by CheckClass().

◆ GetLabel()

void PMusrRoot2Xml::GetLabel ( TString  entry,
TString &  label 
)
privatevirtual

Filters from a TMusrRunHeader RunHeader entry the label.

Parameters
entryto be filtered
labelextracted from entry

Definition at line 476 of file musrRootValidation.cpp.

Referenced by DumpObjArray().

◆ GetNoOfDecayHistos()

virtual UInt_t PMusrRoot2Xml::GetNoOfDecayHistos ( )
inlinevirtual

Definition at line 69 of file musrRootValidation.cpp.

References fNoOfDecayHistos.

Referenced by main().

◆ GetNoOfDetectors()

virtual UInt_t PMusrRoot2Xml::GetNoOfDetectors ( )
inlinevirtual

Definition at line 73 of file musrRootValidation.cpp.

References fNoOfDetectors.

Referenced by main().

◆ GetNoOfExpectedHistos()

virtual UInt_t PMusrRoot2Xml::GetNoOfExpectedHistos ( )
inlinevirtual

Definition at line 70 of file musrRootValidation.cpp.

References fNoOfHistos, and fNoOfRedGreenOffsets.

Referenced by main().

◆ GetNoOfHistos()

virtual UInt_t PMusrRoot2Xml::GetNoOfHistos ( )
inlinevirtual

Definition at line 71 of file musrRootValidation.cpp.

References fNoOfHistos.

Referenced by main().

◆ GetNoOfRedGreenOffsets()

virtual UInt_t PMusrRoot2Xml::GetNoOfRedGreenOffsets ( )
inlinevirtual

Definition at line 72 of file musrRootValidation.cpp.

References fNoOfRedGreenOffsets.

Referenced by main().

◆ GetType()

void PMusrRoot2Xml::GetType ( TString  entry,
TString &  type 
)
privatevirtual

Checks to TMusrRunHeader type of the RunHeader entries.

Parameters
entryto be checked.
typerepesentation of the entry

Definition at line 448 of file musrRootValidation.cpp.

Referenced by DumpObjArray().

◆ GetXmlDumpFileName()

virtual TString PMusrRoot2Xml::GetXmlDumpFileName ( )
inlinevirtual

Definition at line 68 of file musrRootValidation.cpp.

References fXmlDumpFileName.

Referenced by main().

◆ IsValid()

virtual Bool_t PMusrRoot2Xml::IsValid ( )
inlinevirtual

Definition at line 67 of file musrRootValidation.cpp.

References fValid.

Referenced by main().

◆ SortHistoFolders()

void PMusrRoot2Xml::SortHistoFolders ( )
privatevirtual

Sorts the folders of the 'histos' TFolder in order to enforce the order according to:

  1. DecayAnaModule
  2. SCAnaModule
  3. all the rest

This is needed to the limited abilities of XML-Schema validation.

Definition at line 186 of file musrRootValidation.cpp.

References fXmlData.

Referenced by PMusrRoot2Xml().

Member Data Documentation

◆ fFileName

TString PMusrRoot2Xml::fFileName
private

file name of the ROOT file

Definition at line 83 of file musrRootValidation.cpp.

Referenced by PMusrRoot2Xml().

◆ fFolderTag

EFolderTag PMusrRoot2Xml::fFolderTag
private

switch indicating which kind of TFolder object is found

Definition at line 85 of file musrRootValidation.cpp.

Referenced by CheckClass(), DumpEntry(), and PMusrRoot2Xml().

◆ fKeep

Bool_t PMusrRoot2Xml::fKeep
private

true = keep the XML dump file

Definition at line 81 of file musrRootValidation.cpp.

Referenced by ~PMusrRoot2Xml().

◆ fNoOfDecayHistos

UInt_t PMusrRoot2Xml::fNoOfDecayHistos
private

number of decay histos in the DecayAnaModule

Definition at line 87 of file musrRootValidation.cpp.

Referenced by DumpEntry(), GetNoOfDecayHistos(), and PMusrRoot2Xml().

◆ fNoOfDetectors

UInt_t PMusrRoot2Xml::fNoOfDetectors
private

number of detector entries in the header

Definition at line 90 of file musrRootValidation.cpp.

Referenced by DumpObjArray(), GetNoOfDetectors(), and PMusrRoot2Xml().

◆ fNoOfHistos

UInt_t PMusrRoot2Xml::fNoOfHistos
private

number of histos from run header

Definition at line 88 of file musrRootValidation.cpp.

Referenced by DumpObjArray(), GetNoOfExpectedHistos(), GetNoOfHistos(), and PMusrRoot2Xml().

◆ fNoOfRedGreenOffsets

UInt_t PMusrRoot2Xml::fNoOfRedGreenOffsets
private

number of RedGreen offsets

Definition at line 89 of file musrRootValidation.cpp.

Referenced by DumpObjArray(), GetNoOfExpectedHistos(), GetNoOfRedGreenOffsets(), and PMusrRoot2Xml().

◆ fQuiet

Bool_t PMusrRoot2Xml::fQuiet
private

true = suppress output while converting

Definition at line 80 of file musrRootValidation.cpp.

Referenced by DumpFolder(), DumpObjArray(), and PMusrRoot2Xml().

◆ fValid

Bool_t PMusrRoot2Xml::fValid
private

true if the conversion was fine

Definition at line 82 of file musrRootValidation.cpp.

Referenced by IsValid(), and PMusrRoot2Xml().

◆ fXmlData

std::vector<std::string> PMusrRoot2Xml::fXmlData
private

keeps the XML structure dump of the ROOT file

Definition at line 78 of file musrRootValidation.cpp.

Referenced by CheckClass(), DumpEntry(), DumpObjArray(), PMusrRoot2Xml(), and SortHistoFolders().

◆ fXmlDumpFileName

TString PMusrRoot2Xml::fXmlDumpFileName
private

file name of the XML dump file

Definition at line 84 of file musrRootValidation.cpp.

Referenced by GetXmlDumpFileName(), PMusrRoot2Xml(), and ~PMusrRoot2Xml().


The documentation for this class was generated from the following file: