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

#include <XMLCrateReader.h>

Inheritance diagram for DDAS::XMLCrateReader:
DDAS::CrateReader

Classes

struct  SlotInformation
 

Public Member Functions

 XMLCrateReader (const char *configFile)
 
virtual ~XMLCrateReader ()
 
virtual SettingsReadercreateReader (unsigned short slot)
 
unsigned short getCrateId () const
 
unsigned getEvtLen (unsigned short slot)
 
unsigned getFifoThreshold (unsigned short slot)
 
bool isInfinityClock (unsigned short slot)
 
double getTimestampScale (unsigned short slot)
 
bool isExternalClock (unsigned short slot)
 
const std::map< unsigned short,
SlotInformation > & 
getSlotInformation () const
 
- Public Member Functions inherited from DDAS::CrateReader
 CrateReader (unsigned crate, const std::vector< unsigned short > &slots)
 
virtual ~CrateReader ()
 
virtual Crate readCrate ()
 

Additional Inherited Members

- Protected Attributes inherited from DDAS::CrateReader
std::vector< unsigned short > m_slots
 
unsigned m_crateId
 

Detailed Description

This class specializes the CrateReader class to work with a set of XML specifications of the crate, modules and their settings. The top level is a crate xml file which is of the form

*  <crate id="1">
*      <slot number="2" ... configfile="/user/fox/configs/Ge.xml" />
*      <slot number="5" ... configfile="/user/fox/configs/Ge-short-trace.xml />
*  </crate>
*
* 

I've only shown the <slot> attributes we care/check for. The other attributes at this time are:

Constructor & Destructor Documentation

DDAS::XMLCrateReader::XMLCrateReader ( const char *  configFile)

constructor Given the crate information file, process it and use the resulting information to fill in the base class attributes:

  • m_slots - The slot map.
  • m_crateId - the id of this crate.
Parameters
configFile- the crate configuration file.
Exceptions
std::invalid_argumentif there are errors:
  • Opening the file.
  • Parsing it to XML
  • Semantics of the XML file.
DDAS::XMLCrateReader::~XMLCrateReader ( )
virtual

destructor just let the map destroy itself

Member Function Documentation

SettingsReader * DDAS::XMLCrateReader::createReader ( unsigned short  slot)
virtual

createReader Given a slot number:

Implements DDAS::CrateReader.

unsigned DDAS::XMLCrateReader::getEvtLen ( unsigned short  slot)

getEvtLen Returns the event length for a slot.

Parameters
slot- the slot number.
Returns
unsigned - Event length for the slot.
unsigned DDAS::XMLCrateReader::getFifoThreshold ( unsigned short  slot)

getFifoThreshold Return the fifo threshold for a slot.

Parameters
slot- slot number.
Returns
unsigned FIFO trigger threshold for the slot.
double DDAS::XMLCrateReader::getTimestampScale ( unsigned short  slot)

getTimestampScale Returns the timestamp scale factor.

Parameters
slot- slot number to use.
Returns
double - multiplier for the timstamp, whatever the source.
bool DDAS::XMLCrateReader::isExternalClock ( unsigned short  slot)

isExternalClock

Parameters
slot- slot number to check.
Returns
bool - true if the external timestamp should be used for event building.
bool DDAS::XMLCrateReader::isInfinityClock ( unsigned short  slot)

isInfinityClock

Parameters
slot- slot to get the flag for. - Flag of whether or not to use infinity clock.

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