|
musrWiz 0.1.0
|
The PInstrumentDefXMLParser class parses instrument definition XML files. More...
#include <PAdmin.h>
Public Member Functions | |
| PInstrumentDefXMLParser (const QString &fln, PAdmin *) | |
| Constructor. Parses the given instrument definition XML file. | |
| virtual | ~PInstrumentDefXMLParser () |
| Destructor. | |
| virtual bool | isValid () |
| Checks if the XML parsing was successful. | |
Private Types | |
| enum | EKeyWords { eEmpty , eInstitute , eInstrument , eRunNameTemplate , eBeamline , eDataFileFormat , eTf , eZf , eLf , eNoOfDetectors , eFgbOffset , eLgb , eBkgRange , eLogicDetector } |
| Enumeration of XML tag keywords for parsing state machine. More... | |
Private Member Functions | |
| bool | parse (QIODevice *device) |
| bool | startDocument () |
| bool | startElement () |
| bool | endElement () |
| bool | characters () |
| bool | endDocument () |
Private Attributes | |
| QXmlStreamReader | fXml |
| xml stream reader object | |
| bool | fValid |
| flag showing if XML read has been successful | |
| EKeyWords | fKeyWord |
| key word tag to know how to handle the content | |
| PAdmin * | fAdmin |
| a pointer to the main administration class object | |
| QString | fInstituteName |
| current institute name being parsed | |
| PInstrument * | fInstrument |
| current instrument object being built | |
| PSetup * | fSetup |
| current setup object being built | |
The PInstrumentDefXMLParser class parses instrument definition XML files.
This class reads and parses XML files containing instrument definitions for various muon facilities (PSI, TRIUMF, ISIS, J-PARC). Each instrument includes setup configurations for different measurement types (ZF, TF, LF).
|
private |
| PInstrumentDefXMLParser::PInstrumentDefXMLParser | ( | const QString & | fln, |
| PAdmin * | admin ) |
Constructor. Parses the given instrument definition XML file.
| fln | Path to the instrument definition XML file. |
| admin | Pointer to the PAdmin object where parsed data will be stored. |
XML Parser class for the instrument definition file(s).
| file | name of the instrument definition file(s). |
| admin | pointer to an admin class instance. |
|
inlinevirtual |
Destructor.
|
private |
This routine delivers the content of an XML tag. It fills the content into the load data structure.
|
private |
Called at the end of the XML parse process. It checks if default paths contain system variables, and if so expand them for the further use.
|
private |
Routine called when the end XML tag is found. It is used to put the filtering tag to 'empty'. It also resets the fFunc flag in case the entry was a theory function.
|
inlinevirtual |
Checks if the XML parsing was successful.
|
private |
parse the instrument definition xml-file(s).
| device | QFile object of the instrument definition xml-file(s). |
|
private |
Routine called at the beginning of the XML parsing process.
|
private |
Routine called when a new XML tag is found. Here it is used to set a tag for filtering afterwards the content.
|
private |
a pointer to the main administration class object
|
private |
current institute name being parsed
|
private |
current instrument object being built
|
private |
key word tag to know how to handle the content
|
private |
current setup object being built
|
private |
flag showing if XML read has been successful
|
private |
xml stream reader object