musrfit  1.9.2
PStartupHandler Class Reference

#include <PStartupHandler.h>

Inheritance diagram for PStartupHandler:
Collaboration diagram for PStartupHandler:

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...
 

Detailed Description

Handles the XML musrfit startup file (musrfit_startup.xml) in which default settings are stored:

  • list of search paths for the data files
  • Fourier transform default settings
  • marker list for plotting
  • color list for plotting

Definition at line 54 of file PStartupHandler.h.

Member Enumeration Documentation

◆ EKeyWords

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.

Constructor & Destructor Documentation

◆ PStartupHandler()

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().

◆ ~PStartupHandler()

PStartupHandler::~PStartupHandler ( )
virtual

Destructor

Definition at line 172 of file PStartupHandler.cpp.

References fColorList, fDataPathList, fMarkerList, and fRunNameTemplate.

Member Function Documentation

◆ CheckLists()

void PStartupHandler::CheckLists ( )
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().

◆ GetColorList()

virtual const PIntVector PStartupHandler::GetColorList ( ) const
inlinevirtual

returns the color list

Definition at line 80 of file PStartupHandler.h.

References fColorList.

◆ GetDataPathList()

virtual const PStringVector PStartupHandler::GetDataPathList ( ) const
inlinevirtual

returns the search data path list

Definition at line 78 of file PStartupHandler.h.

References fDataPathList.

◆ GetFourierDefaults()

virtual PMsrFourierStructure PStartupHandler::GetFourierDefaults ( )
inlinevirtual

returns the Fourier defaults

Definition at line 76 of file PStartupHandler.h.

References fFourierDefaults.

◆ GetMarkerList()

virtual const PIntVector PStartupHandler::GetMarkerList ( ) const
inlinevirtual

returns the marker list

Definition at line 79 of file PStartupHandler.h.

References fMarkerList.

◆ GetRunNameTemplateList()

virtual const PRunNameTemplateList PStartupHandler::GetRunNameTemplateList ( )
inlinevirtual

Definition at line 77 of file PStartupHandler.h.

References fRunNameTemplate.

◆ GetStartupFilePath()

virtual TString PStartupHandler::GetStartupFilePath ( )
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.

◆ OnCdataBlock()

void PStartupHandler::OnCdataBlock ( const Char_t *  str,
Int_t  len 
)
virtual

Not used.

Parameters
strnot used
lennot used

Definition at line 516 of file PStartupHandler.cpp.

◆ OnCharacters()

◆ OnComment()

void PStartupHandler::OnComment ( const Char_t *  str)
virtual

Called when a XML comment is found. Not used.

Parameters
strnot used.

Definition at line 460 of file PStartupHandler.cpp.

◆ OnEndDocument()

void PStartupHandler::OnEndDocument ( )
virtual

Called on end of XML file reading.

Definition at line 210 of file PStartupHandler.cpp.

References CheckLists().

◆ OnEndElement()

void PStartupHandler::OnEndElement ( const Char_t *  str)
virtual

Called when a XML end element is found. Resets the handler key.

Parameters
strnot used

Definition at line 266 of file PStartupHandler.cpp.

References eEmpty, and fKey.

◆ OnError()

void PStartupHandler::OnError ( const Char_t *  str)
virtual

Called when the XML parser emits an error.

Parameters
strerror string

Definition at line 487 of file PStartupHandler.cpp.

◆ OnFatalError()

void PStartupHandler::OnFatalError ( const Char_t *  str)
virtual

Called when the XML parser emits a fatal error.

Parameters
strfatal error string

Definition at line 501 of file PStartupHandler.cpp.

◆ OnStartDocument()

◆ OnStartElement()

void PStartupHandler::OnStartElement ( const Char_t *  str,
const TList *  attributes 
)
virtual

Called when a XML start element is found. Filters out the needed elements and sets a proper key.

Parameters
strXML element name
attributesnot used

Definition at line 226 of file PStartupHandler.cpp.

References eApodization, eColor, eDataPath, eFourierPower, eMarker, ePhase, ePhaseIncrement, ePlot, eRunNameTemplate, eUnits, fCurrentInstrumentName, and fKey.

◆ OnWarning()

void PStartupHandler::OnWarning ( const Char_t *  str)
virtual

Called when the XML parser emits a warning.

Parameters
strwarning string

Definition at line 473 of file PStartupHandler.cpp.

◆ StartupFileExists()

Bool_t PStartupHandler::StartupFileExists ( Char_t *  fln)
private

Checks if a file is present on the disc.

return:

  • true, if the file is present
  • false, otherwise
Parameters
flnfile name

Definition at line 590 of file PStartupHandler.cpp.

Referenced by PStartupHandler().

◆ StartupFileFound()

virtual Bool_t PStartupHandler::StartupFileFound ( )
inlinevirtual

true = musrfit_startup.xml found

Definition at line 71 of file PStartupHandler.h.

References fStartupFileFound.

◆ WriteDefaultStartupFile()

Bool_t PStartupHandler::WriteDefaultStartupFile ( )
private

Definition at line 609 of file PStartupHandler.cpp.

References startup_path_name.

Referenced by PStartupHandler().

Member Data Documentation

◆ fColorList

PIntVector PStartupHandler::fColorList
private

color list

Definition at line 97 of file PStartupHandler.h.

Referenced by CheckLists(), GetColorList(), OnCharacters(), and ~PStartupHandler().

◆ fCurrentInstrumentName

TString PStartupHandler::fCurrentInstrumentName
private

current instrument name

Definition at line 92 of file PStartupHandler.h.

Referenced by OnCharacters(), and OnStartElement().

◆ fDataPathList

PStringVector PStartupHandler::fDataPathList
private

search data path list

Definition at line 94 of file PStartupHandler.h.

Referenced by CheckLists(), GetDataPathList(), OnCharacters(), and ~PStartupHandler().

◆ fFourierDefaults

PMsrFourierStructure PStartupHandler::fFourierDefaults
private

Fourier defaults.

Definition at line 93 of file PStartupHandler.h.

Referenced by GetFourierDefaults(), OnCharacters(), and OnStartDocument().

◆ fKey

EKeyWords PStartupHandler::fKey
private

xml filter key

Definition at line 88 of file PStartupHandler.h.

Referenced by OnCharacters(), OnEndElement(), OnStartDocument(), and OnStartElement().

◆ fMarkerList

PIntVector PStartupHandler::fMarkerList
private

marker list

Definition at line 96 of file PStartupHandler.h.

Referenced by CheckLists(), GetMarkerList(), OnCharacters(), and ~PStartupHandler().

◆ fRunNameTemplate

PRunNameTemplateList PStartupHandler::fRunNameTemplate
private

run name template vector

Definition at line 95 of file PStartupHandler.h.

Referenced by GetRunNameTemplateList(), OnCharacters(), and ~PStartupHandler().

◆ fStartupFileFound

Bool_t PStartupHandler::fStartupFileFound
private

startup file found flag

Definition at line 90 of file PStartupHandler.h.

Referenced by PStartupHandler(), and StartupFileFound().

◆ fStartupFilePath

TString PStartupHandler::fStartupFilePath
private

full musrfit_startup.xml startup file paths

Definition at line 91 of file PStartupHandler.h.

Referenced by GetStartupFilePath(), and PStartupHandler().


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