#include <FeeFoot.h>
Inheritance diagram for DybDaq::FeeFoot:
Public Types | |
typedef std::pair< const char *, unsigned int > | OutputBuffer |
typedef std::vector< OutputBuffer > | OutputBufferList |
typedef std::vector< ByteInspector * > | Bytes |
typedef std::vector< BitsInspector * > | Bits |
Public Member Functions | |
virtual | ~FeeFoot () |
Destroy this instance of the class. | |
unsigned int | triggerNumber () 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 FeeTraits & | feeTraits () const |
Returns the FeeTraits instance used to parse this object's buffer. | |
bool | hasDaqTraits () const |
virtual const DaqTraits & | daqTraits () 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 | |
FeeFoot (const FeeHead &head) | |
Create an instance of this class. | |
FeeFoot (const ByteBuffer &byteBuffer, const FeeTraits &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 ByteBuffer & | byteBuffer () 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 | |
FeeFoot () | |
Suppress default. | |
FeeFoot (FeeFoot &rhs) | |
Suppress default. | |
FeeFoot & | operator= (FeeFoot &rhs) |
Suppress default. | |
void | setTriggerNumber (const unsigned int triggerNumber) |
Sets the trigger number for this readout. | |
void | setDataLength (const unsigned int dataLength) |
Sets the data transfer length, in bytes, contained in this readout. | |
Friends | |
class | FeeReadout |
Definition at line 22 of file FeeFoot.h.
FeeFoot::~FeeFoot | ( | ) | [virtual] |
FeeFoot::FeeFoot | ( | const FeeHead & | head | ) | [protected] |
Create an instance of this class.
Definition at line 20 of file FeeFoot.cc.
00020 : 00021 FeeBuffer(new char[head.feeTraits().footSize() * kBytesInInt], 00022 head.feeTraits()) { 00023 const FeeTraits& traits = feeTraits(); 00024 traits.initializeFoot(buffer()); 00025 setTriggerNumber(head.triggerNumber()); 00026 setDataLength((traits.headSize() + traits.footSize()) * kBytesInInt); 00027 }
FeeFoot::FeeFoot | ( | const ByteBuffer & | byteBuffer, | |
const FeeTraits & | traits | |||
) | [protected] |
Create an instance of this class.
Definition at line 29 of file FeeFoot.cc.
00030 : 00031 FeeBuffer(byteBuffer, 00032 traits) { 00033 byteBuffer.position(byteBuffer.position() + kBytesInInt); 00034 }
DybDaq::FeeFoot::FeeFoot | ( | ) | [private] |
Suppress default.
DybDaq::FeeFoot::FeeFoot | ( | FeeFoot & | rhs | ) | [private] |
Suppress default.
unsigned int FeeFoot::triggerNumber | ( | ) | const |
Returns the module address from this readout.
Definition at line 43 of file FeeFoot.cc.
00043 { 00044 return readUnsignedInt(FeeTraits::kFootTriggerNumber); 00045 }
unsigned int FeeFoot::dataLength | ( | ) | const |
Returns the data transfer length, in bytes, contained in this readout.
Definition at line 47 of file FeeFoot.cc.
00047 { 00048 return readUnsignedInt(FeeTraits::kFootDataLength); 00049 }
unsigned int FeeFoot::bufferSize | ( | ) | const [virtual] |
Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
Implements DybDaq::DaqBuffer.
Definition at line 51 of file FeeFoot.cc.
unsigned int FeeFoot::formatComponent | ( | ) | const [protected, virtual] |
Returns the component with the format of this buffer.
Reimplemented from DybDaq::DaqBuffer.
Definition at line 39 of file FeeFoot.cc.
00039 { 00040 return FeeTraits::kFoot; 00041 }
void FeeFoot::setTriggerNumber | ( | const unsigned int | triggerNumber | ) | [private] |
Sets the trigger number for this readout.
Definition at line 55 of file FeeFoot.cc.
00055 { 00056 writeField(triggerNumber, 00057 FeeTraits::kFootTriggerNumber); 00058 }
void FeeFoot::setDataLength | ( | const unsigned int | dataLength | ) | [private] |
Sets the data transfer length, in bytes, contained in this readout.
Definition at line 60 of file FeeFoot.cc.
00060 { 00061 writeField(dataLength, 00062 FeeTraits::kFootDataLength); 00063 }
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 }
friend class FeeReadout [friend] |