/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_v0_6 Class Reference

#include <EventTraits_v0_6.h>

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

List of all members.

Public Types

typedef std::vector
< BitsDefinition
Definitions

Public Member Functions

 EventTraits_v0_6 ()
 Creates an instance of this class.
virtual ~EventTraits_v0_6 ()
 Destroy this instance of the class.
virtual unsigned int majorVersion () const
virtual unsigned int minorVersion () const
virtual const std::string versionString () const
 Returns the version of the event format as a string.
virtual unsigned int headerSize (const unsigned int marker) const
 Returns the length of the requested marker.
virtual void initializeHeader (const unsigned int marker, char *buffer) const
 Initializes the EventHeader memory with the appropriate markers.
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.
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 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 char * key ()
 Returns a key for this verion, unique with EventTraits.
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

virtual unsigned int markersEnd () const
 Returns the maximum number of headers in an event.
virtual const unsigned int * markers () const
 Returns the markers for the records.
virtual unsigned int fieldsEnd () const
 Returns the maximum field value for a particluar format.
virtual const unsigned int * indices () const
 Returns the indices of shifts for fields.
virtual const unsigned int * shifts () const
 Returns the array of shifts for fields.
virtual const unsigned int * masks () const
 Returns the array of marks for fields.
virtual const std::string * descriptions () const
 Returns the array of descriptions for fields.
virtual DaqTraits::Definitionsdefinitions (unsigned int component) const
 Returns the array of bits definitions for a compement.
virtual void setDefinitions (DaqTraits::Definitions *definitions, unsigned int component)
 Sets the array of bits definitions for a compoment.
virtual const unsigned int * componentFields (unsigned int component) const
 Sets the array of fields for a compoment.
virtual const unsigned int componentFieldsEnd (unsigned int component) const
 Returns the maximum indexthe array of fields for a compoment.
virtual unsigned int maxSite () const
 Returns the maximum site.
virtual const char ** siteStrings () const
 Returns the array of site strings.
virtual unsigned int maxDetector () const
 Returns the maximum detector.
virtual const char ** detectorStrings () const
 Returns the array of detector strings.
virtual unsigned int maxDataType () const
 Returns the maximum data type.
virtual const char ** dataTypeStrings () const
 Returns the array of data type strings.
virtual unsigned int maxModuleType () const
 Returns the maximum module type.
virtual const unsigned int * moduleTypes () const
 Returns the array of module types.
virtual const char ** moduleTypeStrings () const
 Returns the array of site strings.
unsigned int index (unsigned int field) const

Static Protected Member Functions

static unsigned int readUnsignedInt (const char *&buffer, const DaqTraits &traits, unsigned int field)

Private Member Functions

 EventTraits_v0_6 (EventTraits_v0_6 &rhs)
 Suppress default.
