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

In This Package:

DybDaq::FeeTraits_v0_2 Class Reference

#include <FeeTraits_v0_2.h>

Inheritance diagram for DybDaq::FeeTraits_v0_2:

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

Public Types

typedef std::vector< BitsDefinitionDefinitions

Public Member Functions

 FeeTraits_v0_2 ()
 Creates an instance of this class.
virtual ~FeeTraits_v0_2 ()
 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 headSize () const
 Returns the size of a FeeHead in this format.
virtual unsigned int hitSize () const
 Returns the size of a fee hit in this format.
virtual unsigned int footSize () const
 Returns the size of a FeeFoot in this format.
virtual void initializeHead (char *buffer) const
 Initializes the FeeHead memory with the appropriate markers.
virtual void initializeHit (char *buffer) const
 Initializes the FeeHit memory with the appropriate markers.
virtual void initializeFoot (char *buffer) const
 Initializes the FeeFoot 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.
virtual const char * triggerTypeAsString (unsigned int triggerType) const
 Returns the string for the specified trigger 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 FeeTraits.
static const FeeTraitsdefaultTraits ()
 Returns a default FeeTraits to bootstrap the system.
static const FeeTraitsreadTraits (const char *&buffer)
 Returns the FeeTraits to use given the supplied buffer.

Static Public Attributes

static const unsigned int kHead = 0
 The head component for this format.
static const unsigned int kHit = FeeTraits::kHead + 1
 The hit component for this format.
static const unsigned int kFoot = FeeTraits::kHit + 1
 The foot component for this format.
static const unsigned int kHeadTriggerNumber = 0
 The field for the trigger number in the head.
static const unsigned int kTriggerType = FeeTraits::kHeadTriggerNumber + 1
 The field for the trigger type.
static const unsigned int kChecked = FeeTraits::kTriggerType + 1
 The field for the checked flag.
static const unsigned int kError = FeeTraits::kChecked + 1
 The field for the error flag.
static const unsigned int kChargeChannelId = FeeTraits::kError + 1
 The field for the channel id for the charge.
static const unsigned int kPeakCycle = FeeTraits::kChargeChannelId + 1
 The field for the peak cycle.
static const unsigned int kHighRangeAdc = FeeTraits::kPeakCycle + 1
 The field for the the high ADC range.
static const unsigned int kAdc = FeeTraits::kHighRangeAdc + 1
 The field for the measured ADC value.
static const unsigned int kTimeChannelId = FeeTraits::kAdc + 1
 The field for the channel id for the charge.
static const unsigned int kHitNumber = FeeTraits::kTimeChannelId + 1
 The field for the hit number within the trigger (counting backwards).
static const unsigned int kTdc = FeeTraits::kHitNumber + 1
 The field for the measured TDC value.
static const unsigned int kFootTriggerNumber = FeeTraits::kTdc + 1
 The field for the trigger number in the foot.
static const unsigned int kFootDataLength = FeeTraits::kFootTriggerNumber + 1
 The field for the trigger type.
static const unsigned int kMajorVersion = FeeTraits::kFootDataLength + 1
 The field for the major version.
static const unsigned int kMinorVersion = FeeTraits::kMajorVersion + 1
 The field for the minor version.
static const unsigned int kPreAdc = FeeTraits::kMinorVersion + 1
 The field for measured pre-ADC value.
static const unsigned int kHeadMarker = FeeTraits::kPreAdc + 1
 The field for the head marker.
static const unsigned int kAdcDataMarker = FeeTraits::kHeadMarker + 1
 The field for the ADC data marker.
static const unsigned int kTdcDataMarker = FeeTraits::kAdcDataMarker + 1
 The field for the TDC data marker.
static const unsigned int kFootMarker = FeeTraits::kTdcDataMarker + 1
 The field for the foot marker.

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 triggerTypeEnd () const
 Returns the maximum trigger type.
virtual const char ** triggerTypeStrings () const
 Returns the array of trigger type 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

 FeeTraits_v0_2 (FeeTraits_v0_2 &rhs)
 Suppress default.
