/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 Attributes | Protected Member Functions | Private Member Functions | Friends
DybDaq::FadcData Class Reference

#include <FadcData.h>

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

List of all members.

Public Types

typedef std::pair< const char
*, unsigned int > 
OutputBuffer
typedef std::vector< OutputBufferOutputBufferList
typedef std::vector
< ByteInspector * > 
Bytes
typedef std::vector
< BitsInspector * > 
Bits

Public Member Functions

virtual ~FadcData ()
 Destroy this instance of the class.
bool isChannelHead () const
 Returns true if this data is a channel header.
bool isChannelFoot () const
 Returns the high data byte for this ojbect.
unsigned int channelId () const
 Returns the channel id for this object.
unsigned char highDataByte () const
 Returns the high data byte for this ojbect.
unsigned char middleDataByte () const
 Returns the middle data byte for this ojbect.
unsigned char lowDataByte () const
 Returns the low data byte for this ojbect.
unsigned char sample1 () const
 Returns the sample 1 byte for this ojbect.
unsigned char sample2 () const
 Returns the sample 2 byte for this ojbect.
unsigned char sample3 () const
 Returns the sample 3 byte for this ojbect.
unsigned char sample4 () const
 Returns the sample 4 byte for this ojbect.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const FadcTraitsfadcTraits () const
 Returns the FadcTraits instance used to parse this object's buffer.
bool hasDaqTraits () const
virtual const DaqTraitsdaqTraits () const
virtual unsigned int gather (OutputBufferList &outputBuffers) const
virtual unsigned int inspect (DaqBuffer::Bytes &inspectors) const

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

virtual unsigned int formatComponent () const
 Returns the component with the format of this buffer.
const char * buffer () const
char * buffer ()
bool hasByteBuffer () const
const ByteBufferbyteBuffer () const
unsigned int fillInspectors (DaqBuffer::Bytes &inspectors, unsigned int component, unsigned int cursor) const
virtual bool readBool (const unsigned int field) const
virtual int readInt (const unsigned int field) const
virtual unsigned char readUnsignedChar (const unsigned int field) const
virtual unsigned int readUnsignedInt (const unsigned int field) const
virtual void writeField (const bool value, const unsigned int field)
virtual void writeField (const int value, const unsigned int field)
virtual void writeField (const unsigned int value, const unsigned int field)

Private Member Functions

 FadcData (const unsigned int channelId, const unsigned int highDataByte, const unsigned int middleDataByte, const unsigned int lowDataByte, const FadcTraits &traits)
 FadcData (const ByteBuffer &byteBuffer, const FadcTraits &traits)
 Create an instance of this class.
 FadcData ()
 Suppress default.
 FadcData (FadcData &rhs)
 Suppress default.
FadcDataoperator= (FadcData &rhs)
 Suppress default.
void setChannelId (const unsigned int channelId)
 Set the channel id.
void setHighDataByte (const unsigned int dataByte)
 Set the high data byte for this ojbect.
void setMiddleDataByte (const unsigned int dataByte)
 Set the middle data byte for this ojbect.
void setLowDataByte (const unsigned int dataByte)
 Set the low data byte for this ojbect.

Friends

class FadcReadout

Detailed Description

Definition at line 20 of file FadcData.h.


Constructor & Destructor Documentation

FadcData::~FadcData ( ) [virtual]

Destroy this instance of the class.

Definition at line 37 of file FadcData.cc.

                    {
}
FadcData::FadcData ( const unsigned int  channelId,
const unsigned int  highDataByte,
const unsigned int  middleDataByte,
const unsigned int  lowDataByte,
const FadcTraits traits 
) [private]

Definition at line 16 of file FadcData.cc.

                                             :
    FadcBuffer(new char[traits.dataSize() * kBytesInInt],
               traits) {
    traits.initializeData(buffer());
    setChannelId(channelId);
    setHighDataByte(highDataByte);
    setMiddleDataByte(middleDataByte);
    setLowDataByte(lowDataByte);
}
FadcData::FadcData ( const ByteBuffer byteBuffer,
const FadcTraits traits 
) [private]

