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

#include <EventHeader.h>

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

 EventHeader (const unsigned int site, const unsigned int detector, const unsigned int run, const unsigned int event, const unsigned int dataType, const bool cbltWrapping, const bool rawCblt, const bool triggerMismatch, const bool invalidData, const bool rpcSortDisabled, const bool dataSortTimeout, const EventTraits &traits)
 Create an instance of this class.
 EventHeader (const ByteBuffer &byteBuffer)
 Create an instance of this class.
virtual ~EventHeader ()
 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 event format.
unsigned int minorVersion () const
 Returns the minorVersion of the event format.
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 event in the buffer.
unsigned int detector () const
 Returns the detector of the event in the buffer.
unsigned int run () const
 Returns the run number of the event in the buffer.
unsigned int event () const
 Returns the event number of the event in the buffer.
unsigned int dataType () const
 Returns the data type of the event in the buffer.
bool rpcSortDisabled () const
 True if the RPC Assemble Sort is disabled.
bool cbltWrapping () const
 True if 2 extra 4-byte words are resevered for CBLT header and footer.
bool rawCblt () const
 True if the event is raw DBLT readout data, no ROM Fragment.
bool dataSortTimeout () const
 True if the SFO Data Sort has timed out.
bool triggerMismatch () const
 True if the event contains a mis-matched trigger.
bool invalidData () const
 True if the event contains invalid data.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
void setTotalSize (const unsigned int totalLength)
 Sets the total size of the event in the buffer in 4-byte words.
const EventTraitseventTraits () const
 Returns the EventTraits 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

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

 EventHeader ()
 Suppress default.
 EventHeader (EventHeader &rhs)
 Suppress default.
EventHeaderoperator= (EventHeader &rhs)
 Suppress default.
void setMajorVersion (const unsigned int majorVersion)
 Sets the majorVersion of the event format.
void setMinorVersion (const unsigned int minorVersion)
 Sets the minorVersion of the event format.
void setHeaderSize (const unsigned int headerLength)
 Sets the length of this head in the buffer in 4-byte words.
void setSite (const unsigned int site)
 Sets the site of the event in the buffer.
void setDetector (const unsigned int detector)
 Sets the detector of the event in the buffer.
void setRun (const unsigned int run)
 Sets the run number of the event in the buffer.
void setEvent (const unsigned int event)
 Sets the event number of the event in the buffer.
void setDataType (const unsigned int dataType)
 Sets the data type of the event in the buffer.
void setRpcSortDisabled (const bool disabled)
 Sets whether the RPC Assemble Sort is disabled or not.
void setCbltWrapping (const bool cbltWrapping)
 Sets whether 2 extra 4-byte words are resevered for CBLT header and footer or not.
void setRawCblt (const bool rawCblt)
 Sets whether the event is raw DBLT readout data, no ROM Fragmentor not.
void setDataSortTimeout (bool timedOut)
 Sets whether the SFO Data Sort has timed out or not.
void setTriggerMismatch (const bool triggerMismatch)
 Sets whether the event contains a mis-matched trigger or not.
void setInvalidData (const bool invalidData)
 Sets whether the event contains invalid data or not.

Private Attributes

const EventTraitsm_traits
 The EventTraits instance used to parse this object's buffer.

Detailed Description

Definition at line 16 of file EventHeader.h.


Constructor & Destructor Documentation

EventHeader::EventHeader ( const unsigned int  site,
const unsigned int  detector,
const unsigned int  run,
const unsigned int  event,
const unsigned int  dataType,
const bool  cbltWrapping,
const bool  rawCblt,
const bool  triggerMismatch,
const bool  invalidData,
const bool  rpcSortDisabled,
const bool  dataSortTimeout,
const EventTraits traits 
)
EventHeader::EventHeader ( const ByteBuffer byteBuffer)

Create an instance of this class.

Definition at line 53 of file EventHeader.cc.

                                                     :
EventBuffer(byteBuffer,
            *((EventTraits*)0)) {
    const char* buffer = byteBuffer.cursor();
    m_traits = EventTraits::readTraits(buffer);
        byteBuffer.position(byteBuffer.position() + (headerSize() * kBytesInInt));
}
EventHeader::~EventHeader ( ) [virtual]

Destroy this instance of the class.

Definition at line 61 of file EventHeader.cc.

                          {
}
DybDaq::EventHeader::EventHeader ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

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

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

Reimplemented from DybDaq::DaqBuffer.

Definition at line 64 of file EventHeader.cc.

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

Returns the majorVersion of the event format.

Definition at line 72 of file EventHeader.cc.

