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

#include <CbltHead.h>

Inheritance diagram for DybDaq::CbltHead:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::CbltHead:
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 ~CbltHead ()
 Destroy this instance of the class.
virtual const DaqTraitsdaqTraits () const
 Returns the DaqTraits instance used to parse this object's buffer.
unsigned int majorVersion () const
 Returns the majorVersion of the CBLT format.
unsigned int minorVersion () const
 Returns the minorVersion of the CBLT format.
unsigned int moduleAddress () const
 Returns the module address from this readout.
unsigned int moduleType () const
 Returns the module type from this readout.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const CbltTraitscbltTraits () const
 Returns the CbltTraits 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

 CbltHead (const unsigned int moduleAddress, const unsigned int moduleType, const CbltTraits &traits)
 Create an instance of this class.
 CbltHead (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

 CbltHead ()
 Suppress default.
 CbltHead (CbltHead &rhs)
 Suppress default.
CbltHeadoperator= (CbltHead &rhs)
 Suppress default.
void setModuleAddress (const unsigned int moduleAddress)
 Sets the module address from this readout.
void setModuleType (const unsigned int moduleType)
 Sets the module address from this readout.

Private Attributes

const CbltTraitsm_traits
 The CbltTraits instance used to parse this object's buffer.

Friends

class CbltReadout

Detailed Description

Definition at line 20 of file CbltHead.h.


Constructor & Destructor Documentation

CbltHead::~CbltHead ( ) [virtual]

Destroy this instance of the class.

Definition at line 39 of file CbltHead.cc.

                    {
}
CbltHead::CbltHead ( const unsigned int  moduleAddress,
const unsigned int  moduleType,
const CbltTraits traits 
) [protected]

Create an instance of this class.

Definition at line 20 of file CbltHead.cc.

                                             :
CbltBuffer(new char[traits.headSize() * kBytesInInt],
traits) {
    m_traits = &traits;
    traits.initializeHead(buffer());
    setModuleAddress(moduleAddress);
    setModuleType(moduleType);
}
CbltHead::CbltHead ( const ByteBuffer byteBuffer) [protected]

Create an instance of this class.

Definition at line 31 of file CbltHead.cc.

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

Suppress default.

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

Suppress default.


Member Function Documentation

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

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

Reimplemented from DybDaq::DaqBuffer.

Definition at line 42 of file CbltHead.cc.

                                            {
    return *m_traits;
}
unsigned int CbltHead::majorVersion ( ) const

Returns the majorVersion of the CBLT format.

Definition at line 50 of file CbltHead.cc.

unsigned int CbltHead::minorVersion ( ) const

Returns the minorVersion of the CBLT format.

Definition at line 57 of file CbltHead.cc.

unsigned int CbltHead::moduleAddress ( ) const

Returns the module address from this readout.

Definition at line 64 of file CbltHead.cc.

unsigned int CbltHead::moduleType ( ) const

Returns the module type from this readout.

Definition at line 68 of file CbltHead.cc.

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

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

Implements DybDaq::DaqBuffer.

Definition at line 72 of file CbltHead.cc.

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

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 46 of file CbltHead.cc.

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

Suppress default.

void CbltHead::setModuleAddress ( const unsigned int  moduleAddress) [private]

Sets the module address from this readout.

Definition at line 76 of file CbltHead.cc.

void CbltHead::setModuleType ( const unsigned int  moduleType) [private]

Sets the module address from this readout.

Definition at line 81 of file CbltHead.cc.

const CbltTraits & CbltBuffer::cbltTraits ( ) const [inherited]

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

Definition at line 34 of file CbltBuffer.cc.

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

Friends And Related Function Documentation

friend class CbltReadout [friend]

Definition at line 24 of file CbltHead.h.


Member Data Documentation

The CbltTraits 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 112 of file CbltHead.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:11 for CbltReadoutFormat by doxygen 1.7.4