#include <RawEventHeader.h>
Inheritance diagram for DayaBay::RawEventHeader:
Public Types | |
typedef std::vector< IHeader * > | Vector |
typedef std::vector< const IHeader * > | ConstVector |
Public Member Functions | |
virtual const std::string & | defLoc () const |
RawEventHeader () | |
Default Constructor. | |
~RawEventHeader () | |
destructor | |
virtual const CLID & | clID () const |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
Trigger::TriggerType_t | triggerType () const |
Return trigger type. | |
Site::Site_t | getSiteId () const |
Return site id. | |
DetectorId::DetectorId_t | detectorId () const |
Return detector id. | |
int | dataBlockNum () const |
Retrieve const # of the block. | |
void | setDataBlockNum (int value) |
Update # of the block. | |
int | dataBlockSize () const |
Retrieve const in bytes. | |
void | setDataBlockSize (int value) |
Update in bytes. | |
int | formatVersionMajor () const |
Retrieve const Major format version. | |
void | setFormatVersionMajor (int value) |
Update Major format version. | |
int | formatVersionMinor () const |
Retrieve const Minor format version. | |
void | setFormatVersionMinor (int value) |
Update Minor format version. | |
int | evtSize () const |
Retrieve const Event size. | |
void | setEvtSize (int value) |
Update Event size. | |
int | detId () const |
Retrieve const Detector Id. | |
void | setDetId (int value) |
Update Detector Id. | |
int | siteId () const |
Retrieve const m_detId[4:7]. | |
void | setSiteId (int value) |
Update m_detId[4:7]. | |
int | positionId () const |
Retrieve const m_detId[0:3]. | |
void | setPositionId (int value) |
Update m_detId[0:3]. | |
int | runNum () const |
Retrieve const Run number. | |
void | setRunNum (int value) |
Update Run number. | |
int | evtNum () const |
Retrieve const Event number. | |
void | setEvtNum (int value) |
Update Event number. | |
int | dataType () const |
Retrieve const 0:normal, 1:calib, 2:elec. | |
void | setDataType (int value) |
Update 0:normal, 1:calib, 2:elec. | |
int | dataTypeSpecific () const |
Retrieve const DAC for elec. | |
void | setDataTypeSpecific (int value) |
Update DAC for elec. | |
int | dataStatus () const |
Retrieve const Data Status. | |
void | setDataStatus (int value) |
Update Data Status. | |
const std::vector< DayaBay::RawRom * > & | modules () const |
Retrieve const Raw readout module. | |
void | setModules (const std::vector< DayaBay::RawRom * > &value) |
Update Raw readout module. | |
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 | |
int | m_dataBlockNum |
# of the block | |
int | m_dataBlockSize |
in bytes | |
int | m_formatVersionMajor |
Major format version. | |
int | m_formatVersionMinor |
Minor format version. | |
int | m_evtSize |
Event size. | |
int | m_detId |
Detector Id. | |
int | m_siteId |
m_detId[4:7] | |
int | m_positionId |
m_detId[0:3] | |
int | m_runNum |
Run number. | |
int | m_evtNum |
Event number. | |
int | m_dataType |
0:normal, 1:calib, 2:elec. calib. | |
int | m_dataTypeSpecific |
DAC for elec. calib. | |
int | m_dataStatus |
Data Status. | |
std::vector< DayaBay::RawRom * > | m_modules |
Raw readout module. | |
Friends | |
friend friend std::ostream & | operator<< (std::ostream &s, const DataObject &obj) |
Definition at line 55 of file RawEventHeader.h.
DayaBay::RawEventHeader::RawEventHeader | ( | ) | [inline] |
Default Constructor.
Definition at line 64 of file RawEventHeader.h.
00064 : m_dataBlockNum(0), 00065 m_dataBlockSize(0), 00066 m_formatVersionMajor(0), 00067 m_formatVersionMinor(0), 00068 m_evtSize(0), 00069 m_detId(0), 00070 m_siteId(0), 00071 m_positionId(0), 00072 m_runNum(0), 00073 m_evtNum(0), 00074 m_dataType(0), 00075 m_dataTypeSpecific(0), 00076 m_dataStatus(0), 00077 m_modules() {}
DayaBay::RawEventHeader::~RawEventHeader | ( | ) | [inline] |
destructor
Definition at line 279 of file RawEventHeader.h.
00280 { 00281 00282 for(unsigned int i=0; i<m_modules.size(); i++) { 00283 delete m_modules[i]; 00284 } 00285 m_modules.clear(); 00286 00287 }
static const std::string& DayaBay::RawEventHeader::defaultLocation | ( | ) | [inline, static] |
Give access to default location from class scope.
Reimplemented from DayaBay::HeaderObject.
Definition at line 60 of file RawEventHeader.h.
00060 { return RawEventHeaderLocation::Default; }
virtual const std::string& DayaBay::RawEventHeader::defLoc | ( | ) | const [inline, virtual] |
Reimplemented from DayaBay::HeaderObject.
Definition at line 61 of file RawEventHeader.h.
00061 { return RawEventHeaderLocation::Default; }
const CLID & DayaBay::RawEventHeader::clID | ( | ) | const [inline, virtual] |
Reimplemented from DayaBay::HeaderObject.
Definition at line 289 of file RawEventHeader.h.
00290 { 00291 return DayaBay::RawEventHeader::classID(); 00292 }
const CLID & DayaBay::RawEventHeader::classID | ( | ) | [inline, static] |
std::ostream & DayaBay::RawEventHeader::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Reimplemented from DayaBay::HeaderObject.
Definition at line 299 of file RawEventHeader.h.
00300 { 00301 HeaderObject::fillStream(s); 00302 s << "{ " << "dataBlockNum : " << m_dataBlockNum << std::endl 00303 << "dataBlockSize : " << m_dataBlockSize << std::endl 00304 << "formatVersionMajor : " << m_formatVersionMajor << std::endl 00305 << "formatVersionMinor : " << m_formatVersionMinor << std::endl 00306 << "evtSize : " << m_evtSize << std::endl 00307 << "detId : " << m_detId << std::endl 00308 << "siteId : " << m_siteId << std::endl 00309 << "positionId : " << m_positionId << std::endl 00310 << "runNum : " << m_runNum << std::endl 00311 << "evtNum : " << m_evtNum << std::endl 00312 << "dataType : " << m_dataType << std::endl 00313 << "dataTypeSpecific : " << m_dataTypeSpecific << std::endl 00314 << "dataStatus : " << m_dataStatus << std::endl 00315 << "modules : " << m_modules << std::endl << " }"; 00316 return s; 00317 }
DayaBay::Trigger::TriggerType_t DayaBay::RawEventHeader::triggerType | ( | ) | const [inline] |
Return trigger type.
Definition at line 460 of file RawEventHeader.h.
00461 { 00462 00463 return (DayaBay::Trigger::TriggerType_t)(m_positionId > 0 ? 1 << (m_positionId + 1) : m_positionId); 00464 00465 }
Site::Site_t DayaBay::RawEventHeader::getSiteId | ( | ) | const [inline] |
Return site id.
Definition at line 467 of file RawEventHeader.h.
00468 { 00469 00470 return (Site::Site_t)(m_siteId == 0 ? m_siteId : 1 << (m_siteId - 1)); 00471 00472 }
DetectorId::DetectorId_t DayaBay::RawEventHeader::detectorId | ( | ) | const [inline] |
Return detector id.
Definition at line 474 of file RawEventHeader.h.
00475 { 00476 00477 return (DetectorId::DetectorId_t)m_positionId; 00478 00479 }
int DayaBay::RawEventHeader::dataBlockNum | ( | ) | const [inline] |
Retrieve const # of the block.
Definition at line 320 of file RawEventHeader.h.
00321 { 00322 return m_dataBlockNum; 00323 }
void DayaBay::RawEventHeader::setDataBlockNum | ( | int | value | ) | [inline] |
Update # of the block.
Definition at line 325 of file RawEventHeader.h.
00326 { 00327 m_dataBlockNum = value; 00328 }
int DayaBay::RawEventHeader::dataBlockSize | ( | ) | const [inline] |
Retrieve const in bytes.
Definition at line 330 of file RawEventHeader.h.
00331 { 00332 return m_dataBlockSize; 00333 }
void DayaBay::RawEventHeader::setDataBlockSize | ( | int | value | ) | [inline] |
Update in bytes.
Definition at line 335 of file RawEventHeader.h.
00336 { 00337 m_dataBlockSize = value; 00338 }
int DayaBay::RawEventHeader::formatVersionMajor | ( | ) | const [inline] |
Retrieve const Major format version.
Definition at line 340 of file RawEventHeader.h.
00341 { 00342 return m_formatVersionMajor; 00343 }
void DayaBay::RawEventHeader::setFormatVersionMajor | ( | int | value | ) | [inline] |
Update Major format version.
Definition at line 345 of file RawEventHeader.h.
00346 { 00347 m_formatVersionMajor = value; 00348 }
int DayaBay::RawEventHeader::formatVersionMinor | ( | ) | const [inline] |
Retrieve const Minor format version.
Definition at line 350 of file RawEventHeader.h.
00351 { 00352 return m_formatVersionMinor; 00353 }
void DayaBay::RawEventHeader::setFormatVersionMinor | ( | int | value | ) | [inline] |
Update Minor format version.
Definition at line 355 of file RawEventHeader.h.
00356 { 00357 m_formatVersionMinor = value; 00358 }
int DayaBay::RawEventHeader::evtSize | ( | ) | const [inline] |
Retrieve const Event size.
Definition at line 360 of file RawEventHeader.h.
00361 { 00362 return m_evtSize; 00363 }
void DayaBay::RawEventHeader::setEvtSize | ( | int | value | ) | [inline] |
Update Event size.
Definition at line 365 of file RawEventHeader.h.
00366 { 00367 m_evtSize = value; 00368 }
int DayaBay::RawEventHeader::detId | ( | ) | const [inline] |
Retrieve const Detector Id.
Definition at line 370 of file RawEventHeader.h.
00371 { 00372 return m_detId; 00373 }
void DayaBay::RawEventHeader::setDetId | ( | int | value | ) | [inline] |
Update Detector Id.
Definition at line 375 of file RawEventHeader.h.
00376 { 00377 m_detId = value; 00378 }
int DayaBay::RawEventHeader::siteId | ( | ) | const [inline] |
Retrieve const m_detId[4:7].
Definition at line 380 of file RawEventHeader.h.
00381 { 00382 return m_siteId; 00383 }
void DayaBay::RawEventHeader::setSiteId | ( | int | value | ) | [inline] |
Update m_detId[4:7].
Definition at line 385 of file RawEventHeader.h.
00386 { 00387 m_siteId = value; 00388 }
int DayaBay::RawEventHeader::positionId | ( | ) | const [inline] |
Retrieve const m_detId[0:3].
Definition at line 390 of file RawEventHeader.h.
00391 { 00392 return m_positionId; 00393 }
void DayaBay::RawEventHeader::setPositionId | ( | int | value | ) | [inline] |
Update m_detId[0:3].
Definition at line 395 of file RawEventHeader.h.
00396 { 00397 m_positionId = value; 00398 }
int DayaBay::RawEventHeader::runNum | ( | ) | const [inline] |
Retrieve const Run number.
Definition at line 400 of file RawEventHeader.h.
00401 { 00402 return m_runNum; 00403 }
void DayaBay::RawEventHeader::setRunNum | ( | int | value | ) | [inline] |
Update Run number.
Definition at line 405 of file RawEventHeader.h.
00406 { 00407 m_runNum = value; 00408 }
int DayaBay::RawEventHeader::evtNum | ( | ) | const [inline] |
Retrieve const Event number.
Definition at line 410 of file RawEventHeader.h.
00411 { 00412 return m_evtNum; 00413 }
void DayaBay::RawEventHeader::setEvtNum | ( | int | value | ) | [inline] |
Update Event number.
Definition at line 415 of file RawEventHeader.h.
00416 { 00417 m_evtNum = value; 00418 }
int DayaBay::RawEventHeader::dataType | ( | ) | const [inline] |
Retrieve const 0:normal, 1:calib, 2:elec.
calib.
Definition at line 420 of file RawEventHeader.h.
00421 { 00422 return m_dataType; 00423 }
void DayaBay::RawEventHeader::setDataType | ( | int | value | ) | [inline] |
Update 0:normal, 1:calib, 2:elec.
calib.
Definition at line 425 of file RawEventHeader.h.
00426 { 00427 m_dataType = value; 00428 }
int DayaBay::RawEventHeader::dataTypeSpecific | ( | ) | const [inline] |
Retrieve const DAC for elec.
calib.
Definition at line 430 of file RawEventHeader.h.
00431 { 00432 return m_dataTypeSpecific; 00433 }
void DayaBay::RawEventHeader::setDataTypeSpecific | ( | int | value | ) | [inline] |
Update DAC for elec.
calib.
Definition at line 435 of file RawEventHeader.h.
00436 { 00437 m_dataTypeSpecific = value; 00438 }
int DayaBay::RawEventHeader::dataStatus | ( | ) | const [inline] |
Retrieve const Data Status.
Definition at line 440 of file RawEventHeader.h.
00441 { 00442 return m_dataStatus; 00443 }
void DayaBay::RawEventHeader::setDataStatus | ( | int | value | ) | [inline] |
Update Data Status.
Definition at line 445 of file RawEventHeader.h.
00446 { 00447 m_dataStatus = value; 00448 }
const std::vector< DayaBay::RawRom * > & DayaBay::RawEventHeader::modules | ( | ) | const [inline] |
Retrieve const Raw readout module.
Definition at line 450 of file RawEventHeader.h.
00451 { 00452 return m_modules; 00453 }
void DayaBay::RawEventHeader::setModules | ( | const std::vector< DayaBay::RawRom * > & | value | ) | [inline] |
Update Raw readout module.
Definition at line 455 of file RawEventHeader.h.
00456 { 00457 m_modules = value; 00458 }
static void* DayaBay::RawEventHeader::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Reimplemented from DayaBay::HeaderObject.
Definition at line 213 of file RawEventHeader.h.
00214 { 00215 return ( sizeof(RawEventHeader) == size ? 00216 boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::malloc() : 00217 ::operator new(size) ); 00218 }
static void* DayaBay::RawEventHeader::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 223 of file RawEventHeader.h.
static void DayaBay::RawEventHeader::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Reimplemented from DayaBay::HeaderObject.
Definition at line 229 of file RawEventHeader.h.
00230 { 00231 boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::is_from(p) ? 00232 boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::free(p) : 00233 ::operator delete(p); 00234 }
static void DayaBay::RawEventHeader::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 238 of file RawEventHeader.h.
00239 { 00240 ::operator delete (p, pObj); 00241 }
int DayaBay::RawEventHeader::m_dataBlockNum [private] |
int DayaBay::RawEventHeader::m_dataBlockSize [private] |
int DayaBay::RawEventHeader::m_formatVersionMajor [private] |
int DayaBay::RawEventHeader::m_formatVersionMinor [private] |
int DayaBay::RawEventHeader::m_evtSize [private] |
int DayaBay::RawEventHeader::m_detId [private] |
int DayaBay::RawEventHeader::m_siteId [private] |
int DayaBay::RawEventHeader::m_positionId [private] |
int DayaBay::RawEventHeader::m_runNum [private] |
int DayaBay::RawEventHeader::m_evtNum [private] |
int DayaBay::RawEventHeader::m_dataType [private] |
int DayaBay::RawEventHeader::m_dataTypeSpecific [private] |
int DayaBay::RawEventHeader::m_dataStatus [private] |
std::vector<DayaBay::RawRom*> DayaBay::RawEventHeader::m_modules [private] |