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

In This Package:

DybDaq::LtbFoot Class Reference

#include <LtbFoot.h>

Inheritance diagram for DybDaq::LtbFoot:

[legend]
Collaboration diagram for DybDaq::LtbFoot:
[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 ~LtbFoot ()
 Destroy this instance of the class.
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 LtbTraitsltbTraits () const
 Returns the LtbTraits 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

 LtbFoot (const LtbHead &head)
 Create an instance of this class.
 LtbFoot (const ByteBuffer &byteBuffer, const LtbTraits &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

 LtbFoot ()
 Suppress default.
 LtbFoot (LtbFoot &rhs)
 Suppress default.
LtbFootoperator= (LtbFoot &rhs)
 Suppress default.
void setDataLength (const unsigned int dataLength)
 Sets the data transfer length, in bytes, contained in this readout.

Friends

class LtbReadout

Detailed Description

Definition at line 22 of file LtbFoot.h.


Constructor & Destructor Documentation

LtbFoot::~LtbFoot (  )  [virtual]

Destroy this instance of the class.

Definition at line 37 of file LtbFoot.cc.

00037                   {
00038 }

LtbFoot::LtbFoot ( const LtbHead head  )  [protected]

Create an instance of this class.

Definition at line 22 of file LtbFoot.cc.

00022                                     :
00023 LtbBuffer(new char[head.ltbTraits().footSize() * kBytesInInt],
00024 head.ltbTraits()) {
00025     const LtbTraits& traits = ltbTraits();
00026     traits.initializeFoot(buffer());
00027     setDataLength((traits.headSize() + traits.footSize()) * kBytesInInt);
00028 }

LtbFoot::LtbFoot ( const ByteBuffer byteBuffer,
const LtbTraits traits 
) [protected]

Create an instance of this class.

Definition at line 30 of file LtbFoot.cc.

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

DybDaq::LtbFoot::LtbFoot (  )  [private]

Suppress default.

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

Suppress default.


Member Function Documentation

unsigned int LtbFoot::dataLength (  )  const

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

Definition at line 48 of file LtbFoot.cc.

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

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

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

Implements DybDaq::DaqBuffer.

Definition at line 44 of file LtbFoot.cc.

00044                                        {
00045     return ltbTraits().footSize();
00046 }

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

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 40 of file LtbFoot.cc.

00040                                             {
00041     return LtbTraits::kFoot;
00042 }

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

Suppress default.

void LtbFoot::setDataLength ( const unsigned int  dataLength  )  [private]

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

Definition at line 52 of file LtbFoot.cc.

00052                                                          {
00053     writeField(dataLength,
00054                LtbTraits::kFootDataLength);
00055 }

const LtbTraits & LtbBuffer::ltbTraits (  )  const [inherited]

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

Definition at line 36 of file LtbBuffer.cc.

00036                                             {
00037         return dynamic_cast<const LtbTraits&>(daqTraits());
00038 }


Friends And Related Function Documentation

friend class LtbReadout [friend]

Definition at line 26 of file LtbFoot.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:09 2011 for LtbReadoutFormat by doxygen 1.4.7