#include <TagHeader.h>
Inheritance diagram for DayaBay::TagHeader:
Public Types | |
Unknown = 0 | |
Generic | |
AdEvent | |
Positron | |
Neutron | |
Radiation | |
MuonFragment | |
Muon | |
MuonShower | |
MuonDecay | |
AdCoincidence | |
IBD | |
enum | TagType { Unknown = 0, Generic, AdEvent, Positron, Neutron, Radiation, MuonFragment, Muon, MuonShower, MuonDecay, AdCoincidence, IBD } |
The type of candidate event this tag is indicating. More... | |
typedef std::vector< IHeader * > | Vector |
typedef std::vector< const IHeader * > | ConstVector |
Public Member Functions | |
virtual const std::string & | defLoc () const |
TagHeader () | |
Default Constructor. | |
virtual | ~TagHeader () |
Default Destructor. | |
virtual const CLID & | clID () const |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
template<class TDTYPE> | |
TDTYPE * | dataAs () const |
Return the tag data as given type. | |
std::string | tagName () const |
Return the tag type as a string. | |
std::vector< const DayaBay::TagHeader * > | taggedHeaders (const TagType &tagType) const |
Return the tagged input headers by tag type. | |
const TagType & | tagID () const |
Retrieve const Tag ID. | |
void | setTagID (const TagType &value) |
Update Tag ID. | |
bool | isA () const |
Retrieve const Does this event satisfy the tag? | |
void | setIsA (bool value) |
Update Does this event satisfy the tag? | |
const DayaBay::TagData * | data () const |
Retrieve const Data about this tag. | |
void | setData (DayaBay::TagData *value) |
Update Data about this tag. | |
virtual const std::string & | defLoc () |
void | setInputHeaders (const std::vector< const DayaBay::IHeader * > &iheaders) |
void | addInputHeader (const DayaBay::IHeader *iheader) |
const TimeStamp & | timeStamp () const |
void | setTimeStamp (const TimeStamp &ts) |
const std::vector< const DayaBay::IHeader * > | findHeaders (const CLID &clid) const |
const Context & | context () const |
void | setContext (const Context &value) |
int | execNumber () const |
void | setExecNumber (int value) |
const std::vector< unsigned long > & | randomState () const |
void | setRandomState (const std::vector< unsigned long > &value) |
const std::vector< const DayaBay::IHeader * > & | inputHeaders () const |
const DayaBay::JobId & | jobId () const |
void | setJobId (const DayaBay::JobId &value) |
virtual void | setOutputAddress (const GenericAddress *roa) |
virtual void | setInputAddress (const GenericAddress *ria) |
virtual const TimeStamp & | earliest () const |
void | setEarliest (const TimeStamp &value) |
virtual const TimeStamp & | latest () const |
void | setLatest (const TimeStamp &value) |
virtual const GenericAddress * | outputAddress () const |
virtual const GenericAddress * | inputAddress () const |
void | setRegistry (IRegistry *pRegistry) |
IRegistry * | registry () const |
LinkManager * | linkMgr () const |
unsigned char | version () const |
void | setVersion (unsigned char vsn) |
unsigned long | refCount () const |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
const std::string & | name () const |
virtual StreamBuffer & | serialize (StreamBuffer &s) |
virtual StreamBuffer & | serialize (StreamBuffer &s) const |
Static Public Member Functions | |
static const std::string & | defaultLocation () |
Give access to default location from class scope. | |
static const CLID & | classID () |
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 | |
TagType | m_tagID |
Tag ID. | |
bool | m_isA |
Does this event satisfy the tag? | |
DayaBay::TagData * | m_data |
Data about this tag. | |
Friends | |
friend friend std::ostream & | operator<< (std::ostream &s, const DataObject &obj) |
Definition at line 49 of file TagHeader.h.
The type of candidate event this tag is indicating.
Unknown | |
Generic | |
AdEvent | |
Positron | |
Neutron | |
Radiation | |
MuonFragment | |
Muon | |
MuonShower | |
MuonDecay | |
AdCoincidence | |
IBD |
Definition at line 58 of file TagHeader.h.
00058 { Unknown = 0, // Undefined, indicates error 00059 Generic, // Generic Tag 00060 AdEvent, // An event in the AD 00061 Positron, // A positron 00062 Neutron, // A neutron capture 00063 Radiation, // An event due to a radioactive decay 00064 MuonFragment, // Event due to passage of a muon through a detector 00065 Muon, // One or more MuonFragments 00066 MuonShower, // A MuonTrack and one or more other things 00067 MuonDecay, // A MuonTrack and Michele electron 00068 AdCoincidence, // Time-correlated AD events 00069 IBD // Set of inverse beta decay events 00070 };
DayaBay::TagHeader::TagHeader | ( | ) | [inline] |
virtual DayaBay::TagHeader::~TagHeader | ( | ) | [inline, virtual] |
static const std::string& DayaBay::TagHeader::defaultLocation | ( | ) | [inline, static] |
Give access to default location from class scope.
Reimplemented from DayaBay::HeaderObject.
Definition at line 54 of file TagHeader.h.
00054 { return TagHeaderLocation::Default; }
virtual const std::string& DayaBay::TagHeader::defLoc | ( | ) | const [inline, virtual] |
Reimplemented from DayaBay::HeaderObject.
Definition at line 55 of file TagHeader.h.
00055 { return TagHeaderLocation::Default; }
const CLID & DayaBay::TagHeader::clID | ( | ) | const [inline, virtual] |
Reimplemented from DayaBay::HeaderObject.
Definition at line 196 of file TagHeader.h.
00197 { 00198 return DayaBay::TagHeader::classID(); 00199 }
const CLID & DayaBay::TagHeader::classID | ( | ) | [inline, static] |
std::ostream & DayaBay::TagHeader::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Reimplemented from DayaBay::HeaderObject.
Definition at line 206 of file TagHeader.h.
00207 { 00208 char l_isA = (m_isA) ? 'T' : 'F'; 00209 HeaderObject::fillStream(s); 00210 s << "{ " << "tagID : " << m_tagID << std::endl 00211 << "isA : " << l_isA << std::endl 00212 << "data : " << m_data << std::endl << " }"; 00213 return s; 00214 }
TDTYPE * DayaBay::TagHeader::dataAs | ( | ) | const [inline] |
Return the tag data as given type.
Definition at line 248 of file TagHeader.h.
00249 { 00250 return dynamic_cast<TDTYPE*>(m_data); 00251 }
std::string DayaBay::TagHeader::tagName | ( | ) | const |
std::vector< const DayaBay::TagHeader * > DayaBay::TagHeader::taggedHeaders | ( | const TagType & | tagType | ) | const |
Return the tagged input headers by tag type.
Definition at line 13 of file TagHeader.cc.
00015 { 00016 // Find all input headers of the requested tag type 00017 std::vector<const DayaBay::TagHeader*> tagHeaders; 00018 const std::vector<const DayaBay::IHeader*>& inputHeaders = 00019 this->inputHeaders(); 00020 for(unsigned int idx=0; idx<inputHeaders.size(); idx++){ 00021 const DayaBay::TagHeader* tagHeader = 00022 dynamic_cast<const DayaBay::TagHeader*>(inputHeaders[idx]); 00023 if(tagHeader && tagHeader->tagID()==tagType){ 00024 tagHeaders.push_back(tagHeader); 00025 } 00026 } 00027 return tagHeaders; 00028 }
const DayaBay::TagHeader::TagType & DayaBay::TagHeader::tagID | ( | ) | const [inline] |
Retrieve const Tag ID.
Definition at line 217 of file TagHeader.h.
00218 { 00219 return m_tagID; 00220 }
void DayaBay::TagHeader::setTagID | ( | const TagType & | value | ) | [inline] |
bool DayaBay::TagHeader::isA | ( | ) | const [inline] |
Retrieve const Does this event satisfy the tag?
Definition at line 227 of file TagHeader.h.
00228 { 00229 return m_isA; 00230 }
void DayaBay::TagHeader::setIsA | ( | bool | value | ) | [inline] |
Update Does this event satisfy the tag?
Definition at line 232 of file TagHeader.h.
00233 { 00234 m_isA = value; 00235 }
const DayaBay::TagData * DayaBay::TagHeader::data | ( | ) | const [inline] |
Retrieve const Data about this tag.
Definition at line 237 of file TagHeader.h.
00238 { 00239 return m_data; 00240 }
void DayaBay::TagHeader::setData | ( | DayaBay::TagData * | value | ) | [inline] |
Update Data about this tag.
Definition at line 242 of file TagHeader.h.
00243 { 00244 m_data = value; 00245 }
static void* DayaBay::TagHeader::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Reimplemented from DayaBay::HeaderObject.
Definition at line 124 of file TagHeader.h.
00125 { 00126 return ( sizeof(TagHeader) == size ? 00127 boost::singleton_pool<TagHeader, sizeof(TagHeader)>::malloc() : 00128 ::operator new(size) ); 00129 }
static void* DayaBay::TagHeader::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
Reimplemented from DayaBay::HeaderObject.
Definition at line 134 of file TagHeader.h.
static void DayaBay::TagHeader::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Reimplemented from DayaBay::HeaderObject.
Definition at line 140 of file TagHeader.h.
00141 { 00142 boost::singleton_pool<TagHeader, sizeof(TagHeader)>::is_from(p) ? 00143 boost::singleton_pool<TagHeader, sizeof(TagHeader)>::free(p) : 00144 ::operator delete(p); 00145 }
static void DayaBay::TagHeader::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Reimplemented from DayaBay::HeaderObject.
Definition at line 149 of file TagHeader.h.
00150 { 00151 ::operator delete (p, pObj); 00152 }
TagType DayaBay::TagHeader::m_tagID [private] |
bool DayaBay::TagHeader::m_isA [private] |
DayaBay::TagData* DayaBay::TagHeader::m_data [private] |