/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 | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Friends
DybDaq::LtbFrame Class Reference

#include <LtbFrame.h>

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

 LtbFrame (const unsigned int readoutType, const unsigned int triggerMask, const LtbTraits::LtbDateTime &dateTime, const unsigned int halfNanoseconds, const int accumulation, const unsigned int hitSum, const bool totalEsum, const bool highEsum, const bool lowEsum, const unsigned int energySum, const unsigned int crossTriggerSource, const bool accumulationStatus, const bool validGps, const bool usingUtc, const bool validClockSystem, const bool feeBufferFull, const bool ltbBufferFull, const unsigned int blockedTriggerCount, const LtbTraits &traits)
 Create an instance of this class.
virtual ~LtbFrame ()
 Destroy this instance of the class.
unsigned int frameNumber () const
 Returns the number of the frame in the LTB package.
unsigned int readoutType () const
 Returns the readout type of this object.
unsigned int triggerMask () const
 Returns the readout type of this object.
bool isTriggerLineSet (const unsigned int line) const
 Returns true if the specified trigger lines bit is set.
const LtbTraits::LtbDateTimedateTime () const
 Returns the readout type of this object.
unsigned int ticks () const
 Returns the number of ticks, passed the data and time, of this object.
unsigned int halfNanoseconds () const
 Returns the 1/2 nanoseconds within the seconds of this object.
int accumulation () const
 Returns the accumulated deviation of 1/2 nanosecond from the PPS.
unsigned int hitSum () const
 Returns the total hits summation for the object.
bool totalEsum () const
 Returns true if this total energy summation threshold is passed.
bool highEsum () const
 Returns true if this high energy summation threshold is passed.
bool lowEsum () const
 Returns true if this low energy summation threshold is passed.
unsigned int energySum () const
 Returns the total energy summation for the object.
unsigned int crossTriggerSource () const
 Returns the source, if any of any cross trigger received.
bool accumulationStatus () const
 Returns true if the accumulation exceeds the 32-bit integer.
bool validGps () const
 Returns true if the trigger system is using GPS.
bool usingUtc () const
 Returns true if using GPS and using UTC.
bool validClockSystem () const
 Returns true if the clock is external to to the LTB.
bool feeBufferFull () const
 Returns true if the FEE buffer is full between this valid local trigger and the last valid local trigger.
bool ltbBufferFull () const
 Returns true if the LTB buffer is full between this valid local trigger and the last valid local trigger.
unsigned int blockedTriggerCount () const
 Returns the number block trigger in this object.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
virtual unsigned int gather (OutputBufferList &outputBuffers) const
 Adds to the supplied list the OutputBuffers that contain the DAQ format of this object's content, returning the total number of bytes in the added buffers.
virtual unsigned int inspect (DaqBuffer::Bytes &inspectors) const
 Adds to the supplied list the DaqBuffer::Bytes that contains inspections of this object's objects.
void setTriggerLine (const unsigned int line)
 Sets the specified trigger line.
void setFrameNumber (const unsigned int frameNumber)
 Sets the number of the frame in the LTB package.
void setReadoutType (const unsigned int readoutType)
 Sets the readout type of this object.
void setTriggerMask (const unsigned int triggerMask)
 Sets the trigger mask of this object.
void setDateTime (const LtbTraits::LtbDateTime &dataTime)
 Returns the readout type of this object.
void setHalfNanoseconds (const unsigned int halfNanoseconds)
 Sets the 1/2 nanoseconds within the seconds of this object.
void setAccumulation (const int accumulation)
 Sets the accumulated deviation of 1/2 nanosecond from the PPS.
void setHitSum (const unsigned int hitSum)
 Sets the total hits summation for the object.
void setTotalEsum (const bool totalEsum)
 Sets whether the total energy summation threshold is passed or not.
void setHighEsum (const bool highEsum)
 Sets whether the high energy summation threshold is passed or not.
void setLowEsum (const bool lowEsum)
 Sets whether the low energy summation threshold is passed or not.
void setEnergySum (const unsigned int energySum)
 Sets the total energy summation for the object.
void setCrossTriggerSource (const unsigned int crossTriggerSource)
 Sets the source, if any of any cross trigger received.
void setAccumulationStatus (const bool accumulationStatus)
 Sets whether the accumulation exceeds the 32-bit integer or not.
void setValidGps (const bool validGps)
 Sets whether the trigger system is using GPS or not.
