![]() |
ATLAS Offline Software
|
Generic template class for storing a number of "T"s for each channel/gain. More...
#include <CaloCondBlobDat.h>
Public Types | |
| typedef std::vector< std::vector< T > > | DefType |
| Object to hold default data used for initialization. | |
Public Member Functions | |
| virtual | ~CaloCondBlobDat () |
| Dtor. | |
| T | getData (const unsigned int channel, const unsigned int adc, const unsigned int idx) const |
| Returns a single T belonging to a channel/gain. | |
| T | getData (const unsigned int channel) const |
| Returns a single T belonging to a channel/gain. | |
| void | init (const DefType &def, uint32_t nChans, uint16_t objVers, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
| Initializing function. | |
| void | setData (unsigned int channel, unsigned int adc, unsigned int idx, T data) |
| Sets a single T belonging to a channel/gain. | |
| void | setData (unsigned int channel, unsigned int adc, const std::vector< T > &data) |
| Sets a number of Ts stored in the input vector. | |
| virtual void | dump () const |
| Prints out the content of the blob to std::out. | |
| virtual void | dump (std::ostream &stm) const |
| Prints out the content of the blob. | |
| virtual uint16_t | getType () const |
| Returns CaloCondDrawer::BASE. | |
| long | getBlobSize () const |
| Returns the BLOB size. | |
| uint16_t | getObjType () const |
| Returns the BLOB object type. | |
| uint16_t | getObjVersion () const |
| Returns the BLOB object version. | |
| uint32_t | getObjSizeUint32 () const |
| Returns the size of a data object in units of uint32_t. | |
| uint32_t | getObjSizeByte () const |
| Returns the size of a data object in units of bytes. | |
| uint32_t | getNObjs () const |
| Returns the number of data objects stored int the BLOB. | |
| uint32_t | getNChans () const |
| Returns the number of channels stored in the BLOB. | |
| uint32_t | getNGains () const |
| Returns the number of gains stored for each channel. | |
| uint32_t | getCommentSizeUint32 () const |
| Returns the space occupied by the comment fields in units of uint32_t. | |
| uint32_t | getCommentSizeChar () const |
| Returns the space occupied by the comment fields in units of chars. | |
| unsigned int | getHdrSize () const |
| Returns the size of the header in units of uint32_t. | |
| std::string | getAuthor () const |
| Returns the comment author. | |
| std::string | getComment () const |
| Returns the actual comment. | |
| uint64_t | getTimeStamp () const |
| Returns the unix timestamp of the comment (seconds since 1.1.1970) | |
| std::string | getDate () const |
| Returns the date of the comment as string (derived from timestamp) | |
| std::string | getFullComment () const |
| Returns a formated string build from all comment fields. | |
| const void * | getAddress (unsigned int iEle) const |
| Returns start address of iEle-th basic unit. | |
| void * | getAddress (unsigned int iEle) |
Protected Member Functions | |
| CaloCondBlobDat (const coral::Blob &blob) | |
| Ctor. | |
| CaloCondBlobDat (coral::Blob &blob) | |
| Ctor. | |
| const T * | getAddress (const unsigned int channel, const unsigned int adc) const |
| Returns a pointer to the first value for the specified channel/gain. | |
| T * | getAddress (const unsigned int channel, const unsigned int adc) |
| uint32_t | createBlob (uint16_t objType, uint16_t objVersion, uint32_t objSizeUint32, uint32_t nObjs, uint32_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
| (re-)creation of the referenced BLOB object. | |
| void | dumpHeader (std::ostream &stm) const |
| Prints the BLOB header summary information. | |
Protected Attributes | |
| const void * | m_pDataStart |
Private Member Functions | |
| const uint32_t * | getBlobStart () const |
| Returns the BLOB start address as uint32_t pointer. | |
| uint32_t * | getBlobStart () |
| Returns the BLOB start address as uint32_t pointer. | |
Static Private Member Functions | |
| static uint32_t | packGainAndNchans (const uint32_t gain, const uint32_t nChans) |
| static uint32_t | unpacknGains (const uint32_t gainAndnChans) |
| static uint32_t | unpacknChans (const uint32_t gainAndnChans) |
Private Attributes | |
| coral::Blob * | m_blob_nc |
| Non-const reference to the BLOB. | |
| const coral::Blob * | m_blob |
| Const reference to the BLOB (always there) | |
| bool | m_isBlobOwner |
| Do I own the BLOB? | |
| unsigned | m_sizeOfObj |
| Chache of some frequently-used numbers. | |
| unsigned | m_nChans |
| unsigned | m_nGains |
Generic template class for storing a number of "T"s for each channel/gain.
This class implements the infrastructure to store a (variable) number of Ts for each channel/gain. Only types that are a multiple of uint32_t can be stored, i.e. float, uint32_t, uint64_t, etc... The number of Ts to store is encoded in the objSize header variable. The object version header variable has no meaning for this class (since schema evolution does not make sense here) and is always set to 0.
Definition at line 30 of file CaloCondBlobDat.h.
| typedef std::vector<std::vector<T> > CaloCondBlobDat< T >::DefType |
Object to hold default data used for initialization.
The length of the outer and inner vector determines respectively the number of gains and values per gain to be stored. The indexing is thus DefType[iGain][iValue].
Definition at line 37 of file CaloCondBlobDat.h.
|
inlinevirtual |
|
inlineprotected |
Ctor.
Definition at line 96 of file CaloCondBlobDat.h.
|
inlineprotected |
|
protectedinherited |
(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 84 of file CaloCondBlobBase.cxx.
|
inlinevirtual |
Prints out the content of the blob to std::out.
Reimplemented from CaloCondBlobBase.
Definition at line 89 of file CaloCondBlobDat.h.
|
virtual |
Prints out the content of the blob.
| stm | The stream to print to |
Reimplemented from CaloCondBlobBase.
Definition at line 203 of file CaloCondBlobDat.h.
|
protectedinherited |
Prints the BLOB header summary information.
| stm | output stream to use |
Definition at line 229 of file CaloCondBlobBase.cxx.
|
inlineinherited |
Definition at line 272 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns start address of iEle-th basic unit.
| iEle | sequential basic unit number |
Definition at line 260 of file CaloCondBlobBase.h.
|
protected |
Definition at line 186 of file CaloCondBlobDat.h.
|
protected |
Returns a pointer to the first value for the specified channel/gain.
| channel | The channel number; if >= getNChans() it is reset to 0 without warning (default policy) |
| adc | The gain index; if >= getNGains() it is reset to 0 without warning (default policy) |
Definition at line 169 of file CaloCondBlobDat.h.
|
inherited |
Returns the comment author.
Definition at line 176 of file CaloCondBlobBase.cxx.
|
inlineinherited |
Returns the BLOB size.
Definition at line 66 of file CaloCondBlobBase.h.
|
inlineprivateinherited |
Returns the BLOB start address as uint32_t pointer.
Definition at line 186 of file CaloCondBlobBase.h.
|
inlineprivateinherited |
Returns the BLOB start address as uint32_t pointer.
Definition at line 178 of file CaloCondBlobBase.h.
|
inherited |
Returns the actual comment.
Definition at line 190 of file CaloCondBlobBase.cxx.
|
inlineinherited |
Returns the space occupied by the comment fields in units of chars.
Definition at line 84 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the space occupied by the comment fields in units of uint32_t.
Definition at line 250 of file CaloCondBlobBase.h.
| T CaloCondBlobDat< T >::getData | ( | const unsigned int | channel | ) | const |
Returns a single T belonging to a channel/gain.
| channel | The channel number |
Definition at line 142 of file CaloCondBlobDat.h.
| T CaloCondBlobDat< T >::getData | ( | const unsigned int | channel, |
| const unsigned int | adc, | ||
| const unsigned int | idx ) const |
Returns a single T belonging to a channel/gain.
| channel | The channel number |
| adc | The gain index |
| idx | The index of the requested value |
Definition at line 134 of file CaloCondBlobDat.h.
|
inherited |
Returns the date of the comment as string (derived from timestamp)
Definition at line 205 of file CaloCondBlobBase.cxx.
|
inherited |
Returns a formated string build from all comment fields.
Definition at line 219 of file CaloCondBlobBase.cxx.
|
inlineinherited |
Returns the size of the header in units of uint32_t.
Definition at line 86 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the number of channels stored in the BLOB.
Definition at line 232 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the number of gains stored for each channel.
Definition at line 240 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the number of data objects stored int the BLOB.
Definition at line 222 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the size of a data object in units of bytes.
Definition at line 74 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the size of a data object in units of uint32_t.
Definition at line 214 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the BLOB object type.
Definition at line 194 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the BLOB object version.
Definition at line 204 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the unix timestamp of the comment (seconds since 1.1.1970)
Definition at line 284 of file CaloCondBlobBase.h.
|
inlinevirtualinherited |
Returns CaloCondDrawer::BASE.
Reimplemented in CaloCondBlobFlt.
Definition at line 53 of file CaloCondBlobBase.h.
| void CaloCondBlobDat< T >::init | ( | const DefType & | def, |
| uint32_t | nChans, | ||
| uint16_t | objVers, | ||
| const std::string & | author = "", | ||
| const std::string & | comment = "", | ||
| uint64_t | timeStamp = 0 ) |
Initializing function.
| def | A reference to a DefType object, specifying the inital layout and values |
| nChans | Number of channels to create |
| objType | Type of the object |
| objVers | Version of the object |
| author | String containing the author user id |
| comment | String containing the actual comment |
| timeStamp | Unix time stamp (if 0, current time is used) |
Definition at line 111 of file CaloCondBlobDat.h.
|
staticprivateinherited |
Definition at line 139 of file CaloCondBlobBase.cxx.
| void CaloCondBlobDat< T >::setData | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| const std::vector< T > & | data ) |
Sets a number of Ts stored in the input vector.
| channel | The channel number |
| adc | The gain index |
| data | A vector containing the values to be set |
Definition at line 159 of file CaloCondBlobDat.h.
| void CaloCondBlobDat< T >::setData | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| unsigned int | idx, | ||
| T | data ) |
Sets a single T belonging to a channel/gain.
| channel | The channel number |
| adc | The gain index |
| idx | The index of the value to set |
| data | The data value to set |
Definition at line 150 of file CaloCondBlobDat.h.
|
staticprivateinherited |
Definition at line 160 of file CaloCondBlobBase.cxx.
|
staticprivateinherited |
Definition at line 150 of file CaloCondBlobBase.cxx.
|
privateinherited |
Const reference to the BLOB (always there)
Definition at line 161 of file CaloCondBlobBase.h.
|
privateinherited |
Non-const reference to the BLOB.
(Only present if we were created with a non-const blob.)
Definition at line 158 of file CaloCondBlobBase.h.
|
privateinherited |
Do I own the BLOB?
Definition at line 164 of file CaloCondBlobBase.h.
|
privateinherited |
Definition at line 168 of file CaloCondBlobBase.h.
|
privateinherited |
Definition at line 169 of file CaloCondBlobBase.h.
|
protectedinherited |
Definition at line 171 of file CaloCondBlobBase.h.
|
privateinherited |
Chache of some frequently-used numbers.
Definition at line 167 of file CaloCondBlobBase.h.