/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Friends
DybDaq::EventTraits Class Reference

#include <EventTraits.h>

Inheritance diagram for DybDaq::EventTraits:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::EventTraits:
Collaboration graph
[legend]

List of all members.

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::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 kRpcSortDisabled = EventTraits::kRomSlot + 1
 The field for the RPC Event assemble sort disable.
static const unsigned int kDataSortTimeout = EventTraits::kRpcSortDisabled + 1
 The field for the SFO data stream sort time out.
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 64 of file EventTraits.cc.

                          {
}
EventTraits::EventTraits ( ) [protected]

Creates an instance of this class.

Definition at line 61 of file EventTraits.cc.

                         {
}
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 67 of file EventTraits.cc.

                                              {
    if (0 == m_allTraits.size()) {
        m_allTraits.insert(std::pair<const char*, EventTraits*>(EventTraits_v0_6::key(),new EventTraits_v0_6()));
        m_allTraits.insert(std::pair<const char*, EventTraits*>(EventTraits_v0_7::key(),new EventTraits_v0_7()));
    }
    return *m_allTraits[EventTraits_v0_7::key()];
}
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 75 of file EventTraits.cc.

                                                              {
    const EventTraits& traits = defaultTraits(); 
    const unsigned int major = readUnsignedInt(buffer,
                                               traits,
                                               kMajorVersion);
    const unsigned int minor = readUnsignedInt(buffer,
                                               traits,
                                               kMinorVersion);
    const EventTraits* result = 0;
    if (0U == major && 6U == minor) {
        result = m_allTraits[EventTraits_v0_6::key()];
    } else if (0U == major && 7U == minor) {
        result = m_allTraits[EventTraits_v0_7::key()];
    }
    return result;
}
unsigned int EventTraits::illegalMarker ( ) const [virtual]

Returns the index value for an illegal header.

Implements DybDaq::DaqTraits.

Definition at line 92 of file EventTraits.cc.

                                              {
    return 0xffffffffU;
}
unsigned int EventTraits::illegalField ( ) const [virtual]

Returns the index value for an illegal field.

Implements DybDaq::DaqTraits.

Definition at line 96 of file EventTraits.cc.

                                             {
    return 0xffffffffU;
}
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, and DybDaq::EventTraits_v0_7.

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, and DybDaq::EventTraits_v0_7.

const char * EventTraits::siteAsString ( const unsigned int  site) const

Returns the string for the specified site.

Definition at line 100 of file EventTraits.cc.

                                                                   {
    return siteStrings()[site];
}
const char * EventTraits::detectorAsString ( const unsigned int  detector) const

Returns the string for the specified detector.

Definition at line 104 of file EventTraits.cc.

                                                                           {
    return detectorStrings()[detector];
}
const char * EventTraits::dataTypeAsString ( const unsigned int  dataType) const

Returns the string for the specified dataType.

Definition at line 108 of file EventTraits.cc.

                                                                           {
    return dataTypeStrings()[dataType];
}
unsigned int EventTraits::moduleType ( const unsigned int  module) const

Returns the module type for the specified module, or 0xffffffU.

Definition at line 112 of file EventTraits.cc.

                                                                    {
        if (module > maxModuleType()) {
                return 0;
        }
        return moduleTypes()[module];
}
const char * EventTraits::moduleTypeAsString ( const unsigned int  moduleType) const

Returns the string for the specified module type.

Definition at line 119 of file EventTraits.cc.

                                                                               {
    return moduleTypeStrings()[moduleType];
}
virtual unsigned int DybDaq::EventTraits::maxSite ( ) const [protected, pure virtual]

Returns the maximum site.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the array of site strings.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the maximum detector.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the array of detector strings.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the maximum data type.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the array of data type strings.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the maximum module type.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the array of data type strings.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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

Returns the array of site strings.

Implemented in DybDaq::EventTraits_v0_6, and DybDaq::EventTraits_v0_7.

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.

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::kRpcSortDisabled = EventTraits::kRomSlot + 1 [static]

The field for the RPC Event assemble sort disable.

Definition at line 112 of file EventTraits.h.

The field for the SFO data stream sort time out.

Definition at line 117 of file EventTraits.h.

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

The field for the rom fragment header length.

Definition at line 124 of file EventTraits.h.

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

The field for the total rom fragment length.

Definition at line 129 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 134 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 139 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 144 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 149 of file EventTraits.h.

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

The ModuleType of the FEE.

Definition at line 156 of file EventTraits.h.

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

The ModuleType of the Trigger.

Definition at line 161 of file EventTraits.h.

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

The ModuleType of the Local Trigger Board.

Definition at line 166 of file EventTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 171 of file EventTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 176 of file EventTraits.h.

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

The ModuleType of the Master Trigger Board.

Definition at line 181 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 Fri May 16 2014 09:53:16 for EventReadoutFormat by doxygen 1.7.4