lemAutoRun  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PLemAutoRunXMLParser Class Reference

#include <PLemAutoRun.h>

Collaboration diagram for PLemAutoRunXMLParser:
Collaboration graph
[legend]

Public Types

enum  ELemAutoRunKeyWords {
  eEmpty, eEnableAll, eXmlSchemaFln, eXmlAutoRunFln,
  eXmlAutoRunValidateFln, eXmlAutoRunHTML, eAutoRunPath, eHvSettingsPath,
  eDebug, eIgnore_clients, eIgnore_alarms, eFugHvCheck,
  eField_timeout, eField_accuracy, eHv_timeout, eHv_accuracy,
  eFOM_current_accuracy, eWEW_critical_current_ra, eWEWL_max_current, eWEWH_max_current,
  eDanfysik_max_current, eMag_param_wew, eMag_param_bpar, eSetup_sample_enabled,
  eSetup_wew_enabled, eSetup_bpar_enabled, eEnable_OnOff_Mode, eTrigger_events,
  eAlarms, eAlarm_td_hv_trip, eRun_info, eRun_comment,
  eTof_min, eTof_max, eMod_name, eMod_date,
  eLem_setup, eSpin_rot_angle, eSpin_rot_enabled, eSample_name,
  eSample_cryo, eEnergy_loss_param, eClients, eClients_analyzer,
  eClients_frontend, eClients_tfl, eClients_sample, eClients_sample_omega,
  eClients_WEW, eClients_danfysik, eClients_hv, eClients_lemvac,
  eHv_demand, eHv_measured, eHv_current, eHvDetector_demand,
  eHvDetector_measured, eSpin_rot_mag_input, eSpin_rot_mag_output, eDanfysik_input,
  eDanfysik_output, eWEW_input, eWEW_output, eMag_field,
  eTfl_input, eTfl_output, eSample_ctrl_ch, eSample_sensor_type,
  eSample_channel, eSample_input, eSample_output, eSample_rawvoltage,
  eSample_bh_odb_offset_input, eSample_bh_odb_offset_output, eSample_oven_omega_input, eSample_oven_omega_output,
  eLemvac_input, eLemvac_output, eFOM_input, eFOM_output,
  eBeamline_demand
}
 

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...
 
PLemAutoRunfLar
 pointer to the calling class More...
 
ELemAutoRunKeyWords fKey
 key tag for the parsing process More...
 

Detailed Description

Class which handles the startup init XML file for the LEM autorun sequence.

Definition at line 90 of file PLemAutoRun.h.

Member Enumeration Documentation

◆ ELemAutoRunKeyWords

Enumerator
eEmpty 
eEnableAll 
eXmlSchemaFln 
eXmlAutoRunFln 
eXmlAutoRunValidateFln 
eXmlAutoRunHTML 
eAutoRunPath 
eHvSettingsPath 
eDebug 
eIgnore_clients 
eIgnore_alarms 
eFugHvCheck 
eField_timeout 
eField_accuracy 
eHv_timeout 
eHv_accuracy 
eFOM_current_accuracy 
eWEW_critical_current_ra 
eWEWL_max_current 
eWEWH_max_current 
eDanfysik_max_current 
eMag_param_wew 
eMag_param_bpar 
eSetup_sample_enabled 
eSetup_wew_enabled 
eSetup_bpar_enabled 
eEnable_OnOff_Mode 
eTrigger_events 
eAlarms 
eAlarm_td_hv_trip 
eRun_info 
eRun_comment 
eTof_min 
eTof_max 
eMod_name 
eMod_date 
eLem_setup 
eSpin_rot_angle 
eSpin_rot_enabled 
eSample_name 
eSample_cryo 
eEnergy_loss_param 
eClients 
eClients_analyzer 
eClients_frontend 
eClients_tfl 
eClients_sample 
eClients_sample_omega 
eClients_WEW 
eClients_danfysik 
eClients_hv 
eClients_lemvac 
eHv_demand 
eHv_measured 
eHv_current 
eHvDetector_demand 
eHvDetector_measured 
eSpin_rot_mag_input 
eSpin_rot_mag_output 
eDanfysik_input 
eDanfysik_output 
eWEW_input 
eWEW_output 
eMag_field 
eTfl_input 
eTfl_output 
eSample_ctrl_ch 
eSample_sensor_type 
eSample_channel 
eSample_input 
eSample_output 
eSample_rawvoltage 
eSample_bh_odb_offset_input 
eSample_bh_odb_offset_output 
eSample_oven_omega_input 
eSample_oven_omega_output 
eLemvac_input 
eLemvac_output 
eFOM_input 
eFOM_output 
eBeamline_demand 