EventTraits_v0_6operator= (EventTraits_v0_6 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file EventTraits_v0_6.h.


Constructor & Destructor Documentation

EventTraits_v0_6::EventTraits_v0_6 ( )

Creates an instance of this class.

Definition at line 215 of file EventTraits_v0_6.cc.

                                   {
}
EventTraits_v0_6::~EventTraits_v0_6 ( ) [virtual]

Destroy this instance of the class.

Definition at line 218 of file EventTraits_v0_6.cc.

                                    {
}
DybDaq::EventTraits_v0_6::EventTraits_v0_6 ( EventTraits_v0_6 rhs) [private]

Suppress default.


Member Function Documentation

const char * EventTraits_v0_6::key ( ) [static]

Returns a key for this verion, unique with EventTraits.

Definition at line 211 of file EventTraits_v0_6.cc.

                                  {
        return "Event Format 0.6";
}
unsigned int EventTraits_v0_6::majorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 221 of file EventTraits_v0_6.cc.

                                                  {
        return 0U;
}
unsigned int EventTraits_v0_6::minorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 225 of file EventTraits_v0_6.cc.

                                                  {
        return 6U;
}
const string EventTraits_v0_6::versionString ( ) const [virtual]

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 229 of file EventTraits_v0_6.cc.

                                                   {
        return key();
}
unsigned int EventTraits_v0_6::headerSize ( const unsigned int  marker) const [virtual]

Returns the length of the requested marker.

Implements DybDaq::EventTraits.

Definition at line 233 of file EventTraits_v0_6.cc.

                                                                         {
        if (marker >= markersEnd()) {
                return illegalMarker();
        }
        return m_headerLengths[marker];
}
void EventTraits_v0_6::initializeHeader ( const unsigned int  marker,
char *  buffer 
) const [virtual]

Initializes the EventHeader memory with the appropriate markers.

Implements DybDaq::EventTraits.

Definition at line 240 of file EventTraits_v0_6.cc.

                                                            {
    for (unsigned int count = 0;
         count != headerSize(markerToInit);
         ++count) {
        *((unsigned int*)(buffer + (count * DaqBuffer::kBytesInInt))) = 0x00000000U; // Header four bytes
    }
    *((unsigned int*)buffer) = marker(markerToInit);
    if (markerToInit == kEventHeader) {
        *(((unsigned int*)buffer) + index(EventTraits::kEventDetector)) = 0xC0000000U;
    }
}
unsigned int EventTraits_v0_6::markersEnd ( ) const [protected, virtual]

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 253 of file EventTraits_v0_6.cc.

                                                {
    return kRomHeader + 1;
}
const unsigned int * EventTraits_v0_6::markers ( ) const [protected, virtual]

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 257 of file EventTraits_v0_6.cc.

                                                    {
    return m_markers;
}
unsigned int EventTraits_v0_6::fieldsEnd ( ) const [protected, virtual]

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 261 of file EventTraits_v0_6.cc.

                                               {
        return kRomSlot + 1;
}
const unsigned int * EventTraits_v0_6::indices ( ) const [protected, virtual]

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 265 of file EventTraits_v0_6.cc.

                                                    {
        return m_indices;
}
const unsigned int * EventTraits_v0_6::shifts ( ) const [protected, virtual]

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 269 of file EventTraits_v0_6.cc.

                                                   {
        return m_shifts;
}
const unsigned int * EventTraits_v0_6::masks ( ) const [protected, virtual]

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 273 of file EventTraits_v0_6.cc.

                                                  {
        return m_masks;
}
const std::string * EventTraits_v0_6::descriptions ( ) const [protected, virtual]

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 277 of file EventTraits_v0_6.cc.

                                                      {
    return m_description;
}
DaqTraits::Definitions * EventTraits_v0_6::definitions ( unsigned int  component) const [protected, virtual]

Returns the array of bits definitions for a compement.

Reimplemented from DybDaq::DaqTraits.

Definition at line 281 of file EventTraits_v0_6.cc.

                                                                                {
    return m_definitions[component];
}
void EventTraits_v0_6::setDefinitions ( DaqTraits::Definitions definitions,
unsigned int  component 
) [protected, virtual]

Sets the array of bits definitions for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 285 of file EventTraits_v0_6.cc.

                                                              {
    m_definitions[component] = definitions;
}
const unsigned int * EventTraits_v0_6::componentFields ( unsigned int  component) const [protected, virtual]

Sets the array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 290 of file EventTraits_v0_6.cc.

                                                                                  {
    return m_componentFields[component];
}
const unsigned int EventTraits_v0_6::componentFieldsEnd ( unsigned int  component) const [protected, virtual]

Returns the maximum indexthe array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 294 of file EventTraits_v0_6.cc.

                                                                                    {
    return m_componentFieldsEnd[component];
}
unsigned int EventTraits_v0_6::maxSite ( ) const [protected, virtual]

Returns the maximum site.

Implements DybDaq::EventTraits.

Definition at line 298 of file EventTraits_v0_6.cc.

                                             {
        return 7U;
}
const char ** EventTraits_v0_6::siteStrings ( ) const [protected, virtual]

Returns the array of site strings.

Implements DybDaq::EventTraits.

Definition at line 302 of file EventTraits_v0_6.cc.

                                                 {
    return m_sites;
}
unsigned int EventTraits_v0_6::maxDetector ( ) const [protected, virtual]

Returns the maximum detector.

Implements DybDaq::EventTraits.

Definition at line 306 of file EventTraits_v0_6.cc.

                                                 {
        return 7U;
}
const char ** EventTraits_v0_6::detectorStrings ( ) const [protected, virtual]

Returns the array of detector strings.

Implements DybDaq::EventTraits.

Definition at line 310 of file EventTraits_v0_6.cc.

                                                     {
    return m_detectors;
}
unsigned int EventTraits_v0_6::maxDataType ( ) const [protected, virtual]

Returns the maximum data type.

Implements DybDaq::EventTraits.

Definition at line 314 of file EventTraits_v0_6.cc.

                                                 {
        return 3U;
}
const char ** EventTraits_v0_6::dataTypeStrings ( ) const [protected, virtual]

Returns the array of data type strings.

Implements DybDaq::EventTraits.

Definition at line 318 of file EventTraits_v0_6.cc.

                                                     {
    return m_dataTypes;
}
unsigned int EventTraits_v0_6::maxModuleType ( ) const [protected, virtual]

Returns the maximum module type.

Implements DybDaq::EventTraits.

Definition at line 322 of file EventTraits_v0_6.cc.

                                                   {
    return kMtbModule;
}
const unsigned int * EventTraits_v0_6::moduleTypes ( ) const [protected, virtual]

Returns the array of module types.

Implements DybDaq::EventTraits.

Definition at line 326 of file EventTraits_v0_6.cc.

                                                        {
        return m_moduleTypes;
}
const char ** EventTraits_v0_6::moduleTypeStrings ( ) const [protected, virtual]

Returns the array of site strings.

Implements DybDaq::EventTraits.

Definition at line 330 of file EventTraits_v0_6.cc.

                                                       {
    return m_moduleTypeStrings;
}
EventTraits_v0_6& DybDaq::EventTraits_v0_6::operator= ( EventTraits_v0_6 rhs) [private]

Suppress default.

const EventTraits & EventTraits::defaultTraits ( ) [static, inherited]

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, inherited]

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, inherited]

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, inherited]

