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

#include <FadcTraits_v1_5.h>

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

List of all members.

Public Types

typedef std::vector
< BitsDefinition
Definitions

Public Member Functions

 FadcTraits_v1_5 ()
 Creates an instance of this class.
virtual ~FadcTraits_v1_5 ()
 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 FadcHead in this format.
virtual unsigned int dataSize () const
 Returns the size of a FADC data elementt in this format.
virtual unsigned int footSize () const
 Returns the size of a FadcFoot in this format.
virtual void initializeHead (char *buffer) const
 Initializes the FadcHead memory with the appropriate markers.
virtual void initializeData (char *buffer) const
 Initializes the FadcData memory with the appropriate markers.
virtual void initializeFoot (char *buffer) const
 Initializes the FadcFoot 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 FadcTraits.
static const FadcTraitsdefaultTraits ()
 Returns a default FadcTraits to bootstrap the system.
static const FadcTraitsreadTraits (const char *&buffer)
 Returns the FadcTraits 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 kData = FadcTraits::kHead + 1
 The data component for this format.
static const unsigned int kFoot = FadcTraits::kData + 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 kMajorVersion = FadcTraits::kHeadTriggerNumber + 1
 The field for the major version.
static const unsigned int kMinorVersion = FadcTraits::kMajorVersion + 1
 The field for the minor version.
static const unsigned int kTriggerType = FadcTraits::kMinorVersion + 1
 The field for the trigger type.
static const unsigned int kNoData = FadcTraits::kTriggerType + 1
 The field for when there is no data.
static const unsigned int kHeadMarker = FadcTraits::kFootDataLength + 1
 The field for the head marker.
static const unsigned int kAdcDataMarker = FadcTraits::kHeadMarker + 1
 The field for the ADC data marker.
static const unsigned int kFootMarker = FadcTraits::kAdcDataMarker + 1
 The field for the foot marker.
static const unsigned int kProtectionStatus = FadcTraits::kFootMarker + 1
 The field for when there is no data.
static const unsigned int kScaleEnabled = FadcTraits::kProtectionStatus + 1
 The field for when there is no data.
static const unsigned int kDuringPrevious = FadcTraits::kScaleEnabled + 1
 The field for when there is no data.
static const unsigned int kChannelId = FadcTraits::kNoData + 1
 The field for the channel id for the data.
static const unsigned int kHighDataByte = FadcTraits::kChannelId + 1
 The field for the high data byte.
static const unsigned int kMiddleDataByte = FadcTraits::kHighDataByte + 1
 The field for the middle data byte.
static const unsigned int kLowDataByte = FadcTraits::kMiddleDataByte + 1
 The field for the low data byte.
static const unsigned int kChannelHeadMarker = FadcTraits::kDuringPrevious + 1
 The field for the channel header marker.
static const unsigned int kChannelHeadCheck = FadcTraits::kChannelHeadMarker + 1
 The field for the channel header check bytes.
static const unsigned int kChannelFootMarker = FadcTraits::kChannelHeadCheck + 1
 The field for the channel trailer marker.
static const unsigned int kChannelFootCheck = FadcTraits::kChannelFootMarker + 1
 The field for the channel trailer check bytes.
static const unsigned int kSample1 = FadcTraits::kChannelFootCheck + 1
 The field for the sample 1.
static const unsigned int kSample2 = FadcTraits::kSample1 + 1
 The field for the sample 2.
static const unsigned int kSample3 = FadcTraits::kSample2 + 1
 The field for the sample 3.
static const unsigned int kSample4 = FadcTraits::kSample3 + 1
 The field for the sample 4.
static const unsigned int kFootTriggerNumber = FadcTraits::kLowDataByte + 1
 The field for the trigger number in the foot.
static const unsigned int kFootDataLength = FadcTraits::kFootTriggerNumber + 1
 The field for the trigger type.

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

 FadcTraits_v1_5 (FadcTraits_v1_5 &rhs)
 Suppress default.
FadcTraits_v1_5operator= (FadcTraits_v1_5 &rhs)
 Suppress default.

Friends

friend class DaqBuffer

Detailed Description

Definition at line 17 of file FadcTraits_v1_5.h.


Constructor & Destructor Documentation

FadcTraits_v1_5::FadcTraits_v1_5 ( )

Creates an instance of this class.

Definition at line 149 of file FadcTraits_v1_5.cc.

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

Destroy this instance of the class.

Definition at line 152 of file FadcTraits_v1_5.cc.

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

Suppress default.


Member Function Documentation

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

Returns a key for this verion, unique with FadcTraits.

Definition at line 145 of file FadcTraits_v1_5.cc.

                                 {
        return "FADC Format 1.5";
}
unsigned int FadcTraits_v1_5::majorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 155 of file FadcTraits_v1_5.cc.

                                                 {
        return 1U;
}
unsigned int FadcTraits_v1_5::minorVersion ( ) const [virtual]

Implements DybDaq::DaqTraits.