Definition at line 93 of file PLemAutoRun.h.

Constructor & Destructor Documentation

◆ PLemAutoRunXMLParser()

PLemAutoRunXMLParser::PLemAutoRunXMLParser ( const QString  fln,
PLemAutoRun lar 
)

XML Parser class for the lem autorun startup file.

Parameters
larpointer to the main class.

Definition at line 225 of file PLemAutoRun.cpp.

References fLar, fValid, and parse().

◆ ~PLemAutoRunXMLParser()

PLemAutoRunXMLParser::~PLemAutoRunXMLParser ( )

Destructor

Definition at line 242 of file PLemAutoRun.cpp.

Member Function Documentation

◆ characters()

bool PLemAutoRunXMLParser::characters ( )

The reader calls this function when it has parsed a chunk of character data.

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

◆ endDocument()

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

◆ endElement()

bool PLemAutoRunXMLParser::endElement ( )

The reader calls this function when it has parsed an end element tag.

Definition at line 541 of file PLemAutoRun.cpp.

References eEmpty, and fKey.

Referenced by parse().

◆ isValid()

bool PLemAutoRunXMLParser::isValid ( )
inline

Definition at line 126 of file PLemAutoRun.h.

References fValid.

Referenced by PLemAutoRun::ReadStartupXML().

◆ parse()

bool PLemAutoRunXMLParser::parse ( QIODevice *  device)

parse the hvEdit startup xml-file.

Parameters
deviceQFile object of the hvEdit startup xml-file
Returns
true on success, false otherwise

Definition at line 256 of file PLemAutoRun.cpp.

References characters(), endDocument(), endElement(), fXml, startDocument(), and startElement().

Referenced by PLemAutoRunXMLParser().

◆ setAttribute()

void PLemAutoRunXMLParser::setAttribute ( const QString  key,
const QXmlStreamAttributes &  qAttr 
)
private

PLemAutoRunXMLParser::setAttribute.

Parameters
key
val

Definition at line 1416 of file PLemAutoRun.cpp.

References fLar, and PLemAutoRun::SetEnabled().

Referenced by startElement().

◆ startDocument()

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

◆ startElement()

bool PLemAutoRunXMLParser::startElement ( )

The reader calls this function when it has parsed a start element tag.

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

Member Data Documentation

◆ fKey

ELemAutoRunKeyWords PLemAutoRunXMLParser::fKey
private

key tag for the parsing process

Definition at line 139 of file PLemAutoRun.h.

Referenced by characters(), endElement(), and startElement().

◆ fLar

PLemAutoRun* PLemAutoRunXMLParser::fLar
private

pointer to the calling class

Definition at line 138 of file PLemAutoRun.h.

Referenced by characters(), endDocument(), PLemAutoRunXMLParser(), and setAttribute().

◆ fValid

bool PLemAutoRunXMLParser::fValid {false}
private

Definition at line 136 of file PLemAutoRun.h.

Referenced by isValid(), and PLemAutoRunXMLParser().

◆ fXml

QXmlStreamReader PLemAutoRunXMLParser::fXml
private

xml stream reader object

Definition at line 137 of file PLemAutoRun.h.

Referenced by characters(), parse(), and startElement().


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