#include <EventTraits.h>
Inheritance diagram for DybDaq::EventTraits:
Public Types | |
typedef std::vector< BitsDefinition > | Definitions |
Public Member Functions | |
virtual | ~EventTraits () |
Destroy this instance of the class. | |
virtual unsigned int | illegalMarker () const |
Returns the index value for an illegal header. | |
virtual unsigned int | illegalField () const |
Returns the index value for an illegal field. | |
virtual unsigned int | headerSize (const unsigned int marker) const =0 |
Returns the length of the requested marker. | |
virtual void | initializeHeader (const unsigned int marker, char *buffer) const =0 |
Initializes the EventHeader memory with the appropriate markers. | |
const char * | siteAsString (const unsigned int site) const |
Returns the string for the specified site. | |
const char * | detectorAsString (const unsigned int detector) const |
Returns the string for the specified detector. | |
const char * | dataTypeAsString (const unsigned int dataType) const |
Returns the string for the specified dataType. | |
unsigned int | moduleType (const unsigned int module) const |
Returns the module type for the specified module, or 0xffffffU. | |
const char * | moduleTypeAsString (const unsigned int moduleType) const |
Returns the string for the specified module type. | |
virtual unsigned int | majorVersion () const =0 |
virtual unsigned int | minorVersion () const =0 |
virtual const std::string | versionString () const =0 |
virtual unsigned int | marker (unsigned int marker) const |
virtual const char * | boolAsString (bool value) const |
const DaqTraits::Definitions & | bitsDefinitions (unsigned int component) const |
Static Public Member Functions | |
static const EventTraits & | defaultTraits () |
Returns a new default LtbTraits to bootstrap the system. | |
static const EventTraits * | readTraits (const char *&buffer) |
Returns a new LtbTraits if the supplied traits do not match the current one. | |
Static Public Attributes | |
static const unsigned int | kEventHeader = 0 |
The Event Header block. | |
static const unsigned int | kRomHeader = EventTraits::kEventHeader + 1 |
The ROM Header block. | |
static const unsigned int | kMarker = 0 |
The merker for the header. | |
static const unsigned int | kMajorVersion = EventTraits::kMarker + 1 |
The field for the major version number. | |
static const unsigned int | kMinorVersion = EventTraits::kMajorVersion + 1 |
The field for the minor version number. | |
static const unsigned int | kEventHeaderSize = EventTraits::kMinorVersion + 1 |
The field for the event header size. | |
static const unsigned int | kEventTotalSize = EventTraits::kEventHeaderSize + 1 |
The field for the total event size. | |
static const unsigned int | kEventSite = EventTraits::kEventTotalSize + 1 |
The field for the total event size. | |
static const unsigned int | kEventDetector = EventTraits::kEventSite + 1 |
The field for the detector of the event. | |
static const unsigned int | kEventRun = EventTraits::kEventDetector + 1 |
The field for the run number of the event. | |
static const unsigned int | kEventNumber = EventTraits::kEventRun + 1 |
The field for the event number of the event. | |
static const unsigned int | kEventDataType = EventTraits::kEventNumber + 1 |
The field for the data type of the event. | |
static const unsigned int | kCbltWrapping = EventTraits::kEventDataType + 1 |
The field for the wrapped CBLT readout. | |
static const unsigned int | kRawCblt = EventTraits::kCbltWrapping + 1 |
The field for the raw CBLT readout. | |
static const unsigned int | kLtbMismatch = EventTraits::kRawCblt + 1 |
The field for the trigger mismatch. | |
static const unsigned int | kInvalidData = EventTraits::kLtbMismatch + 1 |
The field for the invalid readout. | |
static const unsigned int | kRomHeaderSize = EventTraits::kInvalidData + 1 |
The field for the rom fragment header length. | |
static const unsigned int | kRomTotalSize = EventTraits::kRomHeaderSize + 1 |
The field for the total rom fragment length. | |
static const unsigned int | kRomSite = EventTraits::kRomTotalSize + 1 |
The field for the site of the rom fragment. | |
static const unsigned int | kRomDetector = EventTraits::kRomSite + 1 |
The field for the detector within the site of the rom fragment. | |
static const unsigned int | kRomModuleType = EventTraits::kRomDetector + 1 |
The field for the module type of the rom fragment. | |
static const unsigned int | kRomSlot = EventTraits::kRomModuleType + 1 |
The field for the slot of the rom fragment. | |
static const unsigned int | kFeeModule = 0 |
The ModuleType of the FEE. | |
static const unsigned int | kFadcModule = EventTraits::kFeeModule + 1 |
The ModuleType of the Trigger. | |
static const unsigned int | kLtbModule = EventTraits::kFadcModule + 1 |
The ModuleType of the Local Trigger Board. | |
static const unsigned int | kRpcRomModule = EventTraits::kLtbModule + 1 |
The ModuleType of the ROM Readout module. | |
static const unsigned int | kRpcRtmModule = EventTraits::kRpcRomModule + 1 |
The ModuleType of the ROM Readout module. | |
static const unsigned int | kMtbModule = EventTraits::kRpcRtmModule + 1 |
The ModuleType of the Master Trigger Board. | |
Protected Member Functions | |
EventTraits () | |
Creates an instance of this class. | |
virtual unsigned int | maxSite () const =0 |
Returns the maximum site. | |
virtual const char ** | siteStrings () const =0 |
Returns the array of site strings. | |
virtual unsigned int | maxDetector () const =0 |
Returns the maximum detector. | |
virtual const char ** | detectorStrings () const =0 |
Returns the array of detector strings. | |
virtual unsigned int | maxDataType () const =0 |
Returns the maximum data type. | |
virtual const char ** | dataTypeStrings () const =0 |
Returns the array of data type strings. | |
virtual unsigned int | maxModuleType () const =0 |
Returns the maximum module type. | |
virtual const unsigned int * | moduleTypes () const =0 |
Returns the array of data type strings. | |
virtual const char ** | moduleTypeStrings () const =0 |
Returns the array of site strings. | |
unsigned int | index (unsigned int field) const |
virtual unsigned int | markersEnd () const =0 |
virtual const unsigned int * | markers () const =0 |
virtual unsigned int | fieldsEnd () const =0 |
virtual const unsigned int * | indices () const =0 |
virtual const unsigned int * | shifts () const =0 |
virtual const unsigned int * | masks () const =0 |
virtual const std::string * | descriptions () const |
virtual DaqTraits::Definitions * | definitions (unsigned int component) const |
virtual void | setDefinitions (DaqTraits::Definitions *definitions, unsigned int component) |
virtual const unsigned int * | componentFields (unsigned int component) const |
virtual const unsigned int | componentFieldsEnd (unsigned int component) const |
Static Protected Member Functions | |
static unsigned int | readUnsignedInt (const char *&buffer, const DaqTraits &traits, unsigned int field) |
Private Member Functions | |
EventTraits (EventTraits &rhs) | |
Suppress default. | |
EventTraits & | operator= (EventTraits &rhs) |
Suppress default. | |
Friends | |
friend class | DaqBuffer |
Definition at line 17 of file EventTraits.h.
EventTraits::~EventTraits | ( | ) | [virtual] |
EventTraits::EventTraits | ( | ) | [protected] |
DybDaq::EventTraits::EventTraits | ( | EventTraits & | rhs | ) | [private] |
Suppress default.
const EventTraits & EventTraits::defaultTraits | ( | ) | [static] |
Returns a new default LtbTraits to bootstrap the system.
Definition at line 60 of file EventTraits.cc.
00060 { 00061 if (0 == m_allTraits.size()) { 00062 m_allTraits.insert(std::pair<const char*, EventTraits*>(EventTraits_v0_6::key(),new EventTraits_v0_6())); 00063 } 00064 return *m_allTraits[EventTraits_v0_6::key()]; 00065 }
const EventTraits * EventTraits::readTraits | ( | const char *& | buffer | ) | [static] |
Returns a new LtbTraits if the supplied traits do not match the current one.
Definition at line 67 of file EventTraits.cc.
00067 { 00068 return &defaultTraits(); 00069 }
unsigned int EventTraits::illegalMarker | ( | ) | const [virtual] |
Returns the index value for an illegal header.
Implements DybDaq::DaqTraits.
Definition at line 71 of file EventTraits.cc.
unsigned int EventTraits::illegalField | ( | ) | const [virtual] |
Returns the index value for an illegal field.
Implements DybDaq::DaqTraits.
Definition at line 75 of file EventTraits.cc.
virtual unsigned int DybDaq::EventTraits::headerSize | ( | const unsigned int | marker | ) | const [pure virtual] |
virtual void DybDaq::EventTraits::initializeHeader | ( | const unsigned int | marker, | |
char * | buffer | |||
) | const [pure virtual] |
Initializes the EventHeader memory with the appropriate markers.
Implemented in DybDaq::EventTraits_v0_6.
const char * EventTraits::siteAsString | ( | const unsigned int | site | ) | const |
Returns the string for the specified site.
Definition at line 79 of file EventTraits.cc.
00079 { 00080 return siteStrings()[site]; 00081 }
const char * EventTraits::detectorAsString | ( | const unsigned int | detector | ) | const |
Returns the string for the specified detector.
Definition at line 83 of file EventTraits.cc.
00083 { 00084 return detectorStrings()[detector]; 00085 }
const char * EventTraits::dataTypeAsString | ( | const unsigned int | dataType | ) | const |
Returns the string for the specified dataType.
Definition at line 87 of file EventTraits.cc.
00087 { 00088 return dataTypeStrings()[dataType]; 00089 }
unsigned int EventTraits::moduleType | ( | const unsigned int | module | ) | const |
Returns the module type for the specified module, or 0xffffffU.
Definition at line 91 of file EventTraits.cc.
00091 { 00092 if (module > maxModuleType()) { 00093 return 0; 00094 } 00095 return moduleTypes()[module]; 00096 }
const char * EventTraits::moduleTypeAsString | ( | const unsigned int | moduleType | ) | const |
Returns the string for the specified module type.
Definition at line 98 of file EventTraits.cc.
00098 { 00099 return moduleTypeStrings()[moduleType]; 00100 }
virtual unsigned int DybDaq::EventTraits::maxSite | ( | ) | const [protected, pure virtual] |
virtual const char** DybDaq::EventTraits::siteStrings | ( | ) | const [protected, pure virtual] |
virtual unsigned int DybDaq::EventTraits::maxDetector | ( | ) | const [protected, pure virtual] |
virtual const char** DybDaq::EventTraits::detectorStrings | ( | ) | const [protected, pure virtual] |
virtual unsigned int DybDaq::EventTraits::maxDataType | ( | ) | const [protected, pure virtual] |
virtual const char** DybDaq::EventTraits::dataTypeStrings | ( | ) | const [protected, pure virtual] |
virtual unsigned int DybDaq::EventTraits::maxModuleType | ( | ) | const [protected, pure virtual] |
virtual const unsigned int* DybDaq::EventTraits::moduleTypes | ( | ) | const [protected, pure virtual] |
virtual const char** DybDaq::EventTraits::moduleTypeStrings | ( | ) | const [protected, pure virtual] |
EventTraits& DybDaq::EventTraits::operator= | ( | EventTraits & | rhs | ) | [private] |
Suppress default.
const unsigned int EventTraits::kEventHeader = 0 [static] |
const unsigned int EventTraits::kRomHeader = EventTraits::kEventHeader + 1 [static] |
const unsigned int EventTraits::kMarker = 0 [static] |
const unsigned int EventTraits::kMajorVersion = EventTraits::kMarker + 1 [static] |
const unsigned int EventTraits::kMinorVersion = EventTraits::kMajorVersion + 1 [static] |
const unsigned int EventTraits::kEventHeaderSize = EventTraits::kMinorVersion + 1 [static] |
const unsigned int EventTraits::kEventTotalSize = EventTraits::kEventHeaderSize + 1 [static] |
const unsigned int EventTraits::kEventSite = EventTraits::kEventTotalSize + 1 [static] |
const unsigned int EventTraits::kEventDetector = EventTraits::kEventSite + 1 [static] |
const unsigned int EventTraits::kEventRun = EventTraits::kEventDetector + 1 [static] |
const unsigned int EventTraits::kEventNumber = EventTraits::kEventRun + 1 [static] |
const unsigned int EventTraits::kEventDataType = EventTraits::kEventNumber + 1 [static] |
const unsigned int EventTraits::kCbltWrapping = EventTraits::kEventDataType + 1 [static] |
const unsigned int EventTraits::kRawCblt = EventTraits::kCbltWrapping + 1 [static] |
const unsigned int EventTraits::kLtbMismatch = EventTraits::kRawCblt + 1 [static] |
const unsigned int EventTraits::kInvalidData = EventTraits::kLtbMismatch + 1 [static] |
const unsigned int EventTraits::kRomHeaderSize = EventTraits::kInvalidData + 1 [static] |
const unsigned int EventTraits::kRomTotalSize = EventTraits::kRomHeaderSize + 1 [static] |
const unsigned int EventTraits::kRomSite = EventTraits::kRomTotalSize + 1 [static] |
const unsigned int EventTraits::kRomDetector = EventTraits::kRomSite + 1 [static] |
The field for the detector within the site of the rom fragment.
Definition at line 127 of file EventTraits.h.
const unsigned int EventTraits::kRomModuleType = EventTraits::kRomDetector + 1 [static] |
const unsigned int EventTraits::kRomSlot = EventTraits::kRomModuleType + 1 [static] |
const unsigned int EventTraits::kFeeModule = 0 [static] |
const unsigned int EventTraits::kFadcModule = EventTraits::kFeeModule + 1 [static] |
const unsigned int EventTraits::kLtbModule = EventTraits::kFadcModule + 1 [static] |
const unsigned int EventTraits::kRpcRomModule = EventTraits::kLtbModule + 1 [static] |
const unsigned int EventTraits::kRpcRtmModule = EventTraits::kRpcRomModule + 1 [static] |
const unsigned int EventTraits::kMtbModule = EventTraits::kRpcRtmModule + 1 [static] |