| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybDaq::EventTraits Class Reference

#include <EventTraits.h>

Inheritance diagram for DybDaq::EventTraits:

[legend]
Collaboration diagram for DybDaq::EventTraits:
[legend]
List of all members.

Public Types

typedef std::vector< BitsDefinitionDefinitions

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::DefinitionsbitsDefinitions (unsigned int component) const

Static Public Member Functions

static const EventTraitsdefaultTraits ()
 Returns a new default LtbTraits to bootstrap the system.
static const EventTraitsreadTraits (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::Definitionsdefinitions (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.
EventTraitsoperator= (EventTraits &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file EventTraits.h.


Constructor & Destructor Documentation

EventTraits::~EventTraits (  )  [virtual]

Destroy this instance of the class.

Definition at line 57 of file EventTraits.cc.

00057                           {
00058 }

EventTraits::EventTraits (  )  [protected]

Creates an instance of this class.

Definition at line 54 of file EventTraits.cc.

00054                          {
00055 }

DybDaq::EventTraits::EventTraits ( EventTraits rhs  )  [private]

Suppress default.


Member Function Documentation

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.

00071                                               {
00072     return 0xffffffffU;
00073 }

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.

00075                                              {
00076     return 0xffffffffU;
00077 }

virtual unsigned int DybDaq::EventTraits::headerSize ( const unsigned int  marker  )  const [pure virtual]

Returns the length of the requested marker.

Implemented in DybDaq::EventTraits_v0_6.

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]

Returns the maximum site.

Implemented in DybDaq::EventTraits_v0_6.

virtual const char** DybDaq::EventTraits::siteStrings (  )  const [protected, pure virtual]

Returns the array of site strings.

Implemented in DybDaq::EventTraits_v0_6.

virtual unsigned int DybDaq::EventTraits::maxDetector (  )  const [protected, pure virtual]

Returns the maximum detector.

Implemented in DybDaq::EventTraits_v0_6.

virtual const char** DybDaq::EventTraits::detectorStrings (  )  const [protected, pure virtual]

Returns the array of detector strings.

Implemented in DybDaq::EventTraits_v0_6.

virtual unsigned int DybDaq::EventTraits::maxDataType (  )  const [protected, pure virtual]

Returns the maximum data type.

Implemented in DybDaq::EventTraits_v0_6.

virtual const char** DybDaq::EventTraits::dataTypeStrings (  )  const [protected, pure virtual]

Returns the array of data type strings.

Implemented in DybDaq::EventTraits_v0_6.

virtual unsigned int DybDaq::EventTraits::maxModuleType (  )  const [protected, pure virtual]

Returns the maximum module type.

Implemented in DybDaq::EventTraits_v0_6.

virtual const unsigned int* DybDaq::EventTraits::moduleTypes (  )  const [protected, pure virtual]

Returns the array of data type strings.

Implemented in DybDaq::EventTraits_v0_6.

virtual const char** DybDaq::EventTraits::moduleTypeStrings (  )  const [protected, pure virtual]

Returns the array of site strings.

Implemented in DybDaq::EventTraits_v0_6.

EventTraits& DybDaq::EventTraits::operator= ( EventTraits rhs  )  [private]

Suppress default.


Member Data Documentation

const unsigned int EventTraits::kEventHeader = 0 [static]

The Event Header block.

Definition at line 26 of file EventTraits.h.

const unsigned int EventTraits::kRomHeader = EventTraits::kEventHeader + 1 [static]

The ROM Header block.

Definition at line 31 of file EventTraits.h.

const unsigned int EventTraits::kMarker = 0 [static]

The merker for the header.

Definition at line 38 of file EventTraits.h.

const unsigned int EventTraits::kMajorVersion = EventTraits::kMarker + 1 [static]

The field for the major version number.

Definition at line 45 of file EventTraits.h.

const unsigned int EventTraits::kMinorVersion = EventTraits::kMajorVersion + 1 [static]

The field for the minor version number.

Definition at line 50 of file EventTraits.h.

const unsigned int EventTraits::kEventHeaderSize = EventTraits::kMinorVersion + 1 [static]

The field for the event header size.

Definition at line 55 of file EventTraits.h.

const unsigned int EventTraits::kEventTotalSize = EventTraits::kEventHeaderSize + 1 [static]

The field for the total event size.

Definition at line 60 of file EventTraits.h.

const unsigned int EventTraits::kEventSite = EventTraits::kEventTotalSize + 1 [static]

The field for the total event size.

Definition at line 65 of file EventTraits.h.

const unsigned int EventTraits::kEventDetector = EventTraits::kEventSite + 1 [static]

The field for the detector of the event.

Definition at line 70 of file EventTraits.h.

const unsigned int EventTraits::kEventRun = EventTraits::kEventDetector + 1 [static]

The field for the run number of the event.

Definition at line 75 of file EventTraits.h.

const unsigned int EventTraits::kEventNumber = EventTraits::kEventRun + 1 [static]

The field for the event number of the event.

Definition at line 80 of file EventTraits.h.

const unsigned int EventTraits::kEventDataType = EventTraits::kEventNumber + 1 [static]

The field for the data type of the event.

Definition at line 85 of file EventTraits.h.

const unsigned int EventTraits::kCbltWrapping = EventTraits::kEventDataType + 1 [static]

The field for the wrapped CBLT readout.

Definition at line 90 of file EventTraits.h.

const unsigned int EventTraits::kRawCblt = EventTraits::kCbltWrapping + 1 [static]

The field for the raw CBLT readout.

Definition at line 95 of file EventTraits.h.

const unsigned int EventTraits::kLtbMismatch = EventTraits::kRawCblt + 1 [static]

The field for the trigger mismatch.

Definition at line 100 of file EventTraits.h.

const unsigned int EventTraits::kInvalidData = EventTraits::kLtbMismatch + 1 [static]

The field for the invalid readout.

Definition at line 105 of file EventTraits.h.

const unsigned int EventTraits::kRomHeaderSize = EventTraits::kInvalidData + 1 [static]

The field for the rom fragment header length.

Definition at line 112 of file EventTraits.h.

const unsigned int EventTraits::kRomTotalSize = EventTraits::kRomHeaderSize + 1 [static]

The field for the total rom fragment length.

Definition at line 117 of file EventTraits.h.

const unsigned int EventTraits::kRomSite = EventTraits::kRomTotalSize + 1 [static]

The field for the site of the rom fragment.

Definition at line 122 of file EventTraits.h.

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]

The field for the module type of the rom fragment.

Definition at line 132 of file EventTraits.h.

const unsigned int EventTraits::kRomSlot = EventTraits::kRomModuleType + 1 [static]

The field for the slot of the rom fragment.

Definition at line 137 of file EventTraits.h.

const unsigned int EventTraits::kFeeModule = 0 [static]

The ModuleType of the FEE.

Definition at line 144 of file EventTraits.h.

const unsigned int EventTraits::kFadcModule = EventTraits::kFeeModule + 1 [static]

The ModuleType of the Trigger.

Definition at line 149 of file EventTraits.h.

const unsigned int EventTraits::kLtbModule = EventTraits::kFadcModule + 1 [static]

The ModuleType of the Local Trigger Board.

Definition at line 154 of file EventTraits.h.

const unsigned int EventTraits::kRpcRomModule = EventTraits::kLtbModule + 1 [static]

The ModuleType of the ROM Readout module.

Definition at line 159 of file EventTraits.h.

const unsigned int EventTraits::kRpcRtmModule = EventTraits::kRpcRomModule + 1 [static]

The ModuleType of the ROM Readout module.

Definition at line 164 of file EventTraits.h.

const unsigned int EventTraits::kMtbModule = EventTraits::kRpcRtmModule + 1 [static]

The ModuleType of the Master Trigger Board.

Definition at line 169 of file EventTraits.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:08:24 2011 for EventReadoutFormat by doxygen 1.4.7