![]() |
ATLAS Offline Software
|
Generic class for storing a number of floats (Flt) for each channel or ADC. More...
#include <TileCalibDrawerFlt.h>
Public Types | |
| typedef std::vector< std::vector< float > > | DefType |
| Object to hold default data used for initialization. | |
Public Member Functions | |
| virtual | ~TileCalibDrawerFlt () |
| Dtor. | |
| virtual uint16_t | getType () const |
| Returns TileCalibType::FLT. | |
| float | getCalib (unsigned int channel, unsigned int adc, float energy, bool invert=false) const |
| Returns the calibrated energy for a given channel/ADC and input energy. | |
| bool | getYDY (unsigned int channel, unsigned int adc, float x, float &y, float &dy) const |
| Returns y and derivative dy for a given x for function blob of type 200. | |
| float | getY (unsigned int channel, unsigned int adc, float x) const |
| Returns y for a given x for function blob of type 200. | |
| float | getDY (unsigned int channel, unsigned int adc, float x) const |
| Returns y for a given x for function blob of type 200. | |
| float | 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, float data) |
| Sets a single T belonging to a channel/ADC. | |
| 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) |
| virtual void | clone (const TileCalibDrawerBase &other) |
| Initialzes Blob with content of other Blob. | |
| 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. | |
Static Public Member Functions | |
| static const TileCalibDrawerFlt * | getInstance (const coral::Blob &blob) |
| Returns a pointer to a const TileCalibDrawerFlt. | |
| static TileCalibDrawerFlt * | getInstance (coral::Blob &blob, const DefType &def, uint16_t nChans, uint16_t objVers, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
| Returns a pointer to a non-const TileCalibDrawerFlt. | |
Static Public Attributes | |
| static const unsigned int | m_hdrSize32 |
| The header size in units of uint32_t. | |
Protected Member Functions | |
| TileCalibDrawerFlt (const coral::Blob &blob) | |
| Ctor (const). | |
| TileCalibDrawerFlt (coral::Blob &blob) | |
| Ctor (non-const). | |
| const float * | getAddress (unsigned int channel, unsigned int adc) const |
| Returns a pointer to the first value for the specified channel & 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 class for storing a number of floats (Flt) for each channel or ADC.
This class implements the infrastructure to store a (variable) number of floats for each channel or ADC. The number of floats to store is encoded in the objSize header variable. The object version header variable is used to encode different functional forms on the stored data, accessed through the getCalib function.
Definition at line 26 of file TileCalibDrawerFlt.h.
|
inherited |
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 |
|
protected |
Ctor (const).
Definition at line 40 of file TileCalibDrawerFlt.cxx.
|
protected |
Ctor (non-const).
Definition at line 52 of file TileCalibDrawerFlt.cxx.
|
virtualinherited |
Initialzes Blob with content of other Blob.
| other | TileCalibDrawer used for initialization |
Definition at line 77 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 157 of file TileCalibDrawerBase.cxx.
|
inlinevirtualinherited |
Prints the BLOB header summary information.
| stm | The output stream to use |
Reimplemented in TileCalibDrawerCmt, TileCalibDrawerDat< T >, and TileCalibDrawerOfc.
Definition at line 86 of file TileCalibDrawerBase.h.
|
inlinevirtualinherited |
Prints out the content of the blob to std::out.
Reimplemented from TileCalibDrawerBase.
Definition at line 81 of file TileCalibDrawerDat.h.
|
protectedinherited |
Prints the BLOB header summary information.
| stm | output stream to use |
Definition at line 169 of file TileCalibDrawerBase.cxx.
|
protectedinherited |
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 100 of file TileCalibDrawerDat.h.
|
inherited |
|
inherited |
Returns start address of iEle-th basic unit.
| iEle | sequential basic unit number |
|
inherited |
Returns the comment author.
Definition at line 118 of file TileCalibDrawerBase.cxx.
|
inlineinherited |
|
inlineinherited |
| float TileCalibDrawerFlt::getCalib | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float | energy, | ||
| bool | invert = false ) const |
Returns the calibrated energy for a given channel/ADC and input energy.
| 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) |
| energy | The energy that should be calibrated |
| invert | If true, the calibration is inverted |
Definition at line 65 of file TileCalibDrawerFlt.cxx.
|
inherited |
Returns the actual comment.
Definition at line 120 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.
|
inherited |
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 49 of file TileCalibDrawerDat.h.
|
inherited |
Returns the date of the comment as string (derived from timestamp)
Definition at line 124 of file TileCalibDrawerBase.cxx.
| float TileCalibDrawerFlt::getDY | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float | x ) const |
Returns y for a given x for function blob of type 200.
This function is inefficient and created for python use only. (Python does not like float references)
Definition at line 275 of file TileCalibDrawerFlt.cxx.
|
inherited |
Returns a formated string build from all comment fields.
Definition at line 126 of file TileCalibDrawerBase.cxx.
|
static |
Returns a pointer to a const TileCalibDrawerFlt.
Definition at line 13 of file TileCalibDrawerFlt.cxx.
|
static |
Returns a pointer to a non-const TileCalibDrawerFlt.
| blob | Reference to a coral::Blob |
| 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 25 of file TileCalibDrawerFlt.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)
|
inlinevirtual |
Returns TileCalibType::FLT.
Reimplemented from TileCalibDrawerBase.
Definition at line 34 of file TileCalibDrawerFlt.h.
| float TileCalibDrawerFlt::getY | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float | x ) const |
Returns y for a given x for function blob of type 200.
This function is created as a helper function for TileCalibDrawer::getYDY and for python use. (Python does not like float references)
Definition at line 217 of file TileCalibDrawerFlt.cxx.
| bool TileCalibDrawerFlt::getYDY | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float | x, | ||
| float & | y, | ||
| float & | dy ) const |
Returns y and derivative dy for a given x for function blob of type 200.
| 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) |
| x | Input x value |
| y | Y value corresponding to x |
| dy | Derivative of the function at x |
Definition at line 149 of file TileCalibDrawerFlt.cxx.
|
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 (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 59 of file TileCalibDrawerDat.h.
|
inherited |
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 71 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.