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

In This Package:

DybDaq::CbltFoot Class Reference

#include <CbltFoot.h>

Inheritance diagram for DybDaq::CbltFoot:

[legend]
Collaboration diagram for DybDaq::CbltFoot:
[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 ~CbltFoot ()
 Destroy this instance of the class.
unsigned int moduleAddress () const
 Returns the module address from this readout.
unsigned int dataLength () const
 Returns the data transfer length, in bytes, contained in this readout.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const CbltTraitscbltTraits () const
 Returns the CbltTraits 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

 CbltFoot (const CbltHead &head)
 Create an instance of this class.
 CbltFoot (const ByteBuffer &byteBuffer, const CbltTraits &traits)
 Create an instance of this class.
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

 CbltFoot ()
 Suppress default.
 CbltFoot (CbltFoot &rhs)
 Suppress default.
CbltFootoperator= (CbltFoot &rhs)
 Suppress default.
void setModuleAddress (unsigned int moduleAddress)
 Returns the module address from this readout.
void setDataLength (unsigned int dataLength)
 Returns the data transfer length, in bytes, contained in this readout.

Friends

class CbltReadout

Detailed Description

Definition at line 22 of file CbltFoot.h.


Constructor & Destructor Documentation

CbltFoot::~CbltFoot (  )  [virtual]

Destroy this instance of the class.

Definition at line 37 of file CbltFoot.cc.

00037                     {
00038 }

CbltFoot::CbltFoot ( const CbltHead head  )  [protected]

Create an instance of this class.

Definition at line 21 of file CbltFoot.cc.

00021                                        :
00022 CbltBuffer(new char[head.cbltTraits().footSize() * kBytesInInt],
00023           head.cbltTraits()) {
00024     const CbltTraits& traits = cbltTraits();
00025     traits.initializeFoot(buffer());
00026     setModuleAddress(head.moduleAddress());
00027     setDataLength((traits.headSize() + traits.footSize()) * kBytesInInt);
00028 }

CbltFoot::CbltFoot ( const ByteBuffer byteBuffer,
const CbltTraits traits 
) [protected]

Create an instance of this class.

Definition at line 30 of file CbltFoot.cc.

00031                                              :
00032 CbltBuffer(byteBuffer,
00033            traits) {
00034         byteBuffer.position(byteBuffer.position() + kBytesInInt);
00035 }

DybDaq::CbltFoot::CbltFoot (  )  [private]

Suppress default.

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

Suppress default.


Member Function Documentation

unsigned int CbltFoot::moduleAddress (  )  const

Returns the module address from this readout.

Definition at line 44 of file CbltFoot.cc.

00044                                            {
00045         return readUnsignedInt(CbltTraits::kFootModuleAddress);
00046 }

unsigned int CbltFoot::dataLength (  )  const

Returns the data transfer length, in bytes, contained in this readout.

Definition at line 48 of file CbltFoot.cc.

00048                                         {
00049         return readUnsignedInt(CbltTraits::kFootDataLength);
00050 }

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

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

Implements DybDaq::DaqBuffer.

Definition at line 52 of file CbltFoot.cc.

00052                                         {
00053     return cbltTraits().footSize();
00054 }

unsigned int CbltFoot::formatComponent (  )  const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 40 of file CbltFoot.cc.

00040                                              {
00041     return CbltTraits::kFoot;
00042 }

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

Suppress default.

void CbltFoot::setModuleAddress ( unsigned int  moduleAddress  )  [private]

Returns the module address from this readout.

Definition at line 56 of file CbltFoot.cc.

void CbltFoot::setDataLength ( unsigned int  dataLength  )  [private]

Returns the data transfer length, in bytes, contained in this readout.

Definition at line 61 of file CbltFoot.cc.

00061                                                     {
00062     writeField(dataLength,
00063                CbltTraits::kFootDataLength);
00064 }

const CbltTraits & CbltBuffer::cbltTraits (  )  const [inherited]

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

Definition at line 34 of file CbltBuffer.cc.

00034                                                {
00035         return dynamic_cast<const CbltTraits&>(daqTraits());
00036 }


Friends And Related Function Documentation

friend class CbltReadout [friend]

Definition at line 26 of file CbltFoot.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:16 2011 for CbltReadoutFormat by doxygen 1.4.7