FeeTraits_v0_2operator= (FeeTraits_v0_2 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file FeeTraits_v0_2.h.


Constructor & Destructor Documentation

FeeTraits_v0_2::FeeTraits_v0_2 (  ) 

Creates an instance of this class.

Definition at line 165 of file FeeTraits_v0_2.cc.

00165                                {
00166 }

FeeTraits_v0_2::~FeeTraits_v0_2 (  )  [virtual]

Destroy this instance of the class.

Definition at line 168 of file FeeTraits_v0_2.cc.

00168                                 {
00169 }

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

Suppress default.


Member Function Documentation

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

Returns a key for this verion, unique with FeeTraits.

Definition at line 161 of file FeeTraits_v0_2.cc.

00161                                 {
00162         return "FEE Format 0.2";
00163 }

unsigned int FeeTraits_v0_2::majorVersion (  )  const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 171 of file FeeTraits_v0_2.cc.

00171                                                 {
00172         return 0U;
00173 }

unsigned int FeeTraits_v0_2::minorVersion (  )  const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 175 of file FeeTraits_v0_2.cc.

00175                                                 {
00176         return 2U;
00177 }

const string FeeTraits_v0_2::versionString (  )  const [virtual]

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 179 of file FeeTraits_v0_2.cc.

00179                                                  {
00180         return key();
00181 }

unsigned int FeeTraits_v0_2::headSize (  )  const [virtual]

Returns the size of a FeeHead in this format.

Implements DybDaq::FeeTraits.

Definition at line 183 of file FeeTraits_v0_2.cc.

00183                                             {
00184     return 1U;
00185 }

unsigned int FeeTraits_v0_2::hitSize (  )  const [virtual]

Returns the size of a fee hit in this format.

Implements DybDaq::FeeTraits.

Definition at line 187 of file FeeTraits_v0_2.cc.

00187                                            {
00188     return 2U;
00189 }

unsigned int FeeTraits_v0_2::footSize (  )  const [virtual]

Returns the size of a FeeFoot in this format.

Implements DybDaq::FeeTraits.

Definition at line 191 of file FeeTraits_v0_2.cc.

00191                                             {
00192     return 1U;
00193 }

void FeeTraits_v0_2::initializeHead ( char *  buffer  )  const [virtual]

Initializes the FeeHead memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 195 of file FeeTraits_v0_2.cc.

00195                                                       {
00196     *((unsigned int*)buffer)       = 0x41000000U; // Head four bytes
00197 }

void FeeTraits_v0_2::initializeHit ( char *  buffer  )  const [virtual]

Initializes the FeeHit memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 199 of file FeeTraits_v0_2.cc.

00199                                                      {
00200     *((unsigned int*)buffer)       = 0x60000000U; // ADC four bytes
00201     *((unsigned int*)(buffer + 4)) = 0x80000000U; // TDC four bytes
00202 }

void FeeTraits_v0_2::initializeFoot ( char *  buffer  )  const [virtual]

Initializes the FeeFoot memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 204 of file FeeTraits_v0_2.cc.

00204                                                       {
00205     *((unsigned int*)buffer)       = 0xa0000000U; // Foot four bytes
00206 }

unsigned int FeeTraits_v0_2::markersEnd (  )  const [protected, virtual]

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 208 of file FeeTraits_v0_2.cc.

00208                                               {
00209     return 0U;
00210 }

const unsigned int * FeeTraits_v0_2::markers (  )  const [protected, virtual]

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 212 of file FeeTraits_v0_2.cc.

00212                                                   {
00213     return 0;
00214 }

unsigned int FeeTraits_v0_2::fieldsEnd (  )  const [protected, virtual]

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 216 of file FeeTraits_v0_2.cc.

00216                                              {
00217         return kFootMarker + 1;
00218 }

const unsigned int * FeeTraits_v0_2::indices (  )  const [protected, virtual]

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 220 of file FeeTraits_v0_2.cc.

00220                                                   {
00221         return m_indices;
00222 }

const unsigned int * FeeTraits_v0_2::shifts (  )  const [protected, virtual]

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 224 of file FeeTraits_v0_2.cc.

00224                                                  {
00225         return m_shifts;
00226 }

const unsigned int * FeeTraits_v0_2::masks (  )  const [protected, virtual]

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 228 of file FeeTraits_v0_2.cc.

00228                                                 {
00229         return m_masks;
00230 }

const std::string * FeeTraits_v0_2::descriptions (  )  const [protected, virtual]

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 232 of file FeeTraits_v0_2.cc.

00232                                                     {
00233     return m_description;
00234 }

DaqTraits::Definitions * FeeTraits_v0_2::definitions ( unsigned int  component  )  const [protected, virtual]

Returns the array of bits definitions for a compement.

Reimplemented from DybDaq::DaqTraits.

Definition at line 236 of file FeeTraits_v0_2.cc.

00236                                                                               {
00237     return m_definitions[component];
00238 }

void FeeTraits_v0_2::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 240 of file FeeTraits_v0_2.cc.

00241                                                             {
00242     m_definitions[component] = definitions;
00243 }

const unsigned int * FeeTraits_v0_2::componentFields ( unsigned int  component  )  const [protected, virtual]

Sets the array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 245 of file FeeTraits_v0_2.cc.

00245                                                                                 {
00246     return m_componentFields[component];
00247 }

const unsigned int FeeTraits_v0_2::componentFieldsEnd ( unsigned int  component  )  const [protected, virtual]

Returns the maximum indexthe array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 249 of file FeeTraits_v0_2.cc.

00249                                                                                   {
00250     return m_componentFieldsEnd[component];
00251 }

unsigned int FeeTraits_v0_2::triggerTypeEnd (  )  const [protected, virtual]

Returns the maximum trigger type.

Implements DybDaq::FeeTraits.

Definition at line 253 of file FeeTraits_v0_2.cc.

00253                                                   {
00254     return 2U;
00255 }

const char ** FeeTraits_v0_2::triggerTypeStrings (  )  const [protected, virtual]

Returns the array of trigger type strings.

Implements DybDaq::FeeTraits.

Definition at line 257 of file FeeTraits_v0_2.cc.

00257                                                       {
00258     return m_triggerTypes;
00259 }

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

Suppress default.

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

Returns a default FeeTraits to bootstrap the system.

Definition at line 61 of file FeeTraits.cc.

00061                                           {
00062     if (0 == m_allTraits.size()) {
00063         m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_0::key(),new FeeTraits_v0_0()));
00064         m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_1::key(),new FeeTraits_v0_1()));
00065         m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_2::key(),new FeeTraits_v0_2()));
00066     }
00067     return *m_allTraits[FeeTraits_v0_2::key()];
00068 }

