/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 | Static Public Member Functions | Private Attributes
DayaBay::RawEventHeader Class Reference

Top level header of event information for all detector raw data. More...

#include <RawEventHeader.h>

Inheritance diagram for DayaBay::RawEventHeader:
Inheritance graph
[legend]
Collaboration diagram for DayaBay::RawEventHeader:
Collaboration graph
[legend]

List of all members.

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 clearInputHeaders ()
void addInputHeader (const DayaBay::IHeader *iheader)
const TimeStamptimeStamp () const
void setTimeStamp (const TimeStamp &ts)
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const CLID &clid) const
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const std::string &name) const
const Contextcontext () 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::JobIdjobId () const
void setJobId (const DayaBay::JobId &value)
virtual void setOutputAddress (const GenericAddress *roa)
virtual void setInputAddress (const GenericAddress *ria)
virtual const TimeStampearliest () const
void setEarliest (const TimeStamp &value)
virtual const TimeStamplatest () const
void setLatest (const TimeStamp &value)
virtual const GenericAddress * outputAddress () const
virtual const GenericAddress * inputAddress () 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.

Detailed Description

Top level header of event information for all detector raw data.

Author:
He Miao created Thu Dec 5 17:42:32 2013

Definition at line 55 of file RawEventHeader.h.


Constructor & Destructor Documentation

DayaBay::RawEventHeader::RawEventHeader ( ) [inline]
DayaBay::RawEventHeader::~RawEventHeader ( ) [inline]

destructor

Definition at line 279 of file RawEventHeader.h.

{

    for(unsigned int i=0; i<m_modules.size(); i++) {
      delete m_modules[i];
    }
    m_modules.clear();
        
}

Member Function Documentation

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.

virtual const std::string& DayaBay::RawEventHeader::defLoc ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 61 of file RawEventHeader.h.

const CLID & DayaBay::RawEventHeader::clID ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 289 of file RawEventHeader.h.

const CLID & DayaBay::RawEventHeader::classID ( ) [inline, static]

Reimplemented from DayaBay::HeaderObject.

Definition at line 294 of file RawEventHeader.h.

{
  return CLID_RawEventHeader;
}
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.

{
  HeaderObject::fillStream(s);
  s << "{ " << "dataBlockNum :  " << m_dataBlockNum << std::endl
            << "dataBlockSize : " << m_dataBlockSize << std::endl
            << "formatVersionMajor :    " << m_formatVersionMajor << std::endl
            << "formatVersionMinor :    " << m_formatVersionMinor << std::endl
            << "evtSize :       " << m_evtSize << std::endl
            << "detId : " << m_detId << std::endl
            << "siteId :        " << m_siteId << std::endl
            << "positionId :    " << m_positionId << std::endl
            << "runNum :        " << m_runNum << std::endl
            << "evtNum :        " << m_evtNum << std::endl
            << "dataType :      " << m_dataType << std::endl
            << "dataTypeSpecific :      " << m_dataTypeSpecific << std::endl
            << "dataStatus :    " << m_dataStatus << std::endl
            << "modules :       " << m_modules << std::endl << " }";
  return s;
}
DayaBay::Trigger::TriggerType_t DayaBay::RawEventHeader::triggerType ( ) const [inline]

Return trigger type.

Definition at line 460 of file RawEventHeader.h.

Site::Site_t DayaBay::RawEventHeader::getSiteId ( ) const [inline]

Return site id.

Definition at line 467 of file RawEventHeader.h.

{

    return (Site::Site_t)(m_siteId == 0 ? m_siteId : 1 << (m_siteId - 1));
  
}
DetectorId::DetectorId_t DayaBay::RawEventHeader::detectorId ( ) const [inline]

Return detector id.

Definition at line 474 of file RawEventHeader.h.

int DayaBay::RawEventHeader::dataBlockNum ( ) const [inline]

Retrieve const # of the block.

Definition at line 320 of file RawEventHeader.h.

{
  return m_dataBlockNum;
}
void DayaBay::RawEventHeader::setDataBlockNum ( int  value) [inline]

Update # of the block.

Definition at line 325 of file RawEventHeader.h.

{
  m_dataBlockNum = value;
}
int DayaBay::RawEventHeader::dataBlockSize ( ) const [inline]

Retrieve const in bytes.

Definition at line 330 of file RawEventHeader.h.

{
  return m_dataBlockSize;
}
void DayaBay::RawEventHeader::setDataBlockSize ( int  value) [inline]

Update in bytes.

Definition at line 335 of file RawEventHeader.h.

{
  m_dataBlockSize = value;
}
int DayaBay::RawEventHeader::formatVersionMajor ( ) const [inline]

Retrieve const Major format version.

Definition at line 340 of file RawEventHeader.h.

void DayaBay::RawEventHeader::setFormatVersionMajor ( int  value) [inline]

Update Major format version.

Definition at line 345 of file RawEventHeader.h.

{
  m_formatVersionMajor = value;
}
int DayaBay::RawEventHeader::formatVersionMinor ( ) const [inline]

Retrieve const Minor format version.

Definition at line 350 of file RawEventHeader.h.

void DayaBay::RawEventHeader::setFormatVersionMinor ( int  value) [inline]

Update Minor format version.

Definition at line 355 of file RawEventHeader.h.

{
  m_formatVersionMinor = value;
}
int DayaBay::RawEventHeader::evtSize ( ) const [inline]

Retrieve const Event size.

Definition at line 360 of file RawEventHeader.h.

{
  return m_evtSize;
}
void DayaBay::RawEventHeader::setEvtSize ( int  value) [inline]

