![]() |
ATLAS Offline Software
|
Generic template class for storing a number of "T"s for each channel or ADC. More...
#include <TileCalibDrawerDat.h>
Public Types | |
| typedef std::vector< std::vector< T > > | DefType |
| Object to hold default data used for initialization. | |
Public Member Functions | |
| virtual | ~TileCalibDrawerDat () |
| Dtor. | |
| T | getData (unsigned int channel, unsigned int adc, unsigned int idx) const |
| Returns a single T belonging to a channel/ADC. | |
| void | init (const DefType &def, uint16_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/ADC. | |
| 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 void | clone (const TileCalibDrawerBase &other) |
| Initialzes Blob with content of other Blob. | |
| virtual uint16_t | getType () const |
| Returns TileCalibDrawer::BASE. | |
| long | getBlobSize () const |
| Returns the BLOB size in units of bytes. | |
| long | getBlobSize32 () const |
| Returns the BLOB size in units of uint32_t. | |
| 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. | |
| uint16_t | getNChans () const |
| Returns the number of channels stored in the BLOB. | |
| uint16_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. | |
| 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) |
Static Public Attributes | |
| static const unsigned int | m_hdrSize32 = 5 |
| The header size in units of uint32_t. | |
Protected Member Functions | |
| TileCalibDrawerDat (const coral::Blob &blob) | |
| Ctor (const). | |
| TileCalibDrawerDat (coral::Blob &blob) | |
| Ctor (non-const). | |
| const T * | getAddress (unsigned int channel, unsigned int adc) const |
| Returns a pointer to the first value for the specified channel & ADC. | |
| T * | getAddress (unsigned int channel, unsigned int adc) |
| 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. | |
| void | dumpHeader (std::ostream &stm) const |
| Prints the BLOB header summary information. | |
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) | |
| const uint32_t * | m_blobStart32 |
| Cache blob starting address as uint_32t*. | |
| const uint16_t * | m_blobStart16 |
| Cache blob starting address as uint_16t*. | |
| uint64_t | m_blobSize32 |
| Cache blob size in units of uint32_t. | |
| bool | m_isBlobOwner |
| Is this TileCalibDrawer owner of the BLOB. | |
Generic template class for storing a number of "T"s for each channel or ADC.
This class implements the infrastructure to store a (variable) number of Ts for each channel or ADC. 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 TileCalibDrawerDat.h.
| typedef std::vector<std::vector<T> > TileCalibDrawerDat< T >::DefType |
Object to hold default data used for initialization.
The length of the first and second 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 TileCalibDrawerDat.h.
|
inlinevirtual |
|
inlineprotected |
Ctor (const).
Derived classes should set doTypeCheck=false and do their own check.
Definition at line 89 of file TileCalibDrawerDat.h.
|
inlineprotected |
Ctor (non-const).
Derived classes should set doTypeCheck=false and do their own check.
Definition at line 92 of file TileCalibDrawerDat.h.
|
virtualinherited |
Initialzes Blob with content of other Blob.
| other | TileCalibDrawer used for initialization |
Definition at line 74 of file TileCalibDrawerBase.cxx.
|
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 87 of file TileCalibDrawerBase.cxx.
|
inlinevirtual |
Prints out the content of the blob to std::out.
Reimplemented from TileCalibDrawerBase.
Definition at line 81 of file TileCalibDrawerDat.h.
|
virtual |
Prints out the content of the blob.
| stm | The stream to print to |
Reimplemented from TileCalibDrawerBase.
Definition at line 212 of file TileCalibDrawerDat.h.
|
protectedinherited |
Prints the BLOB header summary information.
| stm | output stream to use |
Definition at line 200 of file TileCalibDrawerBase.cxx.
|
inherited |
|
inherited |
Returns start address of iEle-th basic unit.
| iEle | sequential basic unit number |
|
protected |
Definition at line 203 of file TileCalibDrawerDat.h.
|
protected |
Returns a pointer to the first value for the specified channel & ADC.
| channel | The channel number; If channel number >= getNChans() it is reset to channel % (maximum number of channels in drawer) if channel number > (maximum number of channels in drawer) otherwise 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 194 of file TileCalibDrawerDat.h.
|
inherited |
Returns the comment author.
Definition at line 147 of file TileCalibDrawerBase.cxx.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Returns the actual comment.
Definition at line 161 of file TileCalibDrawerBase.cxx.
|
inlineinherited |
Returns the space occupied by the comment fields in units of chars.
Definition at line 112 of file TileCalibDrawerBase.h.
|
inherited |
Returns the space occupied by the comment fields in units of uint32_t.
| T TileCalibDrawerDat< T >::getData | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| unsigned int | idx ) const |
Returns a single T belonging to a channel/ADC.
| adc | The gain index; if >= getNGains() it is reset to 0 without warning (default policy) |
| idx | The index of the requested value |
Definition at line 140 of file TileCalibDrawerDat.h.
|
inherited |
Returns the date of the comment as string (derived from timestamp)
Definition at line 176 of file TileCalibDrawerBase.cxx.
|
inherited |
Returns a formated string build from all comment fields.
Definition at line 190 of file TileCalibDrawerBase.cxx.
|
inherited |
Returns the number of channels stored in the BLOB.
|
inherited |
Returns the number of gains stored for each channel.
|
inherited |
Returns the number of data objects stored int the BLOB.
|
inlineinherited |
Returns the size of a data object in units of bytes.
Definition at line 102 of file TileCalibDrawerBase.h.
|
inherited |
Returns the size of a data object in units of uint32_t.
|
inherited |
Returns the BLOB object type.
|
inherited |
Returns the BLOB object version.
|
inherited |
Returns the unix timestamp of the comment (seconds since 1.1.1970)
|
inlinevirtualinherited |
Returns TileCalibDrawer::BASE.
Reimplemented in TileCalibDrawerBch, TileCalibDrawerCmt, TileCalibDrawerFlt, TileCalibDrawerInt, and TileCalibDrawerOfc.
Definition at line 80 of file TileCalibDrawerBase.h.
| void TileCalibDrawerDat< T >::init | ( | const DefType & | def, |
| uint16_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 (derived class) object |
| objVers | Version of the (derived class) 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 107 of file TileCalibDrawerDat.h.
| void TileCalibDrawerDat< 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 184 of file TileCalibDrawerDat.h.
| void TileCalibDrawerDat< T >::setData | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| unsigned int | idx, | ||
| T | data ) |
Sets a single T belonging to a channel/ADC.
| 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 165 of file TileCalibDrawerDat.h.
|
privateinherited |
Const reference to the BLOB (always there)
Definition at line 176 of file TileCalibDrawerBase.h.
|
privateinherited |
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.
|
privateinherited |
Cache blob size in units of uint32_t.
Definition at line 182 of file TileCalibDrawerBase.h.
|
privateinherited |
Cache blob starting address as uint_16t*.
Definition at line 180 of file TileCalibDrawerBase.h.
|
privateinherited |
Cache blob starting address as uint_32t*.
Definition at line 178 of file TileCalibDrawerBase.h.
|
staticinherited |
The header size in units of uint32_t.
Definition at line 138 of file TileCalibDrawerBase.h.
|
privateinherited |
Is this TileCalibDrawer owner of the BLOB.
Definition at line 184 of file TileCalibDrawerBase.h.