#include <DaqLtb.h>
Collaboration diagram for DayaBay::DaqLtb:
Public Types | |
typedef std::vector< DayaBay::DaqLtbFrame * > | LtbFramePtrList |
A list containing pointers to the LTB frames. | |
Public Member Functions | |
DaqLtb (const DybDaq::LtbReadout <bReadout, const DayaBay::Detector &detector) | |
Constructor for read-only instance. | |
DaqLtb (const unsigned int localTriggerNumber, const unsigned int rawTriggerTotal, const unsigned int ltbStatus, const DayaBay::Detector &detector) | |
Constructor for read-write instance. | |
DaqLtb () | |
Default Constructor. | |
virtual | ~DaqLtb () |
Destroys this instance of the class. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
const LtbFramePtrList & | frames () const |
Returns the list of LTB frames. | |
const DaqLtbFrame & | firstFrame () const |
Returns the first LTB frame in this readout. | |
unsigned int | localTriggerNumber () const |
Returns the local trigger number of this readout. | |
const DybDaq::LtbReadout * | ltbReadout () const |
Returns the LtbReadout being wrapped by this class. | |
bool | addFrame (DaqLtbFrame *frame) |
Adds a new DaqLtbFrame to this object. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
DybDaq::LtbReadout * | m_ltbReadout |
The wrapped LtbReadout instance. | |
const DayaBay::Detector * | m_detector |
The detector with which this frame is associated. | |
LtbFramePtrList * | m_framePtrs |
The list containing pointers to the LTB frames in this readout. |
Definition at line 41 of file DaqLtb.h.
typedef std::vector<DayaBay::DaqLtbFrame*> DayaBay::DaqLtb::LtbFramePtrList |
DaqLtb::DaqLtb | ( | const DybDaq::LtbReadout & | ltbReadout, | |
const DayaBay::Detector & | detector | |||
) |
Constructor for read-only instance.
Definition at line 24 of file DaqLtb.cc.
00025 : 00026 m_ltbReadout(const_cast<LtbReadout*>(<bReadout)), 00027 m_detector(&detector), 00028 m_framePtrs(0) { 00029 }
DaqLtb::DaqLtb | ( | const unsigned int | localTriggerNumber, | |
const unsigned int | rawTriggerTotal, | |||
const unsigned int | ltbStatus, | |||
const DayaBay::Detector & | detector | |||
) |
Constructor for read-write instance.
Definition at line 31 of file DaqLtb.cc.
00034 : 00035 m_ltbReadout(new LtbReadout(localTriggerNumber, 00036 rawTriggerTotal, 00037 ltbStatus, 00038 false, 00039 LtbTraits::defaultTraits())), 00040 m_detector(&detector), 00041 m_framePtrs(0) { 00042 }
DayaBay::DaqLtb::DaqLtb | ( | ) | [inline] |
Default Constructor.
Definition at line 59 of file DaqLtb.h.
00059 : m_ltbReadout(0), 00060 m_detector(0), 00061 m_framePtrs(0) {}
DaqLtb::~DaqLtb | ( | ) | [virtual] |
Destroys this instance of the class.
Definition at line 44 of file DaqLtb.cc.
00044 { 00045 if (0 != m_framePtrs) { 00046 LtbFramePtrList::iterator finished = m_framePtrs->end(); 00047 for(LtbFramePtrList::iterator frame = m_framePtrs->begin(); 00048 frame != finished; 00049 ++frame) { 00050 delete *frame; 00051 } 00052 delete m_framePtrs; 00053 } 00054 }
std::ostream & DayaBay::DaqLtb::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Definition at line 140 of file DaqLtb.h.
00141 { 00142 s << "{ " << "ltbReadout : " << m_ltbReadout << std::endl 00143 << "detector : " << m_detector << std::endl 00144 << "framePtrs : " << m_framePtrs << std::endl << " }"; 00145 return s; 00146 }
const DaqLtb::LtbFramePtrList & DaqLtb::frames | ( | ) | const |
Returns the list of LTB frames.
Definition at line 60 of file DaqLtb.cc.
00060 { 00061 if (0 == m_framePtrs) { 00062 LtbFramePtrList** framePtrs = const_cast<LtbFramePtrList**>(&m_framePtrs); 00063 *(framePtrs) = new LtbFramePtrList(); 00064 const LtbReadout::LtbFramePtrList& frames = m_ltbReadout->ltbFrames(); 00065 const LtbReadout::LtbFramePtrList::const_iterator finished = frames.end(); 00066 for (LtbReadout::LtbFramePtrList::const_iterator frame = frames.begin(); 00067 finished != frame; 00068 ++frame) { 00069 (*framePtrs)->push_back(new DaqLtbFrame(*(*frame), 00070 *m_detector)); 00071 } 00072 } 00073 return *m_framePtrs; 00074 }
const DaqLtbFrame & DaqLtb::firstFrame | ( | ) | const |
unsigned int DaqLtb::localTriggerNumber | ( | ) | const |
Returns the local trigger number of this readout.
Definition at line 76 of file DaqLtb.cc.
00076 { 00077 return m_ltbReadout->head().localTriggerNumber(); 00078 }
const LtbReadout * DaqLtb::ltbReadout | ( | ) | const |
Returns the LtbReadout being wrapped by this class.
Definition at line 80 of file DaqLtb.cc.
00080 { 00081 return m_ltbReadout; 00082 }
bool DaqLtb::addFrame | ( | DaqLtbFrame * | frame | ) |
Adds a new DaqLtbFrame to this object.
Definition at line 84 of file DaqLtb.cc.
00084 { 00085 if (0 == m_framePtrs) { 00086 m_framePtrs = new LtbFramePtrList(); 00087 } 00088 m_framePtrs->push_back(frame); 00089 m_ltbReadout->addFrame(frame->ltbFrame()); 00090 return true; 00091 }
static void* DayaBay::DaqLtb::operator new | ( | size_t | size | ) | [inline, static] |
static void* DayaBay::DaqLtb::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
static void DayaBay::DaqLtb::operator delete | ( | void * | p | ) | [inline, static] |
static void DayaBay::DaqLtb::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
DybDaq::LtbReadout* DayaBay::DaqLtb::m_ltbReadout [private] |
const DayaBay::Detector* DayaBay::DaqLtb::m_detector [private] |
LtbFramePtrList* DayaBay::DaqLtb::m_framePtrs [private] |