void setUsingUtc (const bool usingUtc)
 Sets whether if using GPS and using UTC or not.
void setValidClockSystem (const bool validClockSystem)
 Sets whether if the clock is external to to the LTB or not.
void setFeeBufferFull (const bool feeBufferFull)
 Sets whether FEE buffer is full between this valid local trigger and the last valid local trigger or not.
void setLtbBufferFull (const bool ltbBufferFull)
 Sets whether LTB buffer is full between this valid local trigger and the last valid local trigger ot not.
void setBlockedTriggerCount (const unsigned int blockedTriggerCount)
 Sets the number block trigger in this object.
const LtbTraitsltbTraits () const
 Returns the LtbTraits instance used to parse this object's buffer.
bool hasDaqTraits () const
virtual const DaqTraitsdaqTraits () const

Public Attributes

LtbTimem_time
 The time of this trigger.

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

 LtbFrame (const ByteBuffer &byteBuffer, const LtbTraits &traits)
 Create an instance of this class.
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)
virtual unsigned int formatComponent () const

Private Member Functions

 LtbFrame ()
 Suppress default.
 LtbFrame (LtbFrame &rhs)
 Suppress default.
LtbFrameoperator= (LtbFrame &rhs)
 Suppress default.

Friends

class LtbReadout

Detailed Description

Definition at line 23 of file LtbFrame.h.


Constructor & Destructor Documentation

LtbFrame::LtbFrame ( const unsigned int  readoutType,
const unsigned int  triggerMask,
const LtbTraits::LtbDateTime dateTime,
const unsigned int  halfNanoseconds,
const int  accumulation,
const unsigned int  hitSum,
const bool  totalEsum,
const bool  highEsum,
const bool  lowEsum,
const unsigned int  energySum,
const unsigned int  crossTriggerSource,
const bool  accumulationStatus,
const bool  validGps,
const bool  usingUtc,
const bool  validClockSystem,
const bool  feeBufferFull,
const bool  ltbBufferFull,
const unsigned int  blockedTriggerCount,
const LtbTraits traits 
)
LtbFrame::~LtbFrame ( ) [virtual]

Destroy this instance of the class.

Definition at line 80 of file LtbFrame.cc.

                    {
    if (0 != m_time) {
        delete m_time;
    }
}
LtbFrame::LtbFrame ( const ByteBuffer byteBuffer,
const LtbTraits traits 
) [protected]

Create an instance of this class.

Definition at line 68 of file LtbFrame.cc.

                                            :
LtbBuffer(byteBuffer,
          traits),
m_time(0) {
    const unsigned int position = byteBuffer.position();
        byteBuffer.position(position + (ltbTraits().timeOffset() * kBytesInInt));
    m_time = new LtbTime(byteBuffer,
                         traits);
        byteBuffer.position(position + (ltbTraits().frameSize() * kBytesInInt));
}
DybDaq::LtbFrame::LtbFrame ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

unsigned int LtbFrame::frameNumber ( ) const

Returns the number of the frame in the LTB package.

Definition at line 86 of file LtbFrame.cc.

unsigned int LtbFrame::readoutType ( ) const

Returns the readout type of this object.

Definition at line 90 of file LtbFrame.cc.

unsigned int LtbFrame::triggerMask ( ) const

Returns the readout type of this object.

Definition at line 94 of file LtbFrame.cc.

bool LtbFrame::isTriggerLineSet ( const unsigned int  line) const

Returns true if the specified trigger lines bit is set.

Definition at line 98 of file LtbFrame.cc.

                                                             {
    return 0 != (triggerMask() & ltbTraits().triggerLineBit(line));
}
const LtbTraits::LtbDateTime & LtbFrame::dateTime ( ) const

Returns the readout type of this object.

Definition at line 102 of file LtbFrame.cc.

                                                     {
    return *m_time;
}
unsigned int LtbFrame::ticks ( ) const

Returns the number of ticks, passed the data and time, of this object.

Definition at line 106 of file LtbFrame.cc.

                                   {
    return m_time->ticks();
}
unsigned int LtbFrame::halfNanoseconds ( ) const

Returns the 1/2 nanoseconds within the seconds of this object.

Definition at line 110 of file LtbFrame.cc.

                                             {
    return m_time->halfNanoseconds();
}
int LtbFrame::accumulation ( ) const

Returns the accumulated deviation of 1/2 nanosecond from the PPS.

