lemAutoRun
1.0
|
#include <PLemAutoRun.h>
Public Member Functions | |
PLemAutoRunXMLParser (const QString fln, PLemAutoRun *lar) | |
~PLemAutoRunXMLParser () | |
bool | isValid () |
bool | parse (QIODevice *device) |
bool | startDocument () |
bool | startElement () |
bool | endElement () |
bool | characters () |
bool | endDocument () |
Private Member Functions | |
void | setAttribute (const QString key, const QXmlStreamAttributes &qAttr) |
PLemAutoRunXMLParser::setAttribute. More... | |
Private Attributes | |
bool | fValid {false} |
QXmlStreamReader | fXml |
xml stream reader object More... | |
PLemAutoRun * | fLar |
pointer to the calling class More... | |
ELemAutoRunKeyWords | fKey |
key tag for the parsing process More... | |
Class which handles the startup init XML file for the LEM autorun sequence.
Definition at line 90 of file PLemAutoRun.h.
Definition at line 93 of file PLemAutoRun.h.
PLemAutoRunXMLParser::PLemAutoRunXMLParser | ( | const QString | fln, |
PLemAutoRun * | lar | ||
) |
XML Parser class for the lem autorun startup file.
lar | pointer to the main class. |
Definition at line 225 of file PLemAutoRun.cpp.
PLemAutoRunXMLParser::~PLemAutoRunXMLParser | ( | ) |
Destructor
Definition at line 242 of file PLemAutoRun.cpp.
bool PLemAutoRunXMLParser::characters | ( | ) |
The reader calls this function when it has parsed a chunk of character data.
str | content of a tag. This is the real information! |
Definition at line 556 of file PLemAutoRun.cpp.
References eAlarm_td_hv_trip, eAlarms, eAutoRunPath, eBeamline_demand, eClients, eClients_analyzer, eClients_danfysik, eClients_frontend, eClients_hv, eClients_lemvac, eClients_sample, eClients_sample_omega, eClients_tfl, eClients_WEW, eDanfysik_input, eDanfysik_max_current, eDanfysik_output, eDebug, eEnable_OnOff_Mode, eEnableAll, eEnergy_loss_param, eField_accuracy, eField_timeout, eFOM_current_accuracy, eFOM_input, eFOM_output, eFugHvCheck, eHv_accuracy, eHv_current, eHv_demand, eHv_measured, eHv_timeout, eHvDetector_demand, eHvDetector_measured, eHvSettingsPath, eIgnore_alarms, eIgnore_clients, eLem_setup, eLemvac_input, eLemvac_output, eMag_field, eMag_param_bpar, eMag_param_wew, eMod_date, eMod_name, eRun_comment, eRun_info, eSample_bh_odb_offset_input, eSample_bh_odb_offset_output, eSample_channel, eSample_cryo, eSample_ctrl_ch, eSample_input, eSample_name, eSample_output, eSample_oven_omega_input, eSample_oven_omega_output, eSample_rawvoltage, eSample_sensor_type, eSetup_bpar_enabled, eSetup_sample_enabled, eSetup_wew_enabled, eSpin_rot_angle, eSpin_rot_enabled, eSpin_rot_mag_input, eSpin_rot_mag_output, eTfl_input, eTfl_output, eTof_max, eTof_min, eTrigger_events, eWEW_critical_current_ra, eWEW_input, eWEW_output, eWEWH_max_current, eWEWL_max_current, eXmlAutoRunFln, eXmlAutoRunHTML, eXmlAutoRunValidateFln, eXmlSchemaFln, PLemAutoRun::fAlarmsPath, PLemAutoRun::fAlarmTdHvTripPath, PLemAutoRun::fAnalyzerName, PLemAutoRun::fAutoRunPath, PLemAutoRun::fBeamlineDemandPath, PLemAutoRun::fClientsPath, PLemAutoRun::fDanfysikFeName, PLemAutoRun::fDanfysikInputPath, PLemAutoRun::fDanfysikMaxCurrent, PLemAutoRun::fDanfysikOutputPath, PLemAutoRun::fDebug, PLemAutoRun::fEnableAll, PLemAutoRun::fEnableOnOffModePath, PLemAutoRun::fEnergyLossParamPath, PLemAutoRun::fFieldAccuracy, PLemAutoRun::fFieldTimeout, PLemAutoRun::fFOMCurrentAccuracy, PLemAutoRun::fFOMInputPath, PLemAutoRun::fFOMOutputPath, PLemAutoRun::fFrontendName, PLemAutoRun::fFugHvCheck, PLemAutoRun::fHVAccuracy, PLemAutoRun::fHVCurrentPath, PLemAutoRun::fHVDemandPath, PLemAutoRun::fHVDetectorDemandPath, PLemAutoRun::fHVDetectorMeasuredPath, PLemAutoRun::fHVFeName, PLemAutoRun::fHVMeasuredPath, PLemAutoRun::fHvSettingsPath, PLemAutoRun::fHVTimeout, PLemAutoRun::fIgnoreAlarms, PLemAutoRun::fIgnoreClients, fKey, fLar, PLemAutoRun::fLemSetupPath, PLemAutoRun::fLemvacFeName, PLemAutoRun::fLemvacInputPath, PLemAutoRun::fLemvacOutputPath, PLemAutoRun::fMagFieldPath, PLemAutoRun::fMagParamBparPath, PLemAutoRun::fMagParamWewPath, PLemAutoRun::fModDatePath, PLemAutoRun::fModNamePath, PLemAutoRun::fRunCommentPath, PLemAutoRun::fRunInfoPath, PLemAutoRun::fSampleBhOdbOffsetInput, PLemAutoRun::fSampleBhOdbOffsetOutput, PLemAutoRun::fSampleChannelPath, PLemAutoRun::fSampleCryoPath, PLemAutoRun::fSampleCtrlChPath, PLemAutoRun::fSampleFeName, PLemAutoRun::fSampleInputPath, PLemAutoRun::fSampleNamePath, PLemAutoRun::fSampleOutputPath, PLemAutoRun::fSampleOvenOmegaFeName, PLemAutoRun::fSampleOvenOmegaInputPath, PLemAutoRun::fSampleOvenOmegaOutputPath, PLemAutoRun::fSampleRawVoltagePath, PLemAutoRun::fSampleSensorTypePath, PLemAutoRun::fSetupBparEnabledPath, PLemAutoRun::fSetupSampleEnabledPath, PLemAutoRun::fSetupWewEnabledPath, PLemAutoRun::fSpinRotAnglePath, PLemAutoRun::fSpinRotEnabledPath, PLemAutoRun::fSpinRotMagInputPath, PLemAutoRun::fSpinRotMagOutputPath, PLemAutoRun::fTflFeName, PLemAutoRun::fTflInputPath, PLemAutoRun::fTflOutputPath, PLemAutoRun::fTofMaxPath, PLemAutoRun::fTofMinPath, PLemAutoRun::fTriggerEventsPath, PLemAutoRun::fWEWCriticalCurrentRA, PLemAutoRun::fWEWFeName, PLemAutoRun::fWEWHMaxCurrent, PLemAutoRun::fWEWInputPath, PLemAutoRun::fWEWLMaxCurrent, PLemAutoRun::fWEWOutputPath, fXml, PLemAutoRun::fXMLAutoRunFln, PLemAutoRun::fXMLAutoRunHTML, PLemAutoRun::fXMLAutoRunValidateFln, PLemAutoRun::fXMLSchemaFln, and PLemAutoRun::SetEnabled().
Referenced by parse().
bool PLemAutoRunXMLParser::endDocument | ( | ) |
The reader calls this function after it has finished parsing. At this point it is checked if all the needed information could be collected. Otherwise some default values will be tried and a warning emitted.
Definition at line 839 of file PLemAutoRun.cpp.
References PLemAutoRun::ErrorMsg(), PLemAutoRun::fAlarmsPath, PLemAutoRun::fAlarmTdHvTripPath, PLemAutoRun::fAnalyzerName, PLemAutoRun::fAutoRunPath, PLemAutoRun::fBeamlineDemandPath, PLemAutoRun::fClientsPath, PLemAutoRun::fDanfysikFeName, PLemAutoRun::fDanfysikInputPath, PLemAutoRun::fDanfysikMaxCurrent, PLemAutoRun::fDanfysikOutputPath, PLemAutoRun::fEnabled, PLemAutoRun::fEnableOnOffModePath, PLemAutoRun::fEnergyLossParamPath, PLemAutoRun::fFieldAccuracy, PLemAutoRun::fFieldTimeout, PLemAutoRun::fFOMCurrentAccuracy, PLemAutoRun::fFOMInputPath, PLemAutoRun::fFOMOutputPath, PLemAutoRun::fFrontendName, PLemAutoRun::fHVAccuracy, PLemAutoRun::fHVCurrentPath, PLemAutoRun::fHVDemandPath, PLemAutoRun::fHVDetectorDemandPath, PLemAutoRun::fHVDetectorMeasuredPath, PLemAutoRun::fHVFeName, PLemAutoRun::fHVMeasuredPath, PLemAutoRun::fHVTimeout, fLar, PLemAutoRun::fLemSetupPath, PLemAutoRun::fLemvacFeName, PLemAutoRun::fLemvacInputPath, PLemAutoRun::fLemvacOutputPath, PLemAutoRun::fMagFieldPath, PLemAutoRun::fMagParamBparPath, PLemAutoRun::fMagParamWewPath, PLemAutoRun::fModDatePath, PLemAutoRun::fModNamePath, PLemAutoRun::fRunCommentPath, PLemAutoRun::fRunInfoPath, PLemAutoRun::fSampleBhOdbOffsetInput, PLemAutoRun::fSampleBhOdbOffsetOutput, PLemAutoRun::fSampleChannelPath, PLemAutoRun::fSampleCryoPath, PLemAutoRun::fSampleCtrlChPath, PLemAutoRun::fSampleFeName, PLemAutoRun::fSampleInputPath, PLemAutoRun::fSampleNamePath, PLemAutoRun::fSampleOutputPath, PLemAutoRun::fSampleOvenOmegaFeName, PLemAutoRun::fSampleOvenOmegaInputPath, PLemAutoRun::fSampleOvenOmegaOutputPath, PLemAutoRun::fSampleRawVoltagePath, PLemAutoRun::fSampleSensorTypePath, PLemAutoRun::fSetupBparEnabledPath, PLemAutoRun::fSetupSampleEnabledPath, PLemAutoRun::fSetupWewEnabledPath, PLemAutoRun::fSpinRotAnglePath, PLemAutoRun::fSpinRotEnabledPath, PLemAutoRun::fSpinRotMagInputPath, PLemAutoRun::fSpinRotMagOutputPath, PLemAutoRun::fTflFeName, PLemAutoRun::fTflInputPath, PLemAutoRun::fTflOutputPath, PLemAutoRun::fTofMaxPath, PLemAutoRun::fTofMinPath, PLemAutoRun::fTriggerEventsPath, PLemAutoRun::fWEWCriticalCurrentRA, PLemAutoRun::fWEWFeName, PLemAutoRun::fWEWHMaxCurrent, PLemAutoRun::fWEWInputPath, PLemAutoRun::fWEWLMaxCurrent, PLemAutoRun::fWEWOutputPath, PLemAutoRun::fXMLAutoRunFln, PLemAutoRun::fXMLAutoRunHTML, PLemAutoRun::fXMLAutoRunValidateFln, PLemAutoRun::fXMLSchemaFln, and LAR_XML_MISSING_ENTRY.
Referenced by parse().
bool PLemAutoRunXMLParser::endElement | ( | ) |
The reader calls this function when it has parsed an end element tag.
Definition at line 541 of file PLemAutoRun.cpp.
Referenced by parse().
|
inline |
Definition at line 126 of file PLemAutoRun.h.
References fValid.
Referenced by PLemAutoRun::ReadStartupXML().
bool PLemAutoRunXMLParser::parse | ( | QIODevice * | device | ) |
parse the hvEdit startup xml-file.
device | QFile object of the hvEdit startup xml-file |
Definition at line 256 of file PLemAutoRun.cpp.
References characters(), endDocument(), endElement(), fXml, startDocument(), and startElement().
Referenced by PLemAutoRunXMLParser().
|
private |
PLemAutoRunXMLParser::setAttribute.
key | |
val |
Definition at line 1416 of file PLemAutoRun.cpp.
References fLar, and PLemAutoRun::SetEnabled().
Referenced by startElement().
bool PLemAutoRunXMLParser::startDocument | ( | ) |
The reader calls this function when it starts parsing the document.
Definition at line 294 of file PLemAutoRun.cpp.
Referenced by parse().
bool PLemAutoRunXMLParser::startElement | ( | ) |
The reader calls this function when it has parsed a start element tag.
qName | name of the XML tag found. |
Definition at line 307 of file PLemAutoRun.cpp.
References eAlarm_td_hv_trip, eAlarms, eAutoRunPath, eBeamline_demand, eClients, eClients_analyzer, eClients_danfysik, eClients_frontend, eClients_hv, eClients_lemvac, eClients_sample, eClients_sample_omega, eClients_tfl, eClients_WEW, eDanfysik_input, eDanfysik_max_current, eDanfysik_output, eDebug, eEnable_OnOff_Mode, eEnableAll, eEnergy_loss_param, eField_accuracy, eField_timeout, eFOM_current_accuracy, eFOM_input, eFOM_output, eFugHvCheck, eHv_accuracy, eHv_current, eHv_demand, eHv_measured, eHv_timeout, eHvDetector_demand, eHvDetector_measured, eHvSettingsPath, eIgnore_alarms, eIgnore_clients, eLem_setup, eLemvac_input, eLemvac_output, eMag_field, eMag_param_bpar, eMag_param_wew, eMod_date, eMod_name, eRun_comment, eRun_info, eSample_bh_odb_offset_input, eSample_bh_odb_offset_output, eSample_channel, eSample_cryo, eSample_ctrl_ch, eSample_input, eSample_name, eSample_output, eSample_oven_omega_input, eSample_oven_omega_output, eSample_rawvoltage, eSample_sensor_type, eSetup_bpar_enabled, eSetup_sample_enabled, eSetup_wew_enabled, eSpin_rot_angle, eSpin_rot_enabled, eSpin_rot_mag_input, eSpin_rot_mag_output, eTfl_input, eTfl_output, eTof_max, eTof_min, eTrigger_events, eWEW_critical_current_ra, eWEW_input, eWEW_output, eWEWH_max_current, eWEWL_max_current, eXmlAutoRunFln, eXmlAutoRunHTML, eXmlAutoRunValidateFln, eXmlSchemaFln, fKey, fXml, and setAttribute().
Referenced by parse().
|
private |
key tag for the parsing process
Definition at line 139 of file PLemAutoRun.h.
Referenced by characters(), endElement(), and startElement().
|
private |
pointer to the calling class
Definition at line 138 of file PLemAutoRun.h.
Referenced by characters(), endDocument(), PLemAutoRunXMLParser(), and setAttribute().
|
private |
Definition at line 136 of file PLemAutoRun.h.
Referenced by isValid(), and PLemAutoRunXMLParser().
|
private |
xml stream reader object
Definition at line 137 of file PLemAutoRun.h.
Referenced by characters(), parse(), and startElement().