const FeeTraits * FeeTraits::readTraits ( const char *&  buffer  )  [static, inherited]

Returns the FeeTraits to use given the supplied buffer.

Definition at line 70 of file FeeTraits.cc.

00070                                                           {
00071     unsigned int major = 0;
00072     const unsigned int minor = readUnsignedInt(buffer,
00073                                              defaultTraits(),
00074                                              FeeTraits::kMinorVersion);
00075     
00076     const FeeTraits* result = 0;
00077     if (0U == major && 0U == minor) {
00078         result = m_allTraits[FeeTraits_v0_0::key()];
00079     } else if (0U == major && 1U == minor) {
00080         result = m_allTraits[FeeTraits_v0_1::key()];
00081     } else if (0U == major && 2U == minor) {
00082         result = m_allTraits[FeeTraits_v0_2::key()];
00083     }
00084     return result;
00085 }

unsigned int FeeTraits::illegalMarker (  )  const [virtual, inherited]

Returns the index value for an illegal header.

Implements DybDaq::DaqTraits.

Definition at line 87 of file FeeTraits.cc.

00087                                             {
00088     return 0xffffffffU;
00089 }

unsigned int FeeTraits::illegalField (  )  const [virtual, inherited]

Returns the index value for an illegal field.

Implements DybDaq::DaqTraits.

Definition at line 91 of file FeeTraits.cc.

00091                                            {
00092     return 0xffffffffU;
00093 }

const char * FeeTraits::triggerTypeAsString ( unsigned int  triggerType  )  const [virtual, inherited]

Returns the string for the specified trigger type.

Definition at line 95 of file FeeTraits.cc.

00095                                                                          {
00096         if (triggerType >= triggerTypeEnd()) {
00097                 return "Unknown";
00098         }
00099     return triggerTypeStrings()[triggerType];
00100 }


