/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::FeeHead Class Reference

#include <FeeHead.h>

Inheritance diagram for DybDaq::FeeHead:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::FeeHead:
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 ~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.

                  {
}
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.

                                          :
FeeBuffer(new char[traits.headSize() * kBytesInInt],
          traits) {
    m_traits = &traits;
    traits.initializeHead(buffer());
    setTriggerNumber(triggerNumber);
    setTriggerType(triggerType);
    setChecked(checked);
    setError(error);
}
FeeHead::FeeHead ( const ByteBuffer byteBuffer) [protected]

Create an instance of this class.

Definition at line 34 of file FeeHead.cc.

                                             :
FeeBuffer(byteBuffer,
          *((FeeTraits*)0)) {
    const char* buffer = byteBuffer.cursor();
    m_traits = FeeTraits::readTraits(buffer);
        byteBuffer.position(byteBuffer.position() + kBytesInInt);
}
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.

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

Returns the version of the fee format.

Definition at line 45 of file FeeHead.cc.

unsigned int FeeHead::triggerNumber ( ) const

Returns the trigger number from this readout.

Definition at line 57 of file FeeHead.cc.

unsigned int FeeHead::triggerType ( ) const

Returns the trigger type from this readout.

Definition at line 61 of file FeeHead.cc.

bool FeeHead::checked ( ) const

Returns true if the data is checked.

Definition at line 65 of file FeeHead.cc.

bool FeeHead::error ( ) const

Returns true if the data has an error.

Definition at line 69 of file FeeHead.cc.

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.

                                       {
    return feeTraits().headSize();
}
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.

                                            {
    return FeeTraits::kHead;
}
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.

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

Sets whether the data is checked or not.

Definition at line 87 of file FeeHead.cc.

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

Sets whether the data has an error or not.

Definition at line 92 of file FeeHead.cc.

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.

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

Friends And Related Function Documentation

friend class FeeReadout [friend]

Definition at line 24 of file FeeHead.h.


Member Data Documentation

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 Fri May 16 2014 09:53:02 for FeeReadoutFormat by doxygen 1.7.4