![]() |
ATLAS Offline Software
|
Class for storing a number of floats (Flt) and functions on those. More...
#include <CaloCondBlobFlt.h>
Public Types | |
| typedef std::vector< std::vector< float > > | DefType |
| Object to hold default data used for initialization. | |
Public Member Functions | |
| virtual | ~CaloCondBlobFlt () |
| Dtor. | |
| virtual uint16_t | getType () const |
| Returns CaloCondType::FLT. | |
| float | getCalib (unsigned int channel, unsigned int adc, float x, bool invert=false) const |
| Returns the calibrated energy for a given channel/gain and input energy. | |
| float | getData (const unsigned int channel, const unsigned int adc, const unsigned int idx) 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, float data) |
| Sets a single T belonging to a channel/gain. | |
| virtual void | dump () const |
| Prints out the content of the blob to std::out. | |
| virtual void | dump (std::ostream &stm) const |
| Prints the BLOB header summary information. | |
| const void * | getAddress (unsigned int iEle) const |
| Returns start address of iEle-th basic unit. | |
| void * | getAddress (unsigned int iEle) |
| 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. | |
Static Public Member Functions | |
| static CaloCondBlobFlt * | getInstance (coral::Blob &blob) |
| Returns a pointer to a non-const CaloCondBlobFlt. | |
| static const CaloCondBlobFlt * | getInstance (const coral::Blob &blob) |
| Returns a pointer to a const CaloCondBlobFlt. | |
Protected Member Functions | |
| CaloCondBlobFlt (const coral::Blob &blob) | |
| Ctor. | |
| CaloCondBlobFlt (coral::Blob &blob) | |
| Ctor. | |
| const float * | getAddress (const unsigned int channel, const unsigned int adc) const |
| Returns a pointer to the first value for the specified channel/gain. | |
| 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 |
Class for storing a number of floats (Flt) and functions on those.
This class implements the infrastructure to store a (variable) number of floats for each channel or ADC. The stored floats can be used to define a function of one parameter. Different functional forms can be implemented and differentiated by the objVersion header variable (this allows for e.g. schema evolution). The functions are evaluated by calling the getCalib() function.
Definition at line 28 of file CaloCondBlobFlt.h.
|
inherited |
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 |
|
protected |
Ctor.
Definition at line 26 of file CaloCondBlobFlt.cxx.
|
protected |
Ctor.
Definition at line 39 of file CaloCondBlobFlt.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 129 of file CaloCondBlobBase.cxx.
|
inlinevirtualinherited |
Prints the BLOB header summary information.
| stm | The output stream to use |
Reimplemented in CaloCondBlobDat< T >.
Definition at line 59 of file CaloCondBlobBase.h.
|
inlinevirtualinherited |
Prints out the content of the blob to std::out.
Reimplemented from CaloCondBlobBase.
Definition at line 89 of file CaloCondBlobDat.h.
|
protectedinherited |
Prints the BLOB header summary information.
| stm | output stream to use |
Definition at line 141 of file CaloCondBlobBase.cxx.
|
protectedinherited |
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 104 of file CaloCondBlobDat.h.
|
inlineinherited |
Definition at line 109 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns start address of iEle-th basic unit.
| iEle | sequential basic unit number |
Definition at line 108 of file CaloCondBlobBase.h.
|
inherited |
|
inlineinherited |
|
inlineprivateinherited |
Returns the BLOB start address as uint32_t pointer.
Definition at line 154 of file CaloCondBlobBase.h.
|
inlineprivateinherited |
Returns the BLOB start address as uint32_t pointer.
Definition at line 152 of file CaloCondBlobBase.h.
| float CaloCondBlobFlt::getCalib | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float | x, | ||
| bool | invert = false ) const |
Returns the calibrated energy for a given channel/gain and input energy.
| channel | The channel number |
| adc | The gain index |
| x | Parameter of the (calibration) function |
| invert | If true, the calibration is undone |
Definition at line 53 of file CaloCondBlobFlt.cxx.
|
inherited |
Returns the actual comment.
Definition at line 94 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 82 of file CaloCondBlobBase.h.
|
inherited |
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 49 of file CaloCondBlobDat.h.
|
inherited |
Returns the date of the comment as string (derived from timestamp)
Definition at line 98 of file CaloCondBlobBase.cxx.
|
inherited |
Returns a formated string build from all comment fields.
Definition at line 100 of file CaloCondBlobBase.cxx.
|
inlineinherited |
Returns the size of the header in units of uint32_t.
Definition at line 86 of file CaloCondBlobBase.h.
|
static |
Returns a pointer to a const CaloCondBlobFlt.
Definition at line 19 of file CaloCondBlobFlt.cxx.
|
static |
Returns a pointer to a non-const CaloCondBlobFlt.
Definition at line 12 of file CaloCondBlobFlt.cxx.
|
inlineinherited |
Returns the number of channels stored in the BLOB.
Definition at line 78 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the number of gains stored for each channel.
Definition at line 80 of file CaloCondBlobBase.h.
|
inlineinherited |
Returns the number of data objects stored int the BLOB.
Definition at line 76 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 72 of file CaloCondBlobBase.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Returns the unix timestamp of the comment (seconds since 1.1.1970)
Definition at line 96 of file CaloCondBlobBase.h.
|
inlinevirtual |
Returns CaloCondType::FLT.
Reimplemented from CaloCondBlobBase.
Definition at line 36 of file CaloCondBlobFlt.h.
|
inherited |
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 67 of file CaloCondBlobDat.h.
|
staticprivateinherited |
Definition at line 147 of file CaloCondBlobBase.cxx.
|
inherited |
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 79 of file CaloCondBlobDat.h.
|
staticprivateinherited |
Definition at line 149 of file CaloCondBlobBase.cxx.
|
staticprivateinherited |
Definition at line 148 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.