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

In This Package:

DybDaq::FeeTraits_v0_0 Class Reference

#include <FeeTraits_v0_0.h>

Inheritance diagram for DybDaq::FeeTraits_v0_0:

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

Public Types

typedef std::vector< BitsDefinitionDefinitions

Public Member Functions

 FeeTraits_v0_0 ()
 Creates an instance of this class.
virtual ~FeeTraits_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 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_0 (FeeTraits_v0_0 &rhs)
 Suppress default.
FeeTraits_v0_0operator= (FeeTraits_v0_0 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file FeeTraits_v0_0.h.


Constructor & Destructor Documentation

FeeTraits_v0_0::FeeTraits_v0_0 (  ) 

Creates an instance of this class.

Definition at line 133 of file FeeTraits_v0_0.cc.

00133                                {
00134 }

FeeTraits_v0_0::~FeeTraits_v0_0 (  )  [virtual]

Destroy this instance of the class.

Definition at line 136 of file FeeTraits_v0_0.cc.

00136                                 {
00137 }

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

Suppress default.


Member Function Documentation

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

Returns a key for this verion, unique with FeeTraits.

Definition at line 129 of file FeeTraits_v0_0.cc.

00129                                 {
00130         return "FEE Format 0.0";
00131 }

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

Implements DybDaq::DaqTraits.

Definition at line 139 of file FeeTraits_v0_0.cc.

00139                                                 {
00140         return 0U;
00141 }

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

Implements DybDaq::DaqTraits.

Definition at line 143 of file FeeTraits_v0_0.cc.

00143                                                 {
00144         return 0U;
00145 }

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

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 147 of file FeeTraits_v0_0.cc.

00147                                                  {
00148         return key();
00149 }

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

Returns the size of a FeeHead in this format.

Implements DybDaq::FeeTraits.

Definition at line 151 of file FeeTraits_v0_0.cc.

00151                                             {
00152     return 1U;
00153 }

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

Returns the size of a fee hit in this format.

Implements DybDaq::FeeTraits.

Definition at line 155 of file FeeTraits_v0_0.cc.

00155                                            {
00156     return 2U;
00157 }

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

Returns the size of a FeeFoot in this format.

Implements DybDaq::FeeTraits.

Definition at line 159 of file FeeTraits_v0_0.cc.

00159                                             {
00160     return 1U;
00161 }

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

Initializes the FeeHead memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 163 of file FeeTraits_v0_0.cc.

00163                                                       {
00164     *((unsigned int*)buffer)       = 0x40000000U; // Head four bytes
00165 }

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

Initializes the FeeHit memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 167 of file FeeTraits_v0_0.cc.

00167                                                      {
00168     *((unsigned int*)buffer)       = 0x60000000U; // ADC four bytes
00169     *((unsigned int*)(buffer + 4)) = 0x80000000U; // TDC four bytes
00170 }

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

Initializes the FeeFoot memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 172 of file FeeTraits_v0_0.cc.

00172                                                       {
00173     *((unsigned int*)buffer)       = 0xa0000000U; // Foot four bytes
00174 }

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

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 176 of file FeeTraits_v0_0.cc.

00176                                               {
00177     return 0U;
00178 }

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

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 180 of file FeeTraits_v0_0.cc.

00180                                                   {
00181     return 0;
00182 }

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

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 184 of file FeeTraits_v0_0.cc.

00184                                              {
00185         return kFootDataLength + 1;
00186 }

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

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 188 of file FeeTraits_v0_0.cc.

00188                                                   {
00189         return m_indices;
00190 }

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

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 192 of file FeeTraits_v0_0.cc.

00192                                                  {
00193         return m_shifts;
00194 }

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

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 196 of file FeeTraits_v0_0.cc.

00196                                                 {
00197         return m_masks;
00198 }

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

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 200 of file FeeTraits_v0_0.cc.

00200                                                     {
00201     return m_description;
00202 }

DaqTraits::Definitions * FeeTraits_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 204 of file FeeTraits_v0_0.cc.

00204                                                                               {
00205     return m_definitions[component];
00206 }

void FeeTraits_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 208 of file FeeTraits_v0_0.cc.

00209                                                             {
00210     m_definitions[component] = definitions;
00211 }

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

Sets the array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 213 of file FeeTraits_v0_0.cc.

00213                                                                                 {
00214     return m_componentFields[component];
00215 }

const unsigned int FeeTraits_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 217 of file FeeTraits_v0_0.cc.

00217                                                                                   {
00218     return m_componentFieldsEnd[component];
00219 }

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

Returns the maximum trigger type.

Implements DybDaq::FeeTraits.

Definition at line 221 of file FeeTraits_v0_0.cc.

00221                                                   {
00222     return 2U;
00223 }

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

Returns the array of trigger type strings.

Implements DybDaq::FeeTraits.

Definition at line 225 of file FeeTraits_v0_0.cc.

00225                                                       {
00226     return m_triggerTypes;
00227 }

FeeTraits_v0_0& DybDaq::FeeTraits_v0_0::operator= ( FeeTraits_v0_0 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