#include <SimTrigCommandHeader.h>
Collaboration diagram for DayaBay::SimTrigCommandHeader:
Public Types | |
typedef std::map< DayaBay::Detector, DayaBay::SimTrigCommandCollection * > | detCollMap |
Detector to SimTriggerCommandCollection map. | |
Public Member Functions | |
SimTrigCommandHeader (DayaBay::SimTrigHeader *header) | |
Create with pointer to SimTrigHeader. | |
SimTrigCommandHeader () | |
Default Constructor. | |
~SimTrigCommandHeader () | |
destructor | |
std::ostream & | fillStream (std::ostream &s) const |
Print the header. | |
void | addCommand (DayaBay::SimTrigCommand *tc) |
add a trigger command to the appropriate collection. | |
void | addCollection (DayaBay::SimTrigCommandCollection *tcc) |
add a command collection. | |
const DayaBay::SimTrigHeader * | header () const |
Retrieve const SimTrig Header in which this CommandHeader resides. | |
void | setHeader (DayaBay::SimTrigHeader *value) |
Update SimTrig Header in which this CommandHeader resides. | |
const DayaBay::Detector & | detector () const |
Retrieve const Detector which SimTriggerCommandHeader belongs. | |
void | setDetector (const DayaBay::Detector &value) |
Update Detector which SimTriggerCommandHeader belongs. | |
const detCollMap & | collections () const |
Retrieve const Map from detector to collection. | |
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 | |
DayaBay::SimTrigHeader * | m_header |
SimTrig Header in which this CommandHeader resides. | |
DayaBay::Detector | m_detector |
Detector which SimTriggerCommandHeader belongs. | |
detCollMap | m_collections |
Map from detector to collection. |
Definition at line 44 of file SimTrigCommandHeader.h.
DayaBay::SimTrigCommandHeader::SimTrigCommandHeader | ( | DayaBay::SimTrigHeader * | header | ) | [inline] |
Create with pointer to SimTrigHeader.
Definition at line 52 of file SimTrigCommandHeader.h.
00052 : m_header(header), 00053 m_collections() {}
DayaBay::SimTrigCommandHeader::SimTrigCommandHeader | ( | ) | [inline] |
Default Constructor.
Definition at line 56 of file SimTrigCommandHeader.h.
00056 : m_header(0), 00057 m_detector(), 00058 m_collections() {}
DayaBay::SimTrigCommandHeader::~SimTrigCommandHeader | ( | ) | [inline] |
destructor
Definition at line 152 of file SimTrigCommandHeader.h.
00153 { 00154 00155 DayaBay::SimTrigCommandHeader::detCollMap::iterator it; 00156 for(it=m_collections.begin(); 00157 it!=m_collections.end(); 00158 ++it){ 00159 delete it->second; 00160 } 00161 00162 }
std::ostream & DayaBay::SimTrigCommandHeader::fillStream | ( | std::ostream & | s | ) | const |
Print the header.
Definition at line 14 of file SimTrigCommandHeader.cc.
00015 { 00016 s << std::endl << "{ "; 00017 s << "trigCommandHeader : "; 00018 s << "\tDetector: " << m_detector.detName() << std::endl; 00019 s << "\tContains " << m_collections.size() 00020 << " CommandCollections:" << std::endl; 00021 s << " {" << std::endl; 00022 00023 DayaBay::SimTrigCommandHeader::detCollMap::const_iterator it; 00024 00025 for(it = m_collections.begin(); it != m_collections.end(); ++it) 00026 { 00027 s << "{{" << std::endl; 00028 s << "Detector: " << (it->first).detName() << std::endl; 00029 s << *(it->second) << std::endl; 00030 s << "}}" << std::endl; 00031 } 00032 00033 s << " }" << std::endl; 00034 s << std::endl; 00035 s << " }"; 00036 return s; 00037 }
void DayaBay::SimTrigCommandHeader::addCommand | ( | DayaBay::SimTrigCommand * | tc | ) |
add a trigger command to the appropriate collection.
Definition at line 3 of file SimTrigCommandHeader.cc.
00003 { 00004 DayaBay::Detector det(tc->detector()); 00005 m_collections[det]->addCommand(tc); 00006 }
void DayaBay::SimTrigCommandHeader::addCollection | ( | DayaBay::SimTrigCommandCollection * | tcc | ) |
add a command collection.
Definition at line 8 of file SimTrigCommandHeader.cc.
00008 { 00009 DayaBay::Detector det(tcc->detector()); 00010 delete m_collections[det]; 00011 m_collections[det]=tcc; 00012 }
const DayaBay::SimTrigHeader * DayaBay::SimTrigCommandHeader::header | ( | ) | const [inline] |
Retrieve const SimTrig Header in which this CommandHeader resides.
Definition at line 164 of file SimTrigCommandHeader.h.
00165 { 00166 return m_header; 00167 }
void DayaBay::SimTrigCommandHeader::setHeader | ( | DayaBay::SimTrigHeader * | value | ) | [inline] |
Update SimTrig Header in which this CommandHeader resides.
Definition at line 169 of file SimTrigCommandHeader.h.
00170 { 00171 m_header = value; 00172 }
const DayaBay::Detector & DayaBay::SimTrigCommandHeader::detector | ( | ) | const [inline] |
Retrieve const Detector which SimTriggerCommandHeader belongs.
Definition at line 174 of file SimTrigCommandHeader.h.
00175 { 00176 return m_detector; 00177 }
void DayaBay::SimTrigCommandHeader::setDetector | ( | const DayaBay::Detector & | value | ) | [inline] |
Update Detector which SimTriggerCommandHeader belongs.
Definition at line 179 of file SimTrigCommandHeader.h.
00180 { 00181 m_detector = value; 00182 }
const DayaBay::SimTrigCommandHeader::detCollMap & DayaBay::SimTrigCommandHeader::collections | ( | ) | const [inline] |
Retrieve const Map from detector to collection.
Definition at line 184 of file SimTrigCommandHeader.h.
00185 { 00186 return m_collections; 00187 }
static void* DayaBay::SimTrigCommandHeader::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Definition at line 95 of file SimTrigCommandHeader.h.
00096 { 00097 return ( sizeof(SimTrigCommandHeader) == size ? 00098 boost::singleton_pool<SimTrigCommandHeader, sizeof(SimTrigCommandHeader)>::malloc() : 00099 ::operator new(size) ); 00100 }
static void* DayaBay::SimTrigCommandHeader::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Definition at line 105 of file SimTrigCommandHeader.h.
static void DayaBay::SimTrigCommandHeader::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Definition at line 111 of file SimTrigCommandHeader.h.
00112 { 00113 boost::singleton_pool<SimTrigCommandHeader, sizeof(SimTrigCommandHeader)>::is_from(p) ? 00114 boost::singleton_pool<SimTrigCommandHeader, sizeof(SimTrigCommandHeader)>::free(p) : 00115 ::operator delete(p); 00116 }
static void DayaBay::SimTrigCommandHeader::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Definition at line 120 of file SimTrigCommandHeader.h.
00121 { 00122 ::operator delete (p, pObj); 00123 }
SimTrig Header in which this CommandHeader resides.
Definition at line 129 of file SimTrigCommandHeader.h.
Detector which SimTriggerCommandHeader belongs.
Definition at line 130 of file SimTrigCommandHeader.h.