Definition at line 159 of file FadcTraits_v1_5.cc.

                                                 {
        return 5U;
}
const string FadcTraits_v1_5::versionString ( ) const [virtual]

Returns the version of the event format as a string.

Implements DybDaq::DaqTraits.

Definition at line 163 of file FadcTraits_v1_5.cc.

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

Returns the size of a FadcHead in this format.

Implements DybDaq::FadcTraits.

Definition at line 167 of file FadcTraits_v1_5.cc.

                                             {
    return 1U;
}
unsigned int FadcTraits_v1_5::dataSize ( ) const [virtual]

Returns the size of a FADC data elementt in this format.

Implements DybDaq::FadcTraits.

Definition at line 171 of file FadcTraits_v1_5.cc.

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

Returns the size of a FadcFoot in this format.

Implements DybDaq::FadcTraits.

Definition at line 175 of file FadcTraits_v1_5.cc.

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

Initializes the FadcHead memory with the appropriate markers.

Implements DybDaq::FadcTraits.

Definition at line 179 of file FadcTraits_v1_5.cc.

                                                       {
    *((unsigned int*)buffer)       = 0x40000000U; // Head four bytes
}
void FadcTraits_v1_5::initializeData ( char *  buffer) const [virtual]

Initializes the FadcData memory with the appropriate markers.

Implements DybDaq::FadcTraits.

Definition at line 183 of file FadcTraits_v1_5.cc.

                                                       {
    *((unsigned int*)buffer)       = 0x60000000U; // Data four bytes
}
void FadcTraits_v1_5::initializeFoot ( char *  buffer) const [virtual]

Initializes the FadcFoot memory with the appropriate markers.

Implements DybDaq::FadcTraits.

Definition at line 187 of file FadcTraits_v1_5.cc.

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

Returns the maximum number of headers in an event.

Implements DybDaq::DaqTraits.

Definition at line 191 of file FadcTraits_v1_5.cc.

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

Returns the markers for the records.

Implements DybDaq::DaqTraits.

Definition at line 195 of file FadcTraits_v1_5.cc.

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

Returns the maximum field value for a particluar format.

Implements DybDaq::DaqTraits.

Definition at line 199 of file FadcTraits_v1_5.cc.

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

Returns the indices of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 203 of file FadcTraits_v1_5.cc.

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

Returns the array of shifts for fields.

Implements DybDaq::DaqTraits.

Definition at line 207 of file FadcTraits_v1_5.cc.

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

Returns the array of marks for fields.

Implements DybDaq::DaqTraits.

Definition at line 211 of file FadcTraits_v1_5.cc.

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

Returns the array of descriptions for fields.

Reimplemented from DybDaq::DaqTraits.

Definition at line 215 of file FadcTraits_v1_5.cc.

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

Returns the array of bits definitions for a compement.

Reimplemented from DybDaq::DaqTraits.

Definition at line 219 of file FadcTraits_v1_5.cc.

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

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

Sets the array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 228 of file FadcTraits_v1_5.cc.

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

Returns the maximum indexthe array of fields for a compoment.

Reimplemented from DybDaq::DaqTraits.

Definition at line 232 of file FadcTraits_v1_5.cc.

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

Returns the maximum trigger type.

Implements DybDaq::FadcTraits.

Definition at line 236 of file FadcTraits_v1_5.cc.

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

Returns the array of trigger type strings.

Implements DybDaq::FadcTraits.

Definition at line 240 of file FadcTraits_v1_5.cc.

                                                       {
    return m_triggerTypes;
}
FadcTraits_v1_5& DybDaq::FadcTraits_v1_5::operator= ( FadcTraits_v1_5 rhs) [private]

Suppress default.

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

Returns a default FadcTraits to bootstrap the system.

Definition at line 68 of file FadcTraits.cc.

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

Returns the FadcTraits to use given the supplied buffer.

Definition at line 77 of file FadcTraits.cc.

                                                            {
    unsigned int major = 0;
    const unsigned int minor = readUnsignedInt(buffer,
                                             defaultTraits(),
                                             FadcTraits::kMinorVersion);
    
    const FadcTraits* result = 0;
    if (0U == major && 0U == minor) {
        result = m_allTraits[FadcTraits_v1_2::key()];
    } else if (0U == major && 1U == minor) {
            result = m_allTraits[FadcTraits_v1_5::key()];
    } else if (0U == major && 2U == minor) {
            result = m_allTraits[FadcTraits_v2_0::key()];
    }
    return result;
}
unsigned int FadcTraits::illegalMarker ( ) const [virtual, inherited]

Returns the index value for an illegal header.

Implements DybDaq::DaqTraits.

Definition at line 94 of file FadcTraits.cc.

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

Returns the index value for an illegal field.

Implements DybDaq::DaqTraits.

Definition at line 98 of file FadcTraits.cc.

                                            {
    return 0xffffffffU;
}
const char * FadcTraits::triggerTypeAsString ( unsigned int  triggerType) const [virtual, inherited]

Returns the string for the specified trigger type.