unsigned int EventHeader::minorVersion ( ) const

Returns the minorVersion of the event format.

Definition at line 76 of file EventHeader.cc.

unsigned int EventHeader::headerSize ( ) const

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

Definition at line 80 of file EventHeader.cc.

unsigned int EventHeader::totalSize ( ) const

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

Definition at line 84 of file EventHeader.cc.

unsigned int EventHeader::site ( ) const

Returns the site of the event in the buffer.

Definition at line 88 of file EventHeader.cc.

unsigned int EventHeader::detector ( ) const

Returns the detector of the event in the buffer.

Definition at line 92 of file EventHeader.cc.

unsigned int EventHeader::run ( ) const

Returns the run number of the event in the buffer.

Definition at line 96 of file EventHeader.cc.

unsigned int EventHeader::event ( ) const

Returns the event number of the event in the buffer.

Definition at line 100 of file EventHeader.cc.

unsigned int EventHeader::dataType ( ) const

Returns the data type of the event in the buffer.

Definition at line 104 of file EventHeader.cc.

bool EventHeader::rpcSortDisabled ( ) const

True if the RPC Assemble Sort is disabled.

Definition at line 108 of file EventHeader.cc.

bool EventHeader::cbltWrapping ( ) const

True if 2 extra 4-byte words are resevered for CBLT header and footer.

Definition at line 112 of file EventHeader.cc.

bool EventHeader::rawCblt ( ) const

True if the event is raw DBLT readout data, no ROM Fragment.

Definition at line 116 of file EventHeader.cc.

bool EventHeader::dataSortTimeout ( ) const

True if the SFO Data Sort has timed out.

Definition at line 120 of file EventHeader.cc.

bool EventHeader::triggerMismatch ( ) const

True if the event contains a mis-matched trigger.

Definition at line 124 of file EventHeader.cc.

bool EventHeader::invalidData ( ) const

True if the event contains invalid data.

Definition at line 128 of file EventHeader.cc.

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

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

Implements DybDaq::DaqBuffer.

Definition at line 132 of file EventHeader.cc.

                                           {
    return headerSize();
}
void EventHeader::setTotalSize ( const unsigned int  totalLength)

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

Definition at line 151 of file EventHeader.cc.

unsigned int EventHeader::formatComponent ( ) const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 68 of file EventHeader.cc.

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

Suppress default.

void EventHeader::setMajorVersion ( const unsigned int  majorVersion) [private]

Sets the majorVersion of the event format.

Definition at line 136 of file EventHeader.cc.

void EventHeader::setMinorVersion ( const unsigned int  minorVersion) [private]

Sets the minorVersion of the event format.

Definition at line 141 of file EventHeader.cc.

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

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

Definition at line 146 of file EventHeader.cc.

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

Sets the site of the event in the buffer.

Definition at line 156 of file EventHeader.cc.

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

Sets the detector of the event in the buffer.

Definition at line 161 of file EventHeader.cc.

void EventHeader::setRun ( const unsigned int  run) [private]

Sets the run number of the event in the buffer.

Definition at line 166 of file EventHeader.cc.

void EventHeader::setEvent ( const unsigned int  event) [private]

Sets the event number of the event in the buffer.

Definition at line 171 of file EventHeader.cc.

void EventHeader::setDataType ( const unsigned int  dataType) [private]

Sets the data type of the event in the buffer.

Definition at line 176 of file EventHeader.cc.

void EventHeader::setRpcSortDisabled ( const bool  disabled) [private]

Sets whether the RPC Assemble Sort is disabled or not.

Definition at line 181 of file EventHeader.cc.

void EventHeader::setCbltWrapping ( const bool  cbltWrapping) [private]

Sets whether 2 extra 4-byte words are resevered for CBLT header and footer or not.

Definition at line 186 of file EventHeader.cc.

void EventHeader::setRawCblt ( const bool  rawCblt) [private]

Sets whether the event is raw DBLT readout data, no ROM Fragmentor not.

Definition at line 191 of file EventHeader.cc.

void EventHeader::setDataSortTimeout ( bool  timedOut) [private]

Sets whether the SFO Data Sort has timed out or not.

Definition at line 196 of file EventHeader.cc.

void EventHeader::setTriggerMismatch ( const bool  triggerMismatch) [private]

Sets whether the event contains a mis-matched trigger or not.

Definition at line 201 of file EventHeader.cc.

void EventHeader::setInvalidData ( const bool  invalidData) [private]

Sets whether the event contains invalid data or not.

Definition at line 206 of file EventHeader.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());
}

Member Data Documentation

The EventTraits 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 235 of file EventHeader.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