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

In This Package:

DybDaq::FeeHead Class Reference

#include <FeeHead.h>

Inheritance diagram for DybDaq::FeeHead:

[legend]
Collaboration diagram for DybDaq::FeeHead:
[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 ~FeeHead ()
 Destroy this instance of the class.
virtual const DaqTraitsdaqTraits () const
 Returns the DaqTraits instance used to parse this object's buffer.
unsigned int version () const
 Returns the version of the fee format.
unsigned int triggerNumber () const
 Returns the trigger number from this readout.
unsigned int triggerType () const
 Returns the trigger type from this readout.
bool checked () const
 Returns true if the data is checked.
bool error () const
 Returns true if the data has an error.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const FeeTraitsfeeTraits () const
 Returns the FeeTraits instance used to parse this object's buffer.
bool hasDaqTraits () 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

 FeeHead (const unsigned int triggerNumber, const unsigned int triggerType, const bool checked, const bool error, const FeeTraits &traits)
 Create an instance of this class.
 FeeHead (const ByteBuffer &byteBuffer)
 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

 FeeHead ()
 Suppress default.
 FeeHead (FeeHead &rhs)
 Suppress default.
FeeHeadoperator= (FeeHead &rhs)
 Suppress default.
void setTriggerNumber (const unsigned int triggerNumber)
 Sets the trigger number from this readout.
void setTriggerType (const unsigned int triggerType)
 Sets the trigger type from this readout.
void setChecked (const bool checked)
 Sets whether the data is checked or not.
void setError (const bool error)
 Sets whether the data has an error or not.

Private Attributes

const FeeTraitsm_traits
 The FeeTraits instance used to parse this object's buffer.

Friends

class FeeReadout

Detailed Description

Definition at line 20 of file FeeHead.h.


Constructor & Destructor Documentation

FeeHead::~FeeHead (  )  [virtual]

Destroy this instance of the class.

Definition at line 42 of file FeeHead.cc.

00042                   {
00043 }

FeeHead::FeeHead ( const unsigned int  triggerNumber,
const unsigned int  triggerType,
const bool  checked,
const bool  error,
const FeeTraits traits 
) [protected]

Create an instance of this class.

Definition at line 18 of file FeeHead.cc.

00022                                           :
00023 FeeBuffer(new char[traits.headSize() * kBytesInInt],
00024           traits) {
00025     m_traits = &traits;
00026     traits.initializeHead(buffer());
00027     setTriggerNumber(triggerNumber);
00028     setTriggerType(triggerType);
00029     setChecked(checked);
00030     setError(error);
00031 }

FeeHead::FeeHead ( const ByteBuffer byteBuffer  )  [protected]

Create an instance of this class.

Definition at line 34 of file FeeHead.cc.

00034                                              :
00035 FeeBuffer(byteBuffer,
00036           *((FeeTraits*)0)) {
00037     const char* buffer = byteBuffer.cursor();
00038     m_traits = FeeTraits::readTraits(buffer);
00039         byteBuffer.position(byteBuffer.position() + kBytesInInt);
00040 }

DybDaq::FeeHead::FeeHead (  )  [private]

Suppress default.

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

Suppress default.


Member Function Documentation

const DaqTraits & FeeHead::daqTraits (  )  const [virtual]

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

Reimplemented from DybDaq::DaqBuffer.

Definition at line 49 of file FeeHead.cc.

00049                                            {
00050     return *m_traits;
00051 }

unsigned int FeeHead::version (  )  const

Returns the version of the fee format.

Definition at line 45 of file FeeHead.cc.

00045                                     {
00046     return readUnsignedInt(FeeTraits::kMinorVersion);
00047 }

unsigned int FeeHead::triggerNumber (  )  const

Returns the trigger number from this readout.

Definition at line 57 of file FeeHead.cc.

00057                                           {
00058         return readUnsignedInt(FeeTraits::kHeadTriggerNumber);
00059 }

unsigned int FeeHead::triggerType (  )  const

Returns the trigger type from this readout.

Definition at line 61 of file FeeHead.cc.

00061                                         {
00062         return readUnsignedInt(FeeTraits::kTriggerType);
00063 }

bool FeeHead::checked (  )  const

Returns true if the data is checked.

Definition at line 65 of file FeeHead.cc.

00065                             {
00066         return readUnsignedInt(FeeTraits::kChecked);
00067 }

bool FeeHead::error (  )  const

Returns true if the data has an error.

Definition at line 69 of file FeeHead.cc.

00069                           {
00070         return readUnsignedInt(FeeTraits::kError);
00071 }

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

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

Implements DybDaq::DaqBuffer.

Definition at line 73 of file FeeHead.cc.

00073                                        {
00074     return feeTraits().headSize();
00075 }

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

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 53 of file FeeHead.cc.

00053                                             {
00054     return FeeTraits::kHead;
00055 }

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

Suppress default.

void FeeHead::setTriggerNumber ( const unsigned int  triggerNumber  )  [private]

Sets the trigger number from this readout.

Definition at line 77 of file FeeHead.cc.

void FeeHead::setTriggerType ( const unsigned int  triggerType  )  [private]

Sets the trigger type from this readout.

Definition at line 82 of file FeeHead.cc.

00082                                                            {
00083     writeField(triggerType,
00084                FeeTraits::kTriggerType);
00085 }

void FeeHead::setChecked ( const bool  checked  )  [private]

Sets whether the data is checked or not.

Definition at line 87 of file FeeHead.cc.

00087                                            {
00088     writeField(checked,
00089                FeeTraits::kChecked);
00090 }

void FeeHead::setError ( const bool  error  )  [private]

Sets whether the data has an error or not.

Definition at line 92 of file FeeHead.cc.

00092                                        {
00093     writeField(error,
00094                FeeTraits::kError);
00095 }

const FeeTraits & FeeBuffer::feeTraits (  )  const [inherited]

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

Definition at line 34 of file FeeBuffer.cc.

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


Friends And Related Function Documentation

friend class FeeReadout [friend]

Definition at line 24 of file FeeHead.h.


Member Data Documentation

const FeeTraits* DybDaq::FeeHead::m_traits [private]

The FeeTraits instance used to parse this object's buffer.

This is set after construction, so can not use base class's.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 129 of file FeeHead.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:03 2011 for FeeReadoutFormat by doxygen 1.4.7