Returns the index value for an illegal field.

Implements DybDaq::DaqTraits.

Definition at line 96 of file EventTraits.cc.

                                             {
    return 0xffffffffU;
}
const char * EventTraits::siteAsString ( const unsigned int  site) const [inherited]

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 [inherited]

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 [inherited]

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 [inherited]

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 [inherited]

Returns the string for the specified module type.

Definition at line 119 of file EventTraits.cc.

                                                                               {
    return moduleTypeStrings()[moduleType];
}

Member Data Documentation

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

The Event Header block.

Definition at line 26 of file EventTraits.h.

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

The ROM Header block.

Definition at line 31 of file EventTraits.h.

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

The merker for the header.

Definition at line 38 of file EventTraits.h.

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

The field for the major version number.

Definition at line 45 of file EventTraits.h.

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

The field for the minor version number.

Definition at line 50 of file EventTraits.h.

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

The field for the event header size.

Definition at line 55 of file EventTraits.h.

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

The field for the total event size.

Definition at line 60 of file EventTraits.h.

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

The field for the total event size.

Definition at line 65 of file EventTraits.h.

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

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, inherited]

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, inherited]

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, inherited]

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, inherited]

The field for the wrapped CBLT readout.

Definition at line 90 of file EventTraits.h.

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

The field for the raw CBLT readout.

Definition at line 95 of file EventTraits.h.

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

The field for the trigger mismatch.

Definition at line 100 of file EventTraits.h.

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

The field for the invalid readout.

Definition at line 105 of file EventTraits.h.

const unsigned int EventTraits::kRpcSortDisabled = EventTraits::kRomSlot + 1 [static, inherited]

The field for the RPC Event assemble sort disable.

Definition at line 112 of file EventTraits.h.

const unsigned int EventTraits::kDataSortTimeout = EventTraits::kRpcSortDisabled + 1 [static, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

The field for the slot of the rom fragment.

Definition at line 149 of file EventTraits.h.

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

The ModuleType of the FEE.

Definition at line 156 of file EventTraits.h.

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

The ModuleType of the Trigger.

Definition at line 161 of file EventTraits.h.

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

The ModuleType of the Local Trigger Board.

Definition at line 166 of file EventTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 171 of file EventTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 176 of file EventTraits.h.

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

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