Definition at line 102 of file FadcTraits.cc.

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

Member Data Documentation

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

The head component for this format.

Definition at line 24 of file FadcTraits.h.

const unsigned int FadcTraits::kData = FadcTraits::kHead + 1 [static, inherited]

The data component for this format.

Definition at line 29 of file FadcTraits.h.

const unsigned int FadcTraits::kFoot = FadcTraits::kData + 1 [static, inherited]

The foot component for this format.

Definition at line 34 of file FadcTraits.h.

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

The field for the trigger number in the head.

Definition at line 39 of file FadcTraits.h.

const unsigned int FadcTraits::kMajorVersion = FadcTraits::kHeadTriggerNumber + 1 [static, inherited]

The field for the major version.

Definition at line 46 of file FadcTraits.h.

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

The field for the minor version.

Definition at line 51 of file FadcTraits.h.

const unsigned int FadcTraits::kTriggerType = FadcTraits::kMinorVersion + 1 [static, inherited]

The field for the trigger type.

Definition at line 56 of file FadcTraits.h.

const unsigned int FadcTraits::kNoData = FadcTraits::kTriggerType + 1 [static, inherited]

The field for when there is no data.

Definition at line 61 of file FadcTraits.h.

const unsigned int FadcTraits::kHeadMarker = FadcTraits::kFootDataLength + 1 [static, inherited]

The field for the head marker.

Definition at line 68 of file FadcTraits.h.

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

The field for the ADC data marker.

Definition at line 73 of file FadcTraits.h.

const unsigned int FadcTraits::kFootMarker = FadcTraits::kAdcDataMarker + 1 [static, inherited]

The field for the foot marker.

Definition at line 78 of file FadcTraits.h.

const unsigned int FadcTraits::kProtectionStatus = FadcTraits::kFootMarker + 1 [static, inherited]

The field for when there is no data.

Definition at line 85 of file FadcTraits.h.

const unsigned int FadcTraits::kScaleEnabled = FadcTraits::kProtectionStatus + 1 [static, inherited]

The field for when there is no data.

Definition at line 90 of file FadcTraits.h.

const unsigned int FadcTraits::kDuringPrevious = FadcTraits::kScaleEnabled + 1 [static, inherited]

The field for when there is no data.

Definition at line 95 of file FadcTraits.h.

const unsigned int FadcTraits::kChannelId = FadcTraits::kNoData + 1 [static, inherited]

The field for the channel id for the data.

Definition at line 102 of file FadcTraits.h.

const unsigned int FadcTraits::kHighDataByte = FadcTraits::kChannelId + 1 [static, inherited]

The field for the high data byte.

Definition at line 107 of file FadcTraits.h.

const unsigned int FadcTraits::kMiddleDataByte = FadcTraits::kHighDataByte + 1 [static, inherited]

The field for the middle data byte.

Definition at line 112 of file FadcTraits.h.

const unsigned int FadcTraits::kLowDataByte = FadcTraits::kMiddleDataByte + 1 [static, inherited]

The field for the low data byte.

Definition at line 117 of file FadcTraits.h.

const unsigned int FadcTraits::kChannelHeadMarker = FadcTraits::kDuringPrevious + 1 [static, inherited]

The field for the channel header marker.

Definition at line 124 of file FadcTraits.h.

const unsigned int FadcTraits::kChannelHeadCheck = FadcTraits::kChannelHeadMarker + 1 [static, inherited]

The field for the channel header check bytes.

Definition at line 129 of file FadcTraits.h.

const unsigned int FadcTraits::kChannelFootMarker = FadcTraits::kChannelHeadCheck + 1 [static, inherited]

The field for the channel trailer marker.

Definition at line 134 of file FadcTraits.h.

const unsigned int FadcTraits::kChannelFootCheck = FadcTraits::kChannelFootMarker + 1 [static, inherited]

The field for the channel trailer check bytes.

Definition at line 139 of file FadcTraits.h.

const unsigned int FadcTraits::kSample1 = FadcTraits::kChannelFootCheck + 1 [static, inherited]

The field for the sample 1.

Definition at line 144 of file FadcTraits.h.

const unsigned int FadcTraits::kSample2 = FadcTraits::kSample1 + 1 [static, inherited]

The field for the sample 2.

Definition at line 149 of file FadcTraits.h.

const unsigned int FadcTraits::kSample3 = FadcTraits::kSample2 + 1 [static, inherited]

The field for the sample 3.

Definition at line 154 of file FadcTraits.h.

const unsigned int FadcTraits::kSample4 = FadcTraits::kSample3 + 1 [static, inherited]

The field for the sample 4.

Definition at line 159 of file FadcTraits.h.

const unsigned int FadcTraits::kFootTriggerNumber = FadcTraits::kLowDataByte + 1 [static, inherited]

The field for the trigger number in the foot.

Definition at line 166 of file FadcTraits.h.

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

The field for the trigger type.

Definition at line 171 of file FadcTraits.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:52:59 for FadcReadoutFormat by doxygen 1.7.4