/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends
DybDaq::FadcHead Class Reference

#include <FadcHead.h>

Inheritance diagram for DybDaq::FadcHead:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::FadcHead:
Collaboration graph
[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 ~FadcHead ()
 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 fadc format.
unsigned int triggerNumber () const
 Returns the trigger number from this readout.
unsigned int triggerType () const
 Returns the trigger type from this readout.
bool noData () const
 Returns true if there is no data, just a head and foot.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const FadcTraitsfadcTraits () const
 Returns the FadcTraits 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

 FadcHead (const unsigned int triggerNumber, const unsigned int triggerType, const bool noData, const FadcTraits &traits)
 Create an instance of this class.
 FadcHead (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

 FadcHead ()
 Suppress default.
 FadcHead (FadcHead &rhs)
 Suppress default.
FadcHeadoperator= (FadcHead &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 setNoData (const bool checked)
 Sets whether there is no data, just a head and foot or not.

Private Attributes

const FadcTraitsm_traits
 The FadcTraits instance used to parse this object's buffer.

Friends

class FadcReadout

Detailed Description

Definition at line 20 of file FadcHead.h.


Constructor & Destructor Documentation

FadcHead::~FadcHead ( ) [virtual]

Destroy this instance of the class.

Definition at line 39 of file FadcHead.cc.

                    {
}
FadcHead::FadcHead ( const unsigned int  triggerNumber,
const unsigned int  triggerType,
const bool  noData,
const FadcTraits traits 
) [protected]

Create an instance of this class.

Definition at line 17 of file FadcHead.cc.

                                             :
    FadcBuffer(new char[traits.headSize() * kBytesInInt],
               traits) {
    m_traits = &traits;
    traits.initializeHead(buffer());
    setTriggerNumber(triggerNumber);
    setTriggerType(triggerType);
    setNoData(noData);
}
FadcHead::FadcHead ( const ByteBuffer byteBuffer) [protected]

Create an instance of this class.

Definition at line 31 of file FadcHead.cc.

                                               :
    FadcBuffer(byteBuffer,
               *((FadcTraits*)0)) {
    const char* buffer = byteBuffer.cursor();
    m_traits = FadcTraits::readTraits(buffer);
    byteBuffer.position(byteBuffer.position() + kBytesInInt);
}
DybDaq::FadcHead::FadcHead ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

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

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

Reimplemented from DybDaq::DaqBuffer.

Definition at line 50 of file FadcHead.cc.

                                            {
    return *m_traits;
}
unsigned int FadcHead::version ( ) const

Returns the version of the fadc format.

Definition at line 46 of file FadcHead.cc.

unsigned int FadcHead::triggerNumber ( ) const

Returns the trigger number from this readout.

Definition at line 54 of file FadcHead.cc.

unsigned int FadcHead::triggerType ( ) const

Returns the trigger type from this readout.

Definition at line 58 of file FadcHead.cc.

bool FadcHead::noData ( ) const

Returns true if there is no data, just a head and foot.

Definition at line 62 of file FadcHead.cc.

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

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

Implements DybDaq::DaqBuffer.

Definition at line 66 of file FadcHead.cc.

                                        {
    return fadcTraits().headSize();
}
unsigned int FadcHead::formatComponent ( ) const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 42 of file FadcHead.cc.

                                             {
    return FadcTraits::kHead;
}
FadcHead& DybDaq::FadcHead::operator= ( FadcHead rhs) [private]

Suppress default.

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

Sets the trigger number from this readout.

Definition at line 70 of file FadcHead.cc.

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

Sets the trigger type from this readout.

Definition at line 75 of file FadcHead.cc.

void FadcHead::setNoData ( const bool  checked) [private]

Sets whether there is no data, just a head and foot or not.

Definition at line 80 of file FadcHead.cc.

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.

                                               {
    return dynamic_cast<const FadcTraits&>(daqTraits());
}

Friends And Related Function Documentation

friend class FadcReadout [friend]

Definition at line 24 of file FadcHead.h.


Member Data Documentation

The FadcTraits 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 118 of file FadcHead.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 Fri May 16 2014 09:52:59 for FadcReadoutFormat by doxygen 1.7.4