musrfit
1.9.2
|
#include <PStartupHandler.h>
Public Member Functions | |
PStartupHandler () | |
virtual | ~PStartupHandler () |
virtual void | OnStartDocument () |
virtual void | OnEndDocument () |
virtual void | OnStartElement (const Char_t *, const TList *) |
virtual void | OnEndElement (const Char_t *) |
virtual void | OnCharacters (const Char_t *) |
virtual void | OnComment (const Char_t *) |
virtual void | OnWarning (const Char_t *) |
virtual void | OnError (const Char_t *) |
virtual void | OnFatalError (const Char_t *) |
virtual void | OnCdataBlock (const Char_t *, Int_t) |
virtual Bool_t | StartupFileFound () |
true = musrfit_startup.xml found More... | |
virtual TString | GetStartupFilePath () |
returns FULLPATH/musrfit_startup.xml, where FULLPATH=path were the musrfit_startup.xml is found More... | |
virtual void | CheckLists () |
virtual PMsrFourierStructure | GetFourierDefaults () |
returns the Fourier defaults More... | |
virtual const PRunNameTemplateList | GetRunNameTemplateList () |
virtual const PStringVector | GetDataPathList () const |
returns the search data path list More... | |
virtual const PIntVector | GetMarkerList () const |
returns the marker list More... | |
virtual const PIntVector | GetColorList () const |
returns the color list More... | |
Private Types | |
enum | EKeyWords { eEmpty, eComment, eDataPath, eRunNameTemplate, eOptions, eFourierSettings, eUnits, eFourierPower, eApodization, ePlot, ePhase, ePhaseIncrement, eRootSettings, eMarkerList, eMarker, eColorList, eColor } |
Private Member Functions | |
Bool_t | StartupFileExists (Char_t *fln) |
Bool_t | WriteDefaultStartupFile () |
Private Attributes | |
EKeyWords | fKey |
xml filter key More... | |
Bool_t | fStartupFileFound |
startup file found flag More... | |
TString | fStartupFilePath |
full musrfit_startup.xml startup file paths More... | |
TString | fCurrentInstrumentName |
current instrument name More... | |
PMsrFourierStructure | fFourierDefaults |
Fourier defaults. More... | |
PStringVector | fDataPathList |
search data path list More... | |
PRunNameTemplateList | fRunNameTemplate |
run name template vector More... | |
PIntVector | fMarkerList |
marker list More... | |
PIntVector | fColorList |
color list More... | |
Handles the XML musrfit startup file (musrfit_startup.xml) in which default settings are stored:
Definition at line 54 of file PStartupHandler.h.
|
private |
Enumerator | |
---|---|
eEmpty | |
eComment | |
eDataPath | |
eRunNameTemplate | |
eOptions | |
eFourierSettings | |
eUnits | |
eFourierPower | |
eApodization | |
ePlot | |
ePhase | |
ePhaseIncrement | |
eRootSettings | |
eMarkerList | |
eMarker | |
eColorList | |
eColor |
Definition at line 83 of file PStartupHandler.h.
PStartupHandler::PStartupHandler | ( | ) |
Constructor. Check if the musrfit_startup.xml file is found in some standard search paths
Definition at line 94 of file PStartupHandler.cpp.
References fStartupFileFound, fStartupFilePath, startup_path_name, StartupFileExists(), and WriteDefaultStartupFile().
|
virtual |
Destructor
Definition at line 172 of file PStartupHandler.cpp.
References fColorList, fDataPathList, fMarkerList, and fRunNameTemplate.
|
virtual |
Check if the default lists are present and if not, feed them with some default settings
Definition at line 528 of file PStartupHandler.cpp.
References fColorList, fDataPathList, and fMarkerList.
Referenced by OnEndDocument().
|
inlinevirtual |
|
inlinevirtual |
returns the search data path list
Definition at line 78 of file PStartupHandler.h.
References fDataPathList.
|
inlinevirtual |
returns the Fourier defaults
Definition at line 76 of file PStartupHandler.h.
References fFourierDefaults.
|
inlinevirtual |
|
inlinevirtual |
Definition at line 77 of file PStartupHandler.h.
References fRunNameTemplate.
|
inlinevirtual |
returns FULLPATH/musrfit_startup.xml, where FULLPATH=path were the musrfit_startup.xml is found
Definition at line 72 of file PStartupHandler.h.
References fStartupFilePath.
|
virtual |
|
virtual |
Content of a given XML element. Filters out the data and feeds them to the internal variables.
str | XML element string |
Definition at line 280 of file PStartupHandler.cpp.
References eApodization, eColor, eDataPath, eFourierPower, eMarker, ePhase, ePhaseIncrement, ePlot, eRunNameTemplate, eUnits, PMsrFourierStructure::fApodization, fColorList, fCurrentInstrumentName, fDataPathList, fFourierDefaults, PMsrFourierStructure::fFourierPower, fKey, fMarkerList, FOURIER_APOD_MEDIUM, FOURIER_APOD_NONE, FOURIER_APOD_STRONG, FOURIER_APOD_WEAK, FOURIER_PLOT_IMAG, FOURIER_PLOT_PHASE, FOURIER_PLOT_POWER, FOURIER_PLOT_REAL, FOURIER_PLOT_REAL_AND_IMAG, FOURIER_UNIT_CYCLES, FOURIER_UNIT_FREQ, FOURIER_UNIT_GAUSS, FOURIER_UNIT_TESLA, PMsrFourierStructure::fPhase, PMsrFourierStructure::fPhaseIncrement, PMsrFourierStructure::fPlotTag, fRunNameTemplate, PMsrFourierStructure::fUnits, PRunNameTemplate::instrument, and PRunNameTemplate::runNameTemplate.
|
virtual |
Called when a XML comment is found. Not used.
str | not used. |
Definition at line 460 of file PStartupHandler.cpp.
|
virtual |
Called on end of XML file reading.
Definition at line 210 of file PStartupHandler.cpp.
References CheckLists().
|
virtual |
Called when a XML end element is found. Resets the handler key.
str | not used |
Definition at line 266 of file PStartupHandler.cpp.
|
virtual |
Called when the XML parser emits an error.
str | error string |
Definition at line 487 of file PStartupHandler.cpp.
|
virtual |
Called when the XML parser emits a fatal error.
str | fatal error string |
Definition at line 501 of file PStartupHandler.cpp.
|
virtual |
Called on start of the XML file reading. Initializes all necessary variables.
Definition at line 187 of file PStartupHandler.cpp.
References eEmpty, PMsrFourierStructure::fApodization, PMsrFourierStructure::fFourierBlockPresent, fFourierDefaults, PMsrFourierStructure::fFourierPower, fKey, FOURIER_APOD_NONE, FOURIER_PLOT_REAL_AND_IMAG, FOURIER_UNIT_GAUSS, PMsrFourierStructure::fPhaseIncrement, PMsrFourierStructure::fPlotRange, PMsrFourierStructure::fPlotTag, PMsrFourierStructure::fRangeForPhaseCorrection, and PMsrFourierStructure::fUnits.
|
virtual |
Called when a XML start element is found. Filters out the needed elements and sets a proper key.
str | XML element name |
attributes | not used |
Definition at line 226 of file PStartupHandler.cpp.
References eApodization, eColor, eDataPath, eFourierPower, eMarker, ePhase, ePhaseIncrement, ePlot, eRunNameTemplate, eUnits, fCurrentInstrumentName, and fKey.
|
virtual |
Called when the XML parser emits a warning.
str | warning string |
Definition at line 473 of file PStartupHandler.cpp.
|
private |
Checks if a file is present on the disc.
return:
fln | file name |
Definition at line 590 of file PStartupHandler.cpp.
Referenced by PStartupHandler().
|
inlinevirtual |
true = musrfit_startup.xml found
Definition at line 71 of file PStartupHandler.h.
References fStartupFileFound.
|
private |
Definition at line 609 of file PStartupHandler.cpp.
References startup_path_name.
Referenced by PStartupHandler().
|
private |
color list
Definition at line 97 of file PStartupHandler.h.
Referenced by CheckLists(), GetColorList(), OnCharacters(), and ~PStartupHandler().
|
private |
current instrument name
Definition at line 92 of file PStartupHandler.h.
Referenced by OnCharacters(), and OnStartElement().
|
private |
search data path list
Definition at line 94 of file PStartupHandler.h.
Referenced by CheckLists(), GetDataPathList(), OnCharacters(), and ~PStartupHandler().
|
private |
Fourier defaults.
Definition at line 93 of file PStartupHandler.h.
Referenced by GetFourierDefaults(), OnCharacters(), and OnStartDocument().
|
private |
xml filter key
Definition at line 88 of file PStartupHandler.h.
Referenced by OnCharacters(), OnEndElement(), OnStartDocument(), and OnStartElement().
|
private |
marker list
Definition at line 96 of file PStartupHandler.h.
Referenced by CheckLists(), GetMarkerList(), OnCharacters(), and ~PStartupHandler().
|
private |
run name template vector
Definition at line 95 of file PStartupHandler.h.
Referenced by GetRunNameTemplateList(), OnCharacters(), and ~PStartupHandler().
|
private |
startup file found flag
Definition at line 90 of file PStartupHandler.h.
Referenced by PStartupHandler(), and StartupFileFound().
|
private |
full musrfit_startup.xml startup file paths
Definition at line 91 of file PStartupHandler.h.
Referenced by GetStartupFilePath(), and PStartupHandler().