#include <FadcFoot.h>
Inheritance diagram for DybDaq::FadcFoot:
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 | ~FadcFoot () |
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 FadcTraits & | fadcTraits () const |
Returns the FadcTraits 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 | |
FadcFoot (const FadcHead &head) | |
Create an instance of this class. | |
FadcFoot (const ByteBuffer &byteBuffer, const FadcTraits &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 | |
FadcFoot () | |
Suppress default. | |
FadcFoot (FadcFoot &rhs) | |
Suppress default. | |
FadcFoot & | operator= (FadcFoot &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 | FadcReadout |
Definition at line 22 of file FadcFoot.h.
FadcFoot::~FadcFoot | ( | ) | [virtual] |
FadcFoot::FadcFoot | ( | const FadcHead & | head | ) | [protected] |
Create an instance of this class.
Definition at line 20 of file FadcFoot.cc.
00020 : 00021 FadcBuffer(new char[head.fadcTraits().footSize() * kBytesInInt], 00022 head.fadcTraits()) { 00023 const FadcTraits& traits = fadcTraits(); 00024 traits.initializeFoot(buffer()); 00025 setTriggerNumber(head.triggerNumber()); 00026 setDataLength((traits.headSize() + traits.footSize()) * kBytesInInt); 00027 }
FadcFoot::FadcFoot | ( | const ByteBuffer & | byteBuffer, | |
const FadcTraits & | traits | |||
) | [protected] |
Create an instance of this class.
Definition at line 29 of file FadcFoot.cc.
00030 : 00031 FadcBuffer(byteBuffer, 00032 traits) { 00033 byteBuffer.position(byteBuffer.position() + kBytesInInt); 00034 }
DybDaq::FadcFoot::FadcFoot | ( | ) | [private] |
Suppress default.
DybDaq::FadcFoot::FadcFoot | ( | FadcFoot & | rhs | ) | [private] |
Suppress default.
unsigned int FadcFoot::triggerNumber | ( | ) | const |
Returns the module address from this readout.
Definition at line 43 of file FadcFoot.cc.
00043 { 00044 return readUnsignedInt(FadcTraits::kFootTriggerNumber); 00045 }
unsigned int FadcFoot::dataLength | ( | ) | const |
Returns the data transfer length, in bytes, contained in this readout.
Definition at line 47 of file FadcFoot.cc.
00047 { 00048 return readUnsignedInt(FadcTraits::kFootDataLength); 00049 }
unsigned int FadcFoot::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 FadcFoot.cc.
00051 { 00052 return fadcTraits().footSize(); 00053 }
unsigned int FadcFoot::formatComponent | ( | ) | const [protected, virtual] |
Returns the component with the format of this buffer.
Reimplemented from DybDaq::DaqBuffer.
Definition at line 39 of file FadcFoot.cc.
00039 { 00040 return FadcTraits::kFoot; 00041 }
void FadcFoot::setTriggerNumber | ( | const unsigned int | triggerNumber | ) | [private] |
Sets the trigger number for this readout.
Definition at line 55 of file FadcFoot.cc.
00055 { 00056 writeField(triggerNumber, 00057 FadcTraits::kFootTriggerNumber); 00058 }
void FadcFoot::setDataLength | ( | const unsigned int | dataLength | ) | [private] |
Sets the data transfer length, in bytes, contained in this readout.
Definition at line 60 of file FadcFoot.cc.
00060 { 00061 writeField(dataLength, 00062 FadcTraits::kFootDataLength); 00063 }
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.
00032 { 00033 return dynamic_cast<const FadcTraits&>(daqTraits()); 00034 }
friend class FadcReadout [friend] |
Definition at line 26 of file FadcFoot.h.