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

#include <FeeTraits_v0_1.h>

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

List of all members.

Public Types

typedef std::vector
< BitsDefinition
Definitions

Public Member Functions

 FeeTraits_v0_1 ()
 Creates an instance of this class.
virtual ~FeeTraits_v0_1 ()
 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_1 (FeeTraits_v0_1 &rhs)
 Suppress default.
FeeTraits_v0_1operator= (FeeTraits_v0_1 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file FeeTraits_v0_1.h.


Constructor & Destructor Documentation

FeeTraits_v0_1::FeeTraits_v0_1 ( )

Creates an instance of this class.

Definition at line 165 of file FeeTraits_v0_1.cc.

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

Destroy this instance of the class.

Definition at line 168 of file FeeTraits_v0_1.cc.

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

Suppress default.


Member Function Documentation

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

Returns a key for this verion, unique with FeeTraits.

Definition at line 161 of file FeeTraits_v0_1.cc.

                                {
        return "FEE Format 0.1";
}
unsigned int FeeTraits_v0_1::majorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 171 of file FeeTraits_v0_1.cc.

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

Implements DybDaq::DaqTraits.

Definition at line 175 of file FeeTraits_v0_1.cc.

                                                {
        return 1U;
}
const string FeeTraits_v0_1::versionString ( ) const [virtual]

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 179 of file FeeTraits_v0_1.cc.

                                                 {
        return key();
}
unsigned int FeeTraits_v0_1::headSize ( ) const [virtual]

Returns the size of a FeeHead in this format.

Implements DybDaq::FeeTraits.

Definition at line 183 of file FeeTraits_v0_1.cc.

                                            {
    return 1U;
}
unsigned int FeeTraits_v0_1::hitSize ( ) const [virtual]

Returns the size of a fee hit in this format.

Implements DybDaq::FeeTraits.

Definition at line 187 of file FeeTraits_v0_1.cc.

                                           {
    return 2U;
}
unsigned int FeeTraits_v0_1::footSize ( ) const [virtual]

Returns the size of a FeeFoot in this format.

Implements DybDaq::FeeTraits.

Definition at line 191 of file FeeTraits_v0_1.cc.

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

Initializes the FeeHead memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 195 of file FeeTraits_v0_1.cc.

                                                      {
    *((unsigned int*)buffer)       = 0x41000000U; // Head four bytes
}
void FeeTraits_v0_1::initializeHit ( char *  buffer) const [virtual]

Initializes the FeeHit memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 199 of file FeeTraits_v0_1.cc.

                                                     {
    *((unsigned int*)buffer)       = 0x60000000U; // ADC four bytes
    *((unsigned int*)(buffer + 4)) = 0x80000000U; // TDC four bytes
}
void FeeTraits_v0_1::initializeFoot ( char *  buffer) const [virtual]

Initializes the FeeFoot memory with the appropriate markers.

Implements DybDaq::FeeTraits.

Definition at line 204 of file FeeTraits_v0_1.cc.

                                                      {
    *((unsigned int*)buffer)       = 0xa0000000U; // Foot four bytes
}
unsigned int FeeTraits_v0_1::markersEnd ( ) const [protected, virtual]

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 208 of file FeeTraits_v0_1.cc.

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

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 212 of file FeeTraits_v0_1.cc.

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

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 216 of file FeeTraits_v0_1.cc.

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

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 220 of file FeeTraits_v0_1.cc.

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

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 224 of file FeeTraits_v0_1.cc.

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

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 228 of file FeeTraits_v0_1.cc.

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

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 232 of file FeeTraits_v0_1.cc.

                                                    {
    return m_description;
}
DaqTraits::Definitions * FeeTraits_v0_1::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_1.cc.

                                                                              {
    return m_definitions[component];
}
void FeeTraits_v0_1::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_1.cc.

                                                            {
    m_definitions[component] = definitions;
}
const unsigned int * FeeTraits_v0_1::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_1.cc.

                                                                                {
    return m_componentFields[component];
}
const unsigned int FeeTraits_v0_1::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_1.cc.

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

Returns the maximum trigger type.

Implements DybDaq::FeeTraits.

Definition at line 253 of file FeeTraits_v0_1.cc.

                                                  {
    return 2U;
}
const char ** FeeTraits_v0_1::triggerTypeStrings ( ) const [protected, virtual]

Returns the array of trigger type strings.

Implements DybDaq::FeeTraits.

Definition at line 257 of file FeeTraits_v0_1.cc.

                                                      {
    return m_triggerTypes;
}
FeeTraits_v0_1& DybDaq::FeeTraits_v0_1::operator= ( FeeTraits_v0_1 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.

                                          {
    if (0 == m_allTraits.size()) {
        m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_0::key(),new FeeTraits_v0_0()));
        m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_1::key(),new FeeTraits_v0_1()));
        m_allTraits.insert(std::pair<const char*, FeeTraits*>(FeeTraits_v0_2::key(),new FeeTraits_v0_2()));
    }
    return *m_allTraits[FeeTraits_v0_2::key()];
}
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.

                                                          {
    unsigned int major = 0;
    const unsigned int minor = readUnsignedInt(buffer,
                                             defaultTraits(),
                                             FeeTraits::kMinorVersion);
    
    const FeeTraits* result = 0;
    if (0U == major && 0U == minor) {
        result = m_allTraits[FeeTraits_v0_0::key()];
    } else if (0U == major && 1U == minor) {
        result = m_allTraits[FeeTraits_v0_1::key()];
    } else if (0U == major && 2U == minor) {
        result = m_allTraits[FeeTraits_v0_2::key()];
    }
    return result;
}
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.

                                            {
    return 0xffffffffU;
}
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.

                                           {
    return 0xffffffffU;
}
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.

                                                                         {
        if (triggerType >= triggerTypeEnd()) {
                return "Unknown";
        }
    return triggerTypeStrings()[triggerType];
}

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 Fri May 16 2014 09:53:02 for FeeReadoutFormat by doxygen 1.7.4