Member Data Documentation

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

The head component for this format.

Definition at line 24 of file FeeTraits.h.

const unsigned int FeeTraits::kHit = FeeTraits::kHead + 1 [static, inherited]

The hit component for this format.

Definition at line 29 of file FeeTraits.h.

const unsigned int FeeTraits::kFoot = FeeTraits::kHit + 1 [static, inherited]

The foot component for this format.

Definition at line 34 of file FeeTraits.h.

const unsigned int FeeTraits::kHeadTriggerNumber = 0 [static, inherited]

The field for the trigger number in the head.

Definition at line 39 of file FeeTraits.h.

const unsigned int FeeTraits::kTriggerType = FeeTraits::kHeadTriggerNumber + 1 [static, inherited]

The field for the trigger type.

Definition at line 44 of file FeeTraits.h.

const unsigned int FeeTraits::kChecked = FeeTraits::kTriggerType + 1 [static, inherited]

The field for the checked flag.

Definition at line 49 of file FeeTraits.h.

const unsigned int FeeTraits::kError = FeeTraits::kChecked + 1 [static, inherited]

The field for the error flag.

Definition at line 54 of file FeeTraits.h.

const unsigned int FeeTraits::kChargeChannelId = FeeTraits::kError + 1 [static, inherited]

The field for the channel id for the charge.

Definition at line 61 of file FeeTraits.h.

const unsigned int FeeTraits::kPeakCycle = FeeTraits::kChargeChannelId + 1 [static, inherited]

The field for the peak cycle.

Definition at line 66 of file FeeTraits.h.

const unsigned int FeeTraits::kHighRangeAdc = FeeTraits::kPeakCycle + 1 [static, inherited]

The field for the the high ADC range.

Definition at line 71 of file FeeTraits.h.

const unsigned int FeeTraits::kAdc = FeeTraits::kHighRangeAdc + 1 [static, inherited]

The field for the measured ADC value.

Definition at line 76 of file FeeTraits.h.

const unsigned int FeeTraits::kTimeChannelId = FeeTraits::kAdc + 1 [static, inherited]

The field for the channel id for the charge.

Definition at line 81 of file FeeTraits.h.

const unsigned int FeeTraits::kHitNumber = FeeTraits::kTimeChannelId + 1 [static, inherited]

The field for the hit number within the trigger (counting backwards).

Definition at line 86 of file FeeTraits.h.

const unsigned int FeeTraits::kTdc = FeeTraits::kHitNumber + 1 [static, inherited]

The field for the measured TDC value.

Definition at line 91 of file FeeTraits.h.

const unsigned int FeeTraits::kFootTriggerNumber = FeeTraits::kTdc + 1 [static, inherited]

The field for the trigger number in the foot.

Definition at line 98 of file FeeTraits.h.

const unsigned int FeeTraits::kFootDataLength = FeeTraits::kFootTriggerNumber + 1 [static, inherited]

The field for the trigger type.

Definition at line 103 of file FeeTraits.h.

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

The field for the major version.

Definition at line 110 of file FeeTraits.h.

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

The field for the minor version.

Definition at line 115 of file FeeTraits.h.

const unsigned int FeeTraits::kPreAdc = FeeTraits::kMinorVersion + 1 [static, inherited]

The field for measured pre-ADC value.

Definition at line 120 of file FeeTraits.h.

const unsigned int FeeTraits::kHeadMarker = FeeTraits::kPreAdc + 1 [static, inherited]

The field for the head marker.

Definition at line 127 of file FeeTraits.h.

const unsigned int FeeTraits::kAdcDataMarker = FeeTraits::kHeadMarker + 1 [static, inherited]

The field for the ADC data marker.

Definition at line 132 of file FeeTraits.h.

const unsigned int FeeTraits::kTdcDataMarker = FeeTraits::kAdcDataMarker + 1 [static, inherited]

The field for the TDC data marker.

Definition at line 137 of file FeeTraits.h.

const unsigned int FeeTraits::kFootMarker = FeeTraits::kTdcDataMarker + 1 [static, inherited]

The field for the foot marker.

Definition at line 142 of file FeeTraits.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:03 2011 for FeeReadoutFormat by doxygen 1.4.7