NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
DDAS::XMLSettingsWriter Class Reference

#include <XMLSettingsWriter.h>

Inheritance diagram for DDAS::XMLSettingsWriter:
DDAS::SettingsWriter

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)
 

Detailed Description

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

Constructor & Destructor Documentation

DDAS::XMLSettingsWriter::XMLSettingsWriter ( const char *  filename)

constructor Just save the filename for now:

Parameters

Member Function Documentation

void DDAS::XMLSettingsWriter::write ( const ModuleSettings dspSettings)
virtual

write For each module in the settings vector:

  • Generate a module filename.
  • Open a file pointer for the module XML file.
  • Create an XMLPrinter for the module file.
  • Write the module settings.
Parameters
dspSettings- the module settings to write.
Exceptions
std::runtime_error- unable to open the output file.

Implements DDAS::SettingsWriter.

void DDAS::XMLSettingsWriter::writeMultiplicityMasks ( tinyxml2::XMLPrinter printer,
uint32_t  low,
uint32_t  high 
)
static

writeMultiplicityMasks Writes the multiplicity mask element <MultiplicityMasks low="lowmask" high="highmask">

Parameters
printer- referencs the tinxyml2 printer.
low- low order mask bits.
high- high order mask bits.
void DDAS::XMLSettingsWriter::writeValue ( tinyxml2::XMLPrinter printer,
unsigned  value 
)
static

writeValue Write an integer value attribute:

Parameters
printer- the XML printer.
value- the unsigned integer value.
void DDAS::XMLSettingsWriter::writeValue ( tinyxml2::XMLPrinter printer,
double  value 
)
static

writeElement Same as above with a double value.

void DDAS::XMLSettingsWriter::writeValue ( tinyxml2::XMLPrinter printer,
bool  value 
)
static

writeElement same as above but with boolean value


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