/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::CbltTraits_v0_0 Class Reference

#include <CbltTraits_v0_0.h>

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

List of all members.

Public Types

typedef std::vector
< BitsDefinition
Definitions

Public Member Functions

 CbltTraits_v0_0 ()
 Creates an instance of this class.
virtual ~CbltTraits_v0_0 ()
 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 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 moduleType (unsigned int module) const
 Returns the module type for the specified module, or 0xffffffU.
virtual const char * moduleTypeAsString (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 CbltTraits.
static const CbltTraitsdefaultTraits ()
 Returns a new default LtbTraits to bootstrap the system.
static const CbltTraitsreadTraits (const char *&buffer)
 Returns a new LtbTraits if the supplied traits do not match the current one.

Static Public Attributes

static const unsigned int kHead = 0
 The head component for this format.
static const unsigned int kBody = CbltTraits::kHead + 1
 The body component for this format.
static const unsigned int kFoot = CbltTraits::kBody + 1
 The foot component for this format.
static const unsigned int kHeadModuleAddress = 0
 The field for the module address.
static const unsigned int kHeadModuleType = CbltTraits::kHeadModuleAddress + 1
 The field for the module type.
static const unsigned int kFootModuleAddress = CbltTraits::kHeadModuleType + 1
 The field for the module address.
static const unsigned int kFootDataLength = CbltTraits::kFootModuleAddress + 1
 The field for the module type.
static const unsigned int kMajorVersion = CbltTraits::kFootDataLength + 1
 The field for the major version.
static const unsigned int kMinorVersion = CbltTraits::kMajorVersion + 1
 The field for the minor version.
static const unsigned int kFeeModule = 0
 The ModuleType of the FEE.
static const unsigned int kFadcModule = CbltTraits::kFeeModule + 1
 The ModuleType of the Trigger.
static const unsigned int kLtbModule = CbltTraits::kFadcModule + 1
 The ModuleType of the Local Trigger Board.
static const unsigned int kRpcRomModule = CbltTraits::kLtbModule + 1
 The ModuleType of the ROM Readout module.
static const unsigned int kRpcRtmModule = CbltTraits::kRpcRomModule + 1
 The ModuleType of the ROM Readout module.
static const unsigned int kMtbModule = CbltTraits::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 maxModuleType () const
 Returns the maximum module type.
virtual const unsigned int * moduleTypes () const
 Returns the array of data type strings.
virtual const char ** moduleTypeStrings () const
 Returns the array of site strings.
virtual unsigned int headSize () const
 Returns the size of a CbltHead in this format.
virtual unsigned int footSize () const
 Returns the size of a CbltFoot in this format.
virtual void initializeHead (char *buffer) const
 Initializes the CbltHead memory with the appropriate markers.
virtual void initializeFoot (char *buffer) const
 Initializes the CbltFoot memory with the appropriate markers.
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

 CbltTraits_v0_0 (CbltTraits_v0_0 &rhs)
 Suppress default.
CbltTraits_v0_0operator= (CbltTraits_v0_0 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file CbltTraits_v0_0.h.


Constructor & Destructor Documentation

CbltTraits_v0_0::CbltTraits_v0_0 ( )

Creates an instance of this class.

Definition at line 100 of file CbltTraits_v0_0.cc.

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

Destroy this instance of the class.

Definition at line 103 of file CbltTraits_v0_0.cc.

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

Suppress default.


Member Function Documentation

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

Returns a key for this verion, unique with CbltTraits.

Definition at line 96 of file CbltTraits_v0_0.cc.

                                 {
        return "CBLT Format 0.0";
}
unsigned int CbltTraits_v0_0::majorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 106 of file CbltTraits_v0_0.cc.

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

Implements DybDaq::DaqTraits.

Definition at line 110 of file CbltTraits_v0_0.cc.

                                                 {
        return 0U;
}
const string CbltTraits_v0_0::versionString ( ) const [virtual]

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 114 of file CbltTraits_v0_0.cc.

                                                  {
        return key();
}
unsigned int CbltTraits_v0_0::markersEnd ( ) const [protected, virtual]

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 118 of file CbltTraits_v0_0.cc.

                                               {
    return 0U;
}
const unsigned int * CbltTraits_v0_0::markers ( ) const [protected, virtual]

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 122 of file CbltTraits_v0_0.cc.

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

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 126 of file CbltTraits_v0_0.cc.

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

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 130 of file CbltTraits_v0_0.cc.

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

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 134 of file CbltTraits_v0_0.cc.

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

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 138 of file CbltTraits_v0_0.cc.

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

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 142 of file CbltTraits_v0_0.cc.

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

Returns the array of bits definitions for a compement.

Reimplemented from DybDaq::DaqTraits.

Definition at line 146 of file CbltTraits_v0_0.cc.

                                                                               {
    return m_definitions[component];
}
void CbltTraits_v0_0::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 150 of file CbltTraits_v0_0.cc.

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

Sets the array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 155 of file CbltTraits_v0_0.cc.

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

Returns the maximum indexthe array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 159 of file CbltTraits_v0_0.cc.

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

Returns the maximum module type.

Implements DybDaq::CbltTraits.

Definition at line 163 of file CbltTraits_v0_0.cc.

                                                  {
    return 6U;
}
const unsigned int * CbltTraits_v0_0::moduleTypes ( ) const [protected, virtual]

Returns the array of data type strings.

Implements DybDaq::CbltTraits.

Definition at line 167 of file CbltTraits_v0_0.cc.

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

Returns the array of site strings.

Implements DybDaq::CbltTraits.

Definition at line 171 of file CbltTraits_v0_0.cc.

                                                      {
    return m_moduleTypeStrings;
}
unsigned int CbltTraits_v0_0::headSize ( ) const [protected, virtual]

Returns the size of a CbltHead in this format.

Implements DybDaq::CbltTraits.

Definition at line 175 of file CbltTraits_v0_0.cc.

                                             {
    return 1U;
}
unsigned int CbltTraits_v0_0::footSize ( ) const [protected, virtual]

Returns the size of a CbltFoot in this format.

Implements DybDaq::CbltTraits.

Definition at line 179 of file CbltTraits_v0_0.cc.

                                             {
    return 1U;
}
void CbltTraits_v0_0::initializeHead ( char *  buffer) const [protected, virtual]

Initializes the CbltHead memory with the appropriate markers.

Implements DybDaq::CbltTraits.

Definition at line 183 of file CbltTraits_v0_0.cc.

                                                       {
    *((unsigned int*)buffer)       = 0x20000000U; // Head four bytes
}
void CbltTraits_v0_0::initializeFoot ( char *  buffer) const [protected, virtual]

Initializes the CbltFoot memory with the appropriate markers.

Implements DybDaq::CbltTraits.

Definition at line 187 of file CbltTraits_v0_0.cc.

                                                       {
    *((unsigned int*)buffer)       = 0xc0000000U; // Foot four bytes
}
CbltTraits_v0_0& DybDaq::CbltTraits_v0_0::operator= ( CbltTraits_v0_0 rhs) [private]

Suppress default.

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

Returns a new default LtbTraits to bootstrap the system.

Definition at line 51 of file CbltTraits.cc.

                                            {
    if (0 == m_allTraits.size()) {
        m_allTraits.insert(std::pair<const char*, CbltTraits*>(CbltTraits_v0_0::key(),new CbltTraits_v0_0()));
    }
    return *m_allTraits[CbltTraits_v0_0::key()];
}
const CbltTraits * CbltTraits::readTraits ( const char *&  buffer) [static, inherited]

Returns a new LtbTraits if the supplied traits do not match the current one.

Definition at line 58 of file CbltTraits.cc.

                                                       {
    defaultTraits(); // Initializes traits' map
    return m_allTraits[CbltTraits_v0_0::key()];
    /*
    const unsigned int major = readUnsignedInt(buffer,
                                               defaultTraits(),
                                               CbltTraits::kMajorVersion);
    const unsigned int minor = readUnsignedInt(buffer,
                                               defaultTraits(),
                                               CbltTraits::kMinorVersion);
    const CbltTraits* result = 0;
    if (0U == major && 0U == minor) {
        result = m_allTraits[CbltTraits_v0_0::key()];
    } else if (1U == major && 3U == minor) {
        result = m_allTraits[CbltTraits_v1_3::key()];
    }
    return result;
    */
}
unsigned int CbltTraits::illegalMarker ( ) const [virtual, inherited]

Returns the index value for an illegal header.

Implements DybDaq::DaqTraits.

Definition at line 78 of file CbltTraits.cc.

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

Returns the index value for an illegal field.

Implements DybDaq::DaqTraits.

Definition at line 82 of file CbltTraits.cc.

                                            {
    return 0xffffffffU;
}
unsigned int CbltTraits::moduleType ( unsigned int  module) const [virtual, inherited]

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

Definition at line 86 of file CbltTraits.cc.

                                                             {
        if (module > maxModuleType()) {
                return 0xffffffffU;
        }
        return moduleTypes()[module];
}
const char * CbltTraits::moduleTypeAsString ( unsigned int  moduleType) const [virtual, inherited]

Returns the string for the specified module type.

Definition at line 93 of file CbltTraits.cc.

                                                                        {
    return moduleTypeStrings()[moduleType];
}

Member Data Documentation

const unsigned int CbltTraits::kHead = 0 [static, inherited]

The head component for this format.

Definition at line 24 of file CbltTraits.h.

const unsigned int CbltTraits::kBody = CbltTraits::kHead + 1 [static, inherited]

The body component for this format.

Definition at line 29 of file CbltTraits.h.

const unsigned int CbltTraits::kFoot = CbltTraits::kBody + 1 [static, inherited]

The foot component for this format.

Definition at line 34 of file CbltTraits.h.

const unsigned int CbltTraits::kHeadModuleAddress = 0 [static, inherited]

The field for the module address.

Definition at line 39 of file CbltTraits.h.

const unsigned int CbltTraits::kHeadModuleType = CbltTraits::kHeadModuleAddress + 1 [static, inherited]

The field for the module type.

Definition at line 44 of file CbltTraits.h.

const unsigned int CbltTraits::kFootModuleAddress = CbltTraits::kHeadModuleType + 1 [static, inherited]

The field for the module address.

Definition at line 49 of file CbltTraits.h.

const unsigned int CbltTraits::kFootDataLength = CbltTraits::kFootModuleAddress + 1 [static, inherited]

The field for the module type.

Definition at line 54 of file CbltTraits.h.

const unsigned int CbltTraits::kMajorVersion = CbltTraits::kFootDataLength + 1 [static, inherited]

The field for the major version.

Definition at line 59 of file CbltTraits.h.

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

The field for the minor version.

Definition at line 64 of file CbltTraits.h.

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

The ModuleType of the FEE.

Definition at line 71 of file CbltTraits.h.

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

The ModuleType of the Trigger.

Definition at line 76 of file CbltTraits.h.

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

The ModuleType of the Local Trigger Board.

Definition at line 81 of file CbltTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 86 of file CbltTraits.h.

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

The ModuleType of the ROM Readout module.

Definition at line 91 of file CbltTraits.h.

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

The ModuleType of the Master Trigger Board.

Definition at line 96 of file CbltTraits.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:11 for CbltReadoutFormat by doxygen 1.7.4