/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 | Friends
DybDaq::RomHeader Class Reference

#include <RomHeader.h>

Inheritance diagram for DybDaq::RomHeader:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::RomHeader:
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 ~RomHeader ()
 Destroy this instance of the class.
unsigned int headerSize () const
 Returns the length of this head in the buffer in 4-byte words.
unsigned int totalSize () const
 Returns the total size of the event in the buffer in 4-byte words.
unsigned int site () const
 Returns the site of the fragment in the buffer.
unsigned int detector () const
 Returns the detector of the fragment in the buffer.
unsigned int moduleType () const
 Returns the module type of the fragment in the buffer.
unsigned int slot () const
 Returns the slot of the fragment in the buffer.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
const EventTraitseventTraits () const
 Returns the EventTraits instance used to parse this object's buffer.
bool hasDaqTraits () const
virtual const DaqTraitsdaqTraits () 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

 RomHeader (const unsigned int site, const unsigned int detector, const unsigned int moduleType, const unsigned int slot, const EventTraits &traits)
 Create an instance of this class.
 RomHeader (const ByteBuffer &byteBuffer, const EventTraits &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 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

 RomHeader ()
 Suppress default.
 RomHeader (RomHeader &rhs)
 Suppress default.
RomHeaderoperator= (RomHeader &rhs)
 Suppress default.
void setHeaderSize (const unsigned int headerLength)
 Sets the length of this head in the buffer in 4-byte words.
void setTotalSize (const unsigned int totalLength)
 Sets the total size of the event in the buffer in 4-byte words.
void setSite (const unsigned int site)
 Sets the site of the fragment in the buffer.
void setDetector (const unsigned int detector)
 Sets the detector of the fragment in the buffer.
void setModuleType (const unsigned int moduleType)
 Sets the module type of the fragment in the buffer.
void setSlot (const unsigned int slot)
 Sets the slot of the fragment in the buffer.

Friends

class RomFragment

Detailed Description

Definition at line 21 of file RomHeader.h.


Constructor & Destructor Documentation

RomHeader::~RomHeader ( ) [virtual]

Destroy this instance of the class.

Definition at line 45 of file RomHeader.cc.

                      {
}
RomHeader::RomHeader ( const unsigned int  site,
const unsigned int  detector,
const unsigned int  moduleType,
const unsigned int  slot,
const EventTraits traits 
) [protected]

Create an instance of this class.

Definition at line 19 of file RomHeader.cc.

                                                :
EventBuffer(new char[traits.headerSize(EventTraits::kRomHeader) * kBytesInInt],
            traits) {
    traits.initializeHeader(EventTraits::kRomHeader,
                            buffer());
    setHeaderSize(traits.headerSize(EventTraits::kRomHeader)),
    setTotalSize(headerSize());
    // TODO: Fix, for the dry run site & detector not set!
    setSite(0);
    setDetector(0);

    setModuleType(moduleType);
    setSlot(slot);
}                         
RomHeader::RomHeader ( const ByteBuffer byteBuffer,
const EventTraits traits 
) [protected]

Create an instance of this class.

Definition at line 38 of file RomHeader.cc.

                                                :
EventBuffer(byteBuffer,
                        traits) {
        byteBuffer.position(byteBuffer.position() + (headerSize() * kBytesInInt));
}
DybDaq::RomHeader::RomHeader ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

unsigned int RomHeader::headerSize ( ) const

Returns the length of this head in the buffer in 4-byte words.

Definition at line 52 of file RomHeader.cc.

unsigned int RomHeader::totalSize ( ) const

Returns the total size of the event in the buffer in 4-byte words.

Definition at line 56 of file RomHeader.cc.

unsigned int RomHeader::site ( ) const

Returns the site of the fragment in the buffer.

Definition at line 60 of file RomHeader.cc.

unsigned int RomHeader::detector ( ) const

Returns the detector of the fragment in the buffer.

Definition at line 64 of file RomHeader.cc.

unsigned int RomHeader::moduleType ( ) const

Returns the module type of the fragment in the buffer.

Definition at line 68 of file RomHeader.cc.

unsigned int RomHeader::slot ( ) const

Returns the slot of the fragment in the buffer.

Definition at line 72 of file RomHeader.cc.

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

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

Implements DybDaq::DaqBuffer.

Definition at line 76 of file RomHeader.cc.

                                         {
    return headerSize();
}
unsigned int RomHeader::formatComponent ( ) const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 48 of file RomHeader.cc.

RomHeader& DybDaq::RomHeader::operator= ( RomHeader rhs) [private]

Suppress default.

void RomHeader::setHeaderSize ( const unsigned int  headerLength) [private]

Sets the length of this head in the buffer in 4-byte words.

Definition at line 80 of file RomHeader.cc.

void RomHeader::setTotalSize ( const unsigned int  totalLength) [private]

Sets the total size of the event in the buffer in 4-byte words.

Definition at line 85 of file RomHeader.cc.

void RomHeader::setSite ( const unsigned int  site) [private]

Sets the site of the fragment in the buffer.

Definition at line 90 of file RomHeader.cc.

void RomHeader::setDetector ( const unsigned int  detector) [private]

Sets the detector of the fragment in the buffer.

Definition at line 95 of file RomHeader.cc.

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

Sets the module type of the fragment in the buffer.

Definition at line 100 of file RomHeader.cc.

void RomHeader::setSlot ( const unsigned int  slot) [private]

Sets the slot of the fragment in the buffer.

Definition at line 105 of file RomHeader.cc.

const EventTraits & EventBuffer::eventTraits ( ) const [inherited]

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

Definition at line 35 of file EventBuffer.cc.

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

Friends And Related Function Documentation

friend class RomFragment [friend]

Definition at line 25 of file RomHeader.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:16 for EventReadoutFormat by doxygen 1.7.4