ATLAS Offline Software
|
This class provides the core BLOB infrastructure. More...
#include <TileCalibDrawerBase.h>
Public Member Functions | |
virtual | ~TileCalibDrawerBase () |
Dtor. More... | |
TileCalibDrawerBase (const TileCalibDrawerBase &other) | |
Copy Ctor. More... | |
TileCalibDrawerBase & | operator= (const TileCalibDrawerBase &other) |
Assignment operator. More... | |
virtual void | clone (const TileCalibDrawerBase &other) |
Initialzes Blob with content of other Blob. More... | |
virtual uint16_t | getType () const |
Returns TileCalibDrawer::BASE. More... | |
virtual void | dump () const |
Prints the BLOB header summary information to std::cout. More... | |
virtual void | dump (std::ostream &stm) const |
Prints the BLOB header summary information. More... | |
long | getBlobSize () const |
Returns the BLOB size in units of bytes. More... | |
long | getBlobSize32 () const |
Returns the BLOB size in units of uint32_t. More... | |
uint16_t | getObjType () const |
Returns the BLOB object type. More... | |
uint16_t | getObjVersion () const |
Returns the BLOB object version. More... | |
uint32_t | getObjSizeUint32 () const |
Returns the size of a data object in units of uint32_t. More... | |
uint32_t | getObjSizeByte () const |
Returns the size of a data object in units of bytes. More... | |
uint32_t | getNObjs () const |
Returns the number of data objects stored int the BLOB. More... | |
uint16_t | getNChans () const |
Returns the number of channels stored in the BLOB. More... | |
uint16_t | getNGains () const |
Returns the number of gains stored for each channel. More... | |
uint32_t | getCommentSizeUint32 () const |
Returns the space occupied by the comment fields in units of uint32_t. More... | |
uint32_t | getCommentSizeChar () const |
Returns the space occupied by the comment fields in units of chars. More... | |
std::string | getAuthor () const |
Returns the comment author. More... | |
std::string | getComment () const |
Returns the actual comment. More... | |
uint64_t | getTimeStamp () const |
Returns the unix timestamp of the comment (seconds since 1.1.1970) More... | |
std::string | getDate () const |
Returns the date of the comment as string (derived from timestamp) More... | |
std::string | getFullComment () const |
Returns a formated string build from all comment fields. More... | |
const void * | getAddress (unsigned int iEle) const |
Returns start address of iEle-th basic unit. More... | |
void * | getAddress (unsigned int iEle) |
Static Public Attributes | |
static const unsigned int | m_hdrSize32 = 5 |
The header size in units of uint32_t. More... | |
Protected Member Functions | |
TileCalibDrawerBase (const coral::Blob &blob) | |
Ctor for const blob. More... | |
TileCalibDrawerBase (coral::Blob &blob) | |
Ctor for non-const blob. More... | |
uint32_t | createBlob (uint16_t objType, uint16_t objVersion, uint32_t objSizeUint32, uint32_t nObjs, uint16_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
(re-)creation of the referenced BLOB object. More... | |
void | dumpHeader (std::ostream &stm) const |
Prints the BLOB header summary information. More... | |
Private Attributes | |
coral::Blob * | m_blob_nc |
Non-const reference to the BLOB. More... | |
const coral::Blob * | m_blob |
Const reference to the BLOB (always there) More... | |
const uint32_t * | m_blobStart32 |
Cache blob starting address as uint_32t*. More... | |
const uint16_t * | m_blobStart16 |
Cache blob starting address as uint_16t*. More... | |
uint64_t | m_blobSize32 |
Cache blob size in units of uint32_t. More... | |
bool | m_isBlobOwner |
Is this TileCalibDrawer owner of the BLOB. More... | |
This class provides the core BLOB infrastructure.
All data storage classes inherit from this class. It provides the infrastructure to store and retrieve units of conditions data associated with one channel or ADC ("data object") by implementing a common BLOB header. This header holds the following information:
A data object contains all conditions data related to one channel or ADC (depending on data stored on channel or adc level), for example 5 floats. The conditions data units themselves must be build from objects of 32 bit length, i.e. available types are float, uint32_t and int32_t.
The TileCalibDrawerBase class holds a reference to a coral::Blob containing conditions data for one TileCal drawer. A total number of 277 TileCalibDrawer objects are stored in each COOL folder to hold data for the whole detector. Each TileCalibDrawer is stored in its own COOL channel, numbered from 0 to 276. Data related to the 4*64 TileCal modules (LBA01, LBA02, ... , LBC01, ... , EBA01, ... , EBC63, EBC64) are stored in the channel range [20,275]. The channel range [0,19] holds default drawers: [0-3] are global detector defaults, [4-7] for LBA, [8-11] for LBC, [12-15] for EBA and [16-19] for EBC.
Channel number 1000 contains TileCalibDrawerCmt comment classes, common for all TileCalibDrawers of the same IOV which do not have their own comment fields initialized. Comment fields are not initialized if both the author and the comment field are empty in initialization.
Definition at line 59 of file TileCalibDrawerBase.h.
|
virtual |
Dtor.
Definition at line 36 of file TileCalibDrawerBase.cxx.
TileCalibDrawerBase::TileCalibDrawerBase | ( | const TileCalibDrawerBase & | other | ) |
Copy Ctor.
In case the copy constructor is called, the underlying coral::Blob is copied and the new TileCalibDrawer is the owner of the new coral::Blob. I.e. it will be deleted when the TileCalibDrawer Dtor is called.
other | The TileCalibDrawer to copy |
Definition at line 44 of file TileCalibDrawerBase.cxx.
|
protected |
|
protected |
|
virtual |
Initialzes Blob with content of other Blob.
other | TileCalibDrawer used for initialization |
Definition at line 74 of file TileCalibDrawerBase.cxx.
|
protected |
(re-)creation of the referenced BLOB object.
objType | Object type |
objVersion | Object version |
objSizeUint32 | Size of a data object (in uint32_t) |
nObjs | Total number of data objects |
nChans | number of stored channels |
nGains | number of stored gains |
author | comment author |
comment | actual comment |
timeStamp | unix time stamp (if 0, current time is used) |
Definition at line 87 of file TileCalibDrawerBase.cxx.
|
inlinevirtual |
Prints the BLOB header summary information to std::cout.
Reimplemented in TileCalibDrawerOfc, TileCalibDrawerDat< T >, and TileCalibDrawerCmt.
Definition at line 83 of file TileCalibDrawerBase.h.
|
inlinevirtual |
Prints the BLOB header summary information.
stm | The output stream to use |
Reimplemented in TileCalibDrawerOfc, TileCalibDrawerDat< T >, TileCalibDrawerDat< uint32_t >, TileCalibDrawerDat< float >, and TileCalibDrawerCmt.
Definition at line 86 of file TileCalibDrawerBase.h.
|
protected |
Prints the BLOB header summary information.
stm | output stream to use |
Definition at line 200 of file TileCalibDrawerBase.cxx.
void* TileCalibDrawerBase::getAddress | ( | unsigned int | iEle | ) |
const void* TileCalibDrawerBase::getAddress | ( | unsigned int | iEle | ) | const |
Returns start address of iEle-th basic unit.
iEle | sequential basic unit number |
std::string TileCalibDrawerBase::getAuthor | ( | ) | const |
|
inline |
|
inline |
std::string TileCalibDrawerBase::getComment | ( | ) | const |
|
inline |
Returns the space occupied by the comment fields in units of chars.
Definition at line 112 of file TileCalibDrawerBase.h.
uint32_t TileCalibDrawerBase::getCommentSizeUint32 | ( | ) | const |
Returns the space occupied by the comment fields in units of uint32_t.
std::string TileCalibDrawerBase::getDate | ( | ) | const |
Returns the date of the comment as string (derived from timestamp)
Definition at line 176 of file TileCalibDrawerBase.cxx.
std::string TileCalibDrawerBase::getFullComment | ( | ) | const |
Returns a formated string build from all comment fields.
Definition at line 190 of file TileCalibDrawerBase.cxx.
uint16_t TileCalibDrawerBase::getNChans | ( | ) | const |
Returns the number of channels stored in the BLOB.
uint16_t TileCalibDrawerBase::getNGains | ( | ) | const |
Returns the number of gains stored for each channel.
uint32_t TileCalibDrawerBase::getNObjs | ( | ) | const |
Returns the number of data objects stored int the BLOB.
|
inline |
Returns the size of a data object in units of bytes.
Definition at line 102 of file TileCalibDrawerBase.h.
uint32_t TileCalibDrawerBase::getObjSizeUint32 | ( | ) | const |
Returns the size of a data object in units of uint32_t.
uint16_t TileCalibDrawerBase::getObjType | ( | ) | const |
Returns the BLOB object type.
uint16_t TileCalibDrawerBase::getObjVersion | ( | ) | const |
Returns the BLOB object version.
uint64_t TileCalibDrawerBase::getTimeStamp | ( | ) | const |
Returns the unix timestamp of the comment (seconds since 1.1.1970)
|
inlinevirtual |
Returns TileCalibDrawer::BASE.
Reimplemented in TileCalibDrawerOfc, TileCalibDrawerBch, TileCalibDrawerFlt, TileCalibDrawerInt, and TileCalibDrawerCmt.
Definition at line 80 of file TileCalibDrawerBase.h.
TileCalibDrawerBase & TileCalibDrawerBase::operator= | ( | const TileCalibDrawerBase & | other | ) |
|
private |
Const reference to the BLOB (always there)
Definition at line 176 of file TileCalibDrawerBase.h.
|
private |
Non-const reference to the BLOB.
(Only present if we were created with a non-const blob.)
Definition at line 174 of file TileCalibDrawerBase.h.
|
private |
Cache blob size in units of uint32_t.
Definition at line 182 of file TileCalibDrawerBase.h.
|
private |
Cache blob starting address as uint_16t*.
Definition at line 180 of file TileCalibDrawerBase.h.
|
private |
Cache blob starting address as uint_32t*.
Definition at line 178 of file TileCalibDrawerBase.h.
|
static |
The header size in units of uint32_t.
Definition at line 138 of file TileCalibDrawerBase.h.
|
private |
Is this TileCalibDrawer owner of the BLOB.
Definition at line 184 of file TileCalibDrawerBase.h.