Update Event size.

Definition at line 365 of file RawEventHeader.h.

{
  m_evtSize = value;
}
int DayaBay::RawEventHeader::detId ( ) const [inline]

Retrieve const Detector Id.

Definition at line 370 of file RawEventHeader.h.

{
  return m_detId;
}
void DayaBay::RawEventHeader::setDetId ( int  value) [inline]

Update Detector Id.

Definition at line 375 of file RawEventHeader.h.

{
  m_detId = value;
}
int DayaBay::RawEventHeader::siteId ( ) const [inline]

Retrieve const m_detId[4:7].

Definition at line 380 of file RawEventHeader.h.

{
  return m_siteId;
}
void DayaBay::RawEventHeader::setSiteId ( int  value) [inline]

Update m_detId[4:7].

Definition at line 385 of file RawEventHeader.h.

{
  m_siteId = value;
}
int DayaBay::RawEventHeader::positionId ( ) const [inline]

Retrieve const m_detId[0:3].

Definition at line 390 of file RawEventHeader.h.

{
  return m_positionId;
}
void DayaBay::RawEventHeader::setPositionId ( int  value) [inline]

Update m_detId[0:3].

Definition at line 395 of file RawEventHeader.h.

{
  m_positionId = value;
}
int DayaBay::RawEventHeader::runNum ( ) const [inline]

Retrieve const Run number.

Definition at line 400 of file RawEventHeader.h.

{
  return m_runNum;
}
void DayaBay::RawEventHeader::setRunNum ( int  value) [inline]

Update Run number.

Definition at line 405 of file RawEventHeader.h.

{
  m_runNum = value;
}
int DayaBay::RawEventHeader::evtNum ( ) const [inline]

Retrieve const Event number.

Definition at line 410 of file RawEventHeader.h.

{
  return m_evtNum;
}
void DayaBay::RawEventHeader::setEvtNum ( int  value) [inline]

Update Event number.

Definition at line 415 of file RawEventHeader.h.

{
  m_evtNum = value;
}
int DayaBay::RawEventHeader::dataType ( ) const [inline]

Retrieve const 0:normal, 1:calib, 2:elec.

calib.

Definition at line 420 of file RawEventHeader.h.

{
  return m_dataType;
}
void DayaBay::RawEventHeader::setDataType ( int  value) [inline]

Update 0:normal, 1:calib, 2:elec.

calib.

Definition at line 425 of file RawEventHeader.h.

{
  m_dataType = value;
}
int DayaBay::RawEventHeader::dataTypeSpecific ( ) const [inline]

Retrieve const DAC for elec.

calib.

Definition at line 430 of file RawEventHeader.h.

{
  return m_dataTypeSpecific;
}
void DayaBay::RawEventHeader::setDataTypeSpecific ( int  value) [inline]

Update DAC for elec.

calib.

Definition at line 435 of file RawEventHeader.h.

{
  m_dataTypeSpecific = value;
}
int DayaBay::RawEventHeader::dataStatus ( ) const [inline]

Retrieve const Data Status.

Definition at line 440 of file RawEventHeader.h.

{
  return m_dataStatus;
}
void DayaBay::RawEventHeader::setDataStatus ( int  value) [inline]

Update Data Status.

Definition at line 445 of file RawEventHeader.h.

{
  m_dataStatus = value;
}
const std::vector< DayaBay::RawRom * > & DayaBay::RawEventHeader::modules ( ) const [inline]

Retrieve const Raw readout module.

Definition at line 450 of file RawEventHeader.h.

{
  return m_modules;
}
void DayaBay::RawEventHeader::setModules ( const std::vector< DayaBay::RawRom * > &  value) [inline]

Update Raw readout module.

Definition at line 455 of file RawEventHeader.h.

{
  m_modules = value;
}
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.

    {
      return ( sizeof(RawEventHeader) == size ? 
               boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::malloc() :
               ::operator new(size) );
    }
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.

    {
      return ::operator new (size,pObj);
    }
static void DayaBay::RawEventHeader::operator delete ( void *  p) [inline, static]

operator delete

Reimplemented from DayaBay::HeaderObject.

Definition at line 229 of file RawEventHeader.h.

    {
      boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::is_from(p) ?
      boost::singleton_pool<RawEventHeader, sizeof(RawEventHeader)>::free(p) :
      ::operator delete(p);
    }
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.

    {
      ::operator delete (p, pObj);
    }

Member Data Documentation

# of the block

Definition at line 247 of file RawEventHeader.h.

in bytes

Definition at line 248 of file RawEventHeader.h.

Major format version.

Definition at line 249 of file RawEventHeader.h.

Minor format version.

Definition at line 250 of file RawEventHeader.h.

Event size.

Definition at line 251 of file RawEventHeader.h.

Detector Id.

Definition at line 252 of file RawEventHeader.h.

m_detId[4:7]

Definition at line 253 of file RawEventHeader.h.

m_detId[0:3]

Definition at line 254 of file RawEventHeader.h.

Run number.

Definition at line 255 of file RawEventHeader.h.

Event number.

Definition at line 256 of file RawEventHeader.h.

0:normal, 1:calib, 2:elec. calib.

Definition at line 257 of file RawEventHeader.h.

DAC for elec. calib.

Definition at line 258 of file RawEventHeader.h.

Data Status.

Definition at line 259 of file RawEventHeader.h.

Raw readout module.

Definition at line 260 of file RawEventHeader.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:59:04 for RawEvent by doxygen 1.7.4