Definition at line 114 of file LtbFrame.cc.

                                 {
    return m_time->accumulation();
}
unsigned int LtbFrame::hitSum ( ) const

Returns the total hits summation for the object.

Definition at line 118 of file LtbFrame.cc.

bool LtbFrame::totalEsum ( ) const

Returns true if this total energy summation threshold is passed.

Definition at line 122 of file LtbFrame.cc.

bool LtbFrame::highEsum ( ) const

Returns true if this high energy summation threshold is passed.

Definition at line 126 of file LtbFrame.cc.

bool LtbFrame::lowEsum ( ) const

Returns true if this low energy summation threshold is passed.

Definition at line 130 of file LtbFrame.cc.

unsigned int LtbFrame::energySum ( ) const

Returns the total energy summation for the object.

Definition at line 134 of file LtbFrame.cc.

unsigned int LtbFrame::crossTriggerSource ( ) const

Returns the source, if any of any cross trigger received.

Definition at line 138 of file LtbFrame.cc.

                                                {
    if (4 > ltbTraits().majorVersion() || (4 == ltbTraits().majorVersion() && 6 > ltbTraits().minorVersion())) {
        return readUnsignedInt(LtbTraits::kCrossTriggerSource);
    }
    const unsigned int highCrossTrigger = readUnsignedInt(LtbTraits::kHighCrossTrigger);
    const unsigned int lowCrossTrigger = readUnsignedInt(LtbTraits::kLowCrossTrigger);
    return (highCrossTrigger << 16U) | lowCrossTrigger;
}
bool LtbFrame::accumulationStatus ( ) const

Returns true if the accumulation exceeds the 32-bit integer.

Definition at line 147 of file LtbFrame.cc.

bool LtbFrame::validGps ( ) const

Returns true if the trigger system is using GPS.

Definition at line 151 of file LtbFrame.cc.

bool LtbFrame::usingUtc ( ) const

Returns true if using GPS and using UTC.

Definition at line 155 of file LtbFrame.cc.

bool LtbFrame::validClockSystem ( ) const

Returns true if the clock is external to to the LTB.

Definition at line 159 of file LtbFrame.cc.

bool LtbFrame::feeBufferFull ( ) const

Returns true if the FEE buffer is full between this valid local trigger and the last valid local trigger.

Definition at line 163 of file LtbFrame.cc.

bool LtbFrame::ltbBufferFull ( ) const

Returns true if the LTB buffer is full between this valid local trigger and the last valid local trigger.

Definition at line 167 of file LtbFrame.cc.

unsigned int LtbFrame::blockedTriggerCount ( ) const

Returns the number block trigger in this object.

Definition at line 171 of file LtbFrame.cc.

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

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

Implements DybDaq::DaqBuffer.

Definition at line 198 of file LtbFrame.cc.

                                        {
    return ltbTraits().frameSize();
}
unsigned int LtbFrame::gather ( OutputBufferList outputBuffers) const [virtual]

Adds to the supplied list the OutputBuffers that contain the DAQ format of this object's content, returning the total number of bytes in the added buffers.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 175 of file LtbFrame.cc.

                                                                   {
    if (!hasByteBuffer()) {
        const LtbTraits& traits = ltbTraits();
        memcpy(const_cast<char*>(buffer()) + (traits.timeOffset() * kBytesInInt),
               m_time->buffer(),
               traits.timeSize() * kBytesInInt);
    }
    return LtbBuffer::gather(outputBuffers);
}
unsigned int LtbFrame::inspect ( DaqBuffer::Bytes inspectors) const [virtual]

Adds to the supplied list the DaqBuffer::Bytes that contains inspections of this object's objects.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 186 of file LtbFrame.cc.

                                                               {
    unsigned int cursor = fillInspectors(inspectors,
                                         LtbTraits::kFrameFront,
                                         0);
    cursor += m_time->inspect(inspectors);
    cursor = fillInspectors(inspectors,
                          LtbTraits::kFrameBack,
                          cursor + 1);
    return cursor + 1;
}
void LtbFrame::setTriggerLine ( const unsigned int  line)

Sets the specified trigger line.

Definition at line 217 of file LtbFrame.cc.

                                                     {
    writeField((triggerMask() | ltbTraits().triggerLineBit(line)),
               LtbTraits::kTriggerMask);
}
LtbFrame& DybDaq::LtbFrame::operator= ( LtbFrame rhs) [private]