Create an instance of this class.

Definition at line 30 of file FadcData.cc.

                                             :
    FadcBuffer(byteBuffer,
               traits) {
    byteBuffer.position(byteBuffer.position() + (fadcTraits().dataSize() * kBytesInInt));
}
DybDaq::FadcData::FadcData ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

bool FadcData::isChannelHead ( ) const

Returns true if this data is a channel header.

Definition at line 44 of file FadcData.cc.

                                   {
    unsigned int head = readUnsignedInt(FadcTraits::kChannelHeadMarker);
    unsigned int check = readUnsignedInt(FadcTraits::kChannelHeadCheck);
    return (3 == head) & (0x00ff00ff == check);
}
bool FadcData::isChannelFoot ( ) const

Returns the high data byte for this ojbect.

Definition at line 50 of file FadcData.cc.

                                   {
    unsigned int foot = readUnsignedInt(FadcTraits::kChannelFootMarker);
    unsigned int check = readUnsignedInt(FadcTraits::kChannelFootCheck);
    return (5 == foot) && (0x00ff00ff == check);
}
unsigned int FadcData::channelId ( ) const

Returns the channel id for this object.

Definition at line 56 of file FadcData.cc.

unsigned char FadcData::highDataByte ( ) const

Returns the high data byte for this ojbect.

Definition at line 60 of file FadcData.cc.

unsigned char FadcData::middleDataByte ( ) const

Returns the middle data byte for this ojbect.

Definition at line 64 of file FadcData.cc.

unsigned char FadcData::lowDataByte ( ) const

Returns the low data byte for this ojbect.

Definition at line 68 of file FadcData.cc.

unsigned char FadcData::sample1 ( ) const

Returns the sample 1 byte for this ojbect.

Definition at line 72 of file FadcData.cc.

unsigned char FadcData::sample2 ( ) const

Returns the sample 2 byte for this ojbect.

Definition at line 76 of file FadcData.cc.

unsigned char FadcData::sample3 ( ) const

Returns the sample 3 byte for this ojbect.

Definition at line 80 of file FadcData.cc.

unsigned char FadcData::sample4 ( ) const

Returns the sample 4 byte for this ojbect.

Definition at line 84 of file FadcData.cc.

unsigned int FadcData::bufferSize ( ) const [virtual]

Returns the size, in 4-bytes, of this ojbect's contents in the buffer.

Implements DybDaq::DaqBuffer.

Definition at line 88 of file FadcData.cc.

                                        {
    return fadcTraits().dataSize();
}
unsigned int FadcData::formatComponent ( ) const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 40 of file FadcData.cc.

                                             {
    return FadcTraits::kData;
}
FadcData& DybDaq::FadcData::operator= ( FadcData rhs) [private]

Suppress default.

void FadcData::setChannelId ( const unsigned int  channelId) [private]

Set the channel id.

Definition at line 92 of file FadcData.cc.

void FadcData::setHighDataByte ( const unsigned int  dataByte) [private]

Set the high data byte for this ojbect.

Definition at line 97 of file FadcData.cc.

void FadcData::setMiddleDataByte ( const unsigned int  dataByte) [private]

Set the middle data byte for this ojbect.

Definition at line 102 of file FadcData.cc.

void FadcData::setLowDataByte ( const unsigned int  dataByte) [private]

Set the low data byte for this ojbect.

Definition at line 107 of file FadcData.cc.

const FadcTraits & FadcBuffer::fadcTraits ( ) const [inherited]

Returns the FadcTraits instance used to parse this object's buffer.

Definition at line 32 of file FadcBuffer.cc.

                                               {
    return dynamic_cast<const FadcTraits&>(daqTraits());
}

Friends And Related Function Documentation

friend class FadcReadout [friend]

Definition at line 24 of file FadcData.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