NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
#include <XMLSettingsWriter.h>
Public Member Functions | |
XMLSettingsWriter (const char *filename) | |
virtual void | write (const ModuleSettings &dspSettings) |
Static Public Member Functions | |
static void | writeValue (tinyxml2::XMLPrinter &printer, unsigned value) |
static void | writeValue (tinyxml2::XMLPrinter &printer, double value) |
static void | writeValue (tinyxml2::XMLPrinter &printer, bool value) |
static void | writeMultiplicityMasks (tinyxml2::XMLPrinter &printer, uint32_t low, uint32_t high) |
Writes settings to a group of xml files. One file is written per modules. On construction a base filename is passed in. Each module's settings are written into a per module file named base_Module_n.xml n is the module number (not the slot).
The structure of each XML file is: <module> <csra value="nnn"> <csrb value="nnn"> <format value="nnnn"> <maxevents value="nn"> <synchwait value="0|1"> <insych value="0|1"> <SlowFilterRange value="nnn"> <FastFilterRange value="nnn"> <EnableFastBackplaneTrigger value="0|1"> <trigConfig0-3 value='n' /> <HostRTPreset value="n">
DDAS::XMLSettingsWriter::XMLSettingsWriter | ( | const char * | filename | ) |
constructor Just save the filename for now:
|
virtual |
write For each module in the settings vector:
dspSettings | - the module settings to write. |
std::runtime_error | - unable to open the output file. |
Implements DDAS::SettingsWriter.
|
static |
writeMultiplicityMasks Writes the multiplicity mask element <MultiplicityMasks low="lowmask" high="highmask">
printer | - referencs the tinxyml2 printer. |
low | - low order mask bits. |
high | - high order mask bits. |
|
static |
writeValue Write an integer value attribute:
printer | - the XML printer. |
value | - the unsigned integer value. |
|
static |
writeElement Same as above with a double value.
|
static |
writeElement same as above but with boolean value