#include <CbltTraits_v1_3.h>
Inheritance diagram for DybDaq::CbltTraits_v1_3:
Public Types | |
typedef std::vector< BitsDefinition > | Definitions |
Public Member Functions | |
CbltTraits_v1_3 () | |
Creates an instance of this class. | |
virtual | ~CbltTraits_v1_3 () |
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::Definitions & | bitsDefinitions (unsigned int component) const |
Static Public Member Functions | |
static const char * | key () |
Returns a key for this verion, unique with CbltTraits. | |
static const CbltTraits & | defaultTraits () |
Returns a new default LtbTraits to bootstrap the system. | |
static const CbltTraits * | 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 | 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::Definitions * | definitions (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_v1_3 (CbltTraits_v1_3 &rhs) | |
Suppress default. | |
CbltTraits_v1_3 & | operator= (CbltTraits_v1_3 &rhs) |
Suppress default. | |
Friends | |
friend class | DaqBuffer |
Definition at line 8 of file CbltTraits_v1_3.h.
CbltTraits_v1_3::CbltTraits_v1_3 | ( | ) |
CbltTraits_v1_3::~CbltTraits_v1_3 | ( | ) | [virtual] |
DybDaq::CbltTraits_v1_3::CbltTraits_v1_3 | ( | CbltTraits_v1_3 & | rhs | ) | [private] |
Suppress default.
const char * CbltTraits_v1_3::key | ( | ) | [static] |
Returns a key for this verion, unique with CbltTraits.
Definition at line 93 of file CbltTraits_v1_3.cc.
unsigned int CbltTraits_v1_3::majorVersion | ( | ) | const [virtual] |
unsigned int CbltTraits_v1_3::minorVersion | ( | ) | const [virtual] |
const string CbltTraits_v1_3::versionString | ( | ) | const [virtual] |
Returns the version of the event format as a string.
Implements DybDaq::DaqTraits.
Definition at line 111 of file CbltTraits_v1_3.cc.
00111 { 00112 return key(); 00113 }
unsigned int CbltTraits_v1_3::markersEnd | ( | ) | const [protected, virtual] |
Returns the maximum number of headers in an event.
Implements DybDaq::DaqTraits.
Definition at line 115 of file CbltTraits_v1_3.cc.
const unsigned int * CbltTraits_v1_3::markers | ( | ) | const [protected, virtual] |
Returns the markers for the records.
Implements DybDaq::DaqTraits.
Definition at line 119 of file CbltTraits_v1_3.cc.
unsigned int CbltTraits_v1_3::fieldsEnd | ( | ) | const [protected, virtual] |
Returns the maximum field value for a particluar format.
Implements DybDaq::DaqTraits.
Definition at line 123 of file CbltTraits_v1_3.cc.
00123 { 00124 return kMinorVersion + 1; 00125 }
const unsigned int * CbltTraits_v1_3::indices | ( | ) | const [protected, virtual] |
Returns the indices of shifts for fields.
Implements DybDaq::DaqTraits.
Definition at line 127 of file CbltTraits_v1_3.cc.
00127 { 00128 return m_indices; 00129 }
const unsigned int * CbltTraits_v1_3::shifts | ( | ) | const [protected, virtual] |
Returns the array of shifts for fields.
Implements DybDaq::DaqTraits.
Definition at line 131 of file CbltTraits_v1_3.cc.
00131 { 00132 return m_shifts; 00133 }
const unsigned int * CbltTraits_v1_3::masks | ( | ) | const [protected, virtual] |
Returns the array of marks for fields.
Implements DybDaq::DaqTraits.
Definition at line 135 of file CbltTraits_v1_3.cc.
00135 { 00136 return m_masks; 00137 }
const std::string * CbltTraits_v1_3::descriptions | ( | ) | const [protected, virtual] |
Returns the array of descriptions for fields.
Reimplemented from DybDaq::DaqTraits.
Definition at line 139 of file CbltTraits_v1_3.cc.
00139 { 00140 return m_description; 00141 }
DaqTraits::Definitions * CbltTraits_v1_3::definitions | ( | unsigned int | component | ) | const [protected, virtual] |
Returns the array of bits definitions for a compement.
Reimplemented from DybDaq::DaqTraits.
Definition at line 143 of file CbltTraits_v1_3.cc.
00143 { 00144 return m_definitions[component]; 00145 }
void CbltTraits_v1_3::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 147 of file CbltTraits_v1_3.cc.
00148 { 00149 m_definitions[component] = definitions; 00150 }
const unsigned int * CbltTraits_v1_3::componentFields | ( | unsigned int | component | ) | const [protected, virtual] |
Sets the array of fields for a compoment.
Reimplemented from DybDaq::DaqTraits.
Definition at line 152 of file CbltTraits_v1_3.cc.
00152 { 00153 return m_componentFields[component]; 00154 }
const unsigned int CbltTraits_v1_3::componentFieldsEnd | ( | unsigned int | component | ) | const [protected, virtual] |
Returns the maximum indexthe array of fields for a compoment.
Reimplemented from DybDaq::DaqTraits.
Definition at line 156 of file CbltTraits_v1_3.cc.
00156 { 00157 return m_componentFieldsEnd[component]; 00158 }
unsigned int CbltTraits_v1_3::maxModuleType | ( | ) | const [protected, virtual] |
Returns the maximum module type.
Implements DybDaq::CbltTraits.
Definition at line 160 of file CbltTraits_v1_3.cc.
const unsigned int * CbltTraits_v1_3::moduleTypes | ( | ) | const [protected, virtual] |
Returns the array of data type strings.
Implements DybDaq::CbltTraits.
Definition at line 164 of file CbltTraits_v1_3.cc.
00164 { 00165 return m_moduleTypes; 00166 }
const char ** CbltTraits_v1_3::moduleTypeStrings | ( | ) | const [protected, virtual] |
Returns the array of site strings.
Implements DybDaq::CbltTraits.
Definition at line 168 of file CbltTraits_v1_3.cc.
00168 { 00169 return m_moduleTypeStrings; 00170 }
unsigned int CbltTraits_v1_3::headSize | ( | ) | const [protected, virtual] |
Returns the size of a CbltHead in this format.
Implements DybDaq::CbltTraits.
Definition at line 172 of file CbltTraits_v1_3.cc.
unsigned int CbltTraits_v1_3::footSize | ( | ) | const [protected, virtual] |
Returns the size of a CbltFoot in this format.
Implements DybDaq::CbltTraits.
Definition at line 176 of file CbltTraits_v1_3.cc.
void CbltTraits_v1_3::initializeHead | ( | char * | buffer | ) | const [protected, virtual] |
Initializes the CbltHead memory with the appropriate markers.
Implements DybDaq::CbltTraits.
Definition at line 180 of file CbltTraits_v1_3.cc.
void CbltTraits_v1_3::initializeFoot | ( | char * | buffer | ) | const [protected, virtual] |
Initializes the CbltFoot memory with the appropriate markers.
Implements DybDaq::CbltTraits.
Definition at line 184 of file CbltTraits_v1_3.cc.
CbltTraits_v1_3& DybDaq::CbltTraits_v1_3::operator= | ( | CbltTraits_v1_3 & | 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.
00051 { 00052 if (0 == m_allTraits.size()) { 00053 m_allTraits.insert(std::pair<const char*, CbltTraits*>(CbltTraits_v0_0::key(),new CbltTraits_v0_0())); 00054 } 00055 return *m_allTraits[CbltTraits_v0_0::key()]; 00056 }
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.
00058 { 00059 defaultTraits(); // Initializes traits' map 00060 return m_allTraits[CbltTraits_v0_0::key()]; 00061 /* 00062 const unsigned int major = readUnsignedInt(buffer, 00063 defaultTraits(), 00064 CbltTraits::kMajorVersion); 00065 const unsigned int minor = readUnsignedInt(buffer, 00066 defaultTraits(), 00067 CbltTraits::kMinorVersion); 00068 const CbltTraits* result = 0; 00069 if (0U == major && 0U == minor) { 00070 result = m_allTraits[CbltTraits_v0_0::key()]; 00071 } else if (1U == major && 3U == minor) { 00072 result = m_allTraits[CbltTraits_v1_3::key()]; 00073 } 00074 return result; 00075 */ 00076 }
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.
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.
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.
00086 { 00087 if (module > maxModuleType()) { 00088 return 0xffffffffU; 00089 } 00090 return moduleTypes()[module]; 00091 }
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.
00093 { 00094 return moduleTypeStrings()[moduleType]; 00095 }
const unsigned int CbltTraits::kHead = 0 [static, inherited] |
const unsigned int CbltTraits::kBody = CbltTraits::kHead + 1 [static, inherited] |
const unsigned int CbltTraits::kFoot = CbltTraits::kBody + 1 [static, inherited] |
const unsigned int CbltTraits::kHeadModuleAddress = 0 [static, inherited] |
const unsigned int CbltTraits::kHeadModuleType = CbltTraits::kHeadModuleAddress + 1 [static, inherited] |
const unsigned int CbltTraits::kFootModuleAddress = CbltTraits::kHeadModuleType + 1 [static, inherited] |
const unsigned int CbltTraits::kFootDataLength = CbltTraits::kFootModuleAddress + 1 [static, inherited] |
const unsigned int CbltTraits::kMajorVersion = CbltTraits::kFootDataLength + 1 [static, inherited] |
const unsigned int CbltTraits::kMinorVersion = CbltTraits::kMajorVersion + 1 [static, inherited] |
const unsigned int CbltTraits::kFeeModule = 0 [static, inherited] |
const unsigned int CbltTraits::kFadcModule = CbltTraits::kFeeModule + 1 [static, inherited] |
const unsigned int CbltTraits::kLtbModule = CbltTraits::kFadcModule + 1 [static, inherited] |
const unsigned int CbltTraits::kRpcRomModule = CbltTraits::kLtbModule + 1 [static, inherited] |
const unsigned int CbltTraits::kRpcRtmModule = CbltTraits::kRpcRomModule + 1 [static, inherited] |
const unsigned int CbltTraits::kMtbModule = CbltTraits::kRpcRtmModule + 1 [static, inherited] |