Suppress default.

void LtbFrame::setFrameNumber ( const unsigned int  frameNumber)

Sets the number of the frame in the LTB package.

Definition at line 202 of file LtbFrame.cc.

void LtbFrame::setReadoutType ( const unsigned int  readoutType)

Sets the readout type of this object.

Definition at line 207 of file LtbFrame.cc.

void LtbFrame::setTriggerMask ( const unsigned int  triggerMask)

Sets the trigger mask of this object.

Definition at line 212 of file LtbFrame.cc.

void LtbFrame::setDateTime ( const LtbTraits::LtbDateTime dataTime)

Returns the readout type of this object.

Definition at line 222 of file LtbFrame.cc.

void LtbFrame::setHalfNanoseconds ( const unsigned int  halfNanoseconds)

Sets the 1/2 nanoseconds within the seconds of this object.

Definition at line 226 of file LtbFrame.cc.

void LtbFrame::setAccumulation ( const int  accumulation)

Sets the accumulated deviation of 1/2 nanosecond from the PPS.

Definition at line 230 of file LtbFrame.cc.

void LtbFrame::setHitSum ( const unsigned int  hitSum)

Sets the total hits summation for the object.

Definition at line 234 of file LtbFrame.cc.

void LtbFrame::setTotalEsum ( const bool  totalEsum)

Sets whether the total energy summation threshold is passed or not.

Definition at line 239 of file LtbFrame.cc.

void LtbFrame::setHighEsum ( const bool  highEsum)

Sets whether the high energy summation threshold is passed or not.

Definition at line 244 of file LtbFrame.cc.

void LtbFrame::setLowEsum ( const bool  lowEsum)

Sets whether the low energy summation threshold is passed or not.

Definition at line 249 of file LtbFrame.cc.

void LtbFrame::setEnergySum ( const unsigned int  energySum)

Sets the total energy summation for the object.

Definition at line 254 of file LtbFrame.cc.

void LtbFrame::setCrossTriggerSource ( const unsigned int  crossTriggerSource)

Sets the source, if any of any cross trigger received.

Definition at line 259 of file LtbFrame.cc.

                                                                          {
    if (4 > ltbTraits().majorVersion() || (4 == ltbTraits().majorVersion() && 6 > ltbTraits().minorVersion())) {
        writeField(crossTriggerSource,
                   LtbTraits::kCrossTriggerSource);
    }
    writeField((crossTriggerSource >> 16U) & 0x0000ffffU,
               LtbTraits::kHighCrossTrigger);
    writeField(crossTriggerSource & 0x0000ffffU,
               LtbTraits::kLowCrossTrigger);
}
void LtbFrame::setAccumulationStatus ( const bool  accumulationStatus)

Sets whether the accumulation exceeds the 32-bit integer or not.

Definition at line 270 of file LtbFrame.cc.

void LtbFrame::setValidGps ( const bool  validGps)

Sets whether the trigger system is using GPS or not.

Definition at line 275 of file LtbFrame.cc.

void LtbFrame::setUsingUtc ( const bool  usingUtc)

Sets whether if using GPS and using UTC or not.

Definition at line 280 of file LtbFrame.cc.

void LtbFrame::setValidClockSystem ( const bool  validClockSystem)

Sets whether if the clock is external to to the LTB or not.

Definition at line 285 of file LtbFrame.cc.

void LtbFrame::setFeeBufferFull ( const bool  feeBufferFull)

Sets whether FEE buffer is full between this valid local trigger and the last valid local trigger or not.

Definition at line 290 of file LtbFrame.cc.

void LtbFrame::setLtbBufferFull ( const bool  ltbBufferFull)

Sets whether LTB buffer is full between this valid local trigger and the last valid local trigger ot not.

Definition at line 295 of file LtbFrame.cc.

void LtbFrame::setBlockedTriggerCount ( const unsigned int  blockedTriggerCount)

Sets the number block trigger in this object.

Definition at line 300 of file LtbFrame.cc.

const LtbTraits & LtbBuffer::ltbTraits ( ) const [inherited]

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

Definition at line 36 of file LtbBuffer.cc.

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

Friends And Related Function Documentation

friend class LtbReadout [friend]

Definition at line 27 of file LtbFrame.h.


Member Data Documentation

The time of this trigger.

Definition at line 309 of file LtbFrame.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:06 for LtbReadoutFormat by doxygen 1.7.4