![]() |
ATLAS Offline Software
|
#include <TileCalibDrawerOfc.h>
Public Types | |
| enum | FIELD { FieldA = 0 , FieldB = 1 , FieldG = 2 , FieldC = 3 , FieldDG = 4 } |
| OFC field identifier. More... | |
Public Member Functions | |
| virtual | ~TileCalibDrawerOfc () |
| Dtor. | |
| virtual uint16_t | getType () const |
| Returns TileCalibType::OFC. | |
| uint32_t | getNSamples () const |
| Returns the number of sample stored. | |
| int32_t | getNPhases () const |
| Returns the number of phases (WARNING: Can be negative!) | |
| float | getPhase (unsigned int channel, unsigned int adc, unsigned int phaseIdx) const |
| Returns the stored phase. | |
| uint32_t | getNFields (uint16_t objVersion=0) const |
| Returns the number of fields. | |
| float | getOfc (unsigned int field, unsigned int channel, unsigned int adc, float phase, unsigned int sample) const |
| Returns OFC data. | |
| void | fillOfc (unsigned int channel, unsigned int adc, float &phase, float *w_a, float *w_b, float *w_c, float *g, float *dg) const |
| Fill all OFC for optimazation. | |
| virtual void | dump () const |
| Prints out the object content to std::cout. | |
| virtual void | dump (std::ostream &stm) const |
| Prints out the object content. | |
| void | init (uint16_t objVersion, uint32_t nSamples, int32_t nPhases, uint16_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
| Function for initializing a TileCalibDrawerOfc BLOB. | |
| void | setOfc (unsigned int field, unsigned int channel, unsigned int adc, float phase, unsigned int sample, float value) |
| Sets OFC data. | |
| void | setPhases (unsigned int channel, unsigned int adc, const std::vector< float > &phases) |
| Sets a phase value. | |
| 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. | |
| const void * | getAddress (unsigned int iEle) const |
| Returns start address of iEle-th basic unit. | |
| void * | getAddress (unsigned int iEle) |
Static Public Member Functions | |
| static TileCalibDrawerOfc * | getInstance (coral::Blob &blob, uint16_t objVersion, uint32_t nSamples, int32_t nPhases, uint16_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0) |
| Returns a pointer to a non-const TileCalibDrawerOfc. | |
| static const TileCalibDrawerOfc * | getInstance (const coral::Blob &blob) |
| Returns a pointer to a const TileCalibDrawerOfc. | |
Static Public Attributes | |
| static const unsigned int | m_hdrSize32 = 5 |
| The header size in units of uint32_t. | |
Protected Member Functions | |
| TileCalibDrawerOfc (const coral::Blob &blob) | |
| Ctor (const). | |
| TileCalibDrawerOfc (coral::Blob &blob) | |
| Ctor (non0const). | |
| 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 Member Functions | |
| void | initCheck () |
| const float * | getOfcStartAddress (unsigned int field, unsigned int channel, unsigned int adc, float &phase) const |
| Returns pointer to first data OFC for a given field, ADC & phase. | |
| float * | getOfcStartAddress (unsigned int field, unsigned int channel, unsigned int adc, float &phase) |
| unsigned int | getOfcStartOffset (unsigned int field, unsigned int channel, unsigned int adc, float &phase) const |
| const int32_t * | getPhaseStartAddress (unsigned int channel, unsigned int adc, unsigned int phaseIdx) const |
| Returns pointer to the requested phase value. | |
| int32_t * | getPhaseStartAddress (unsigned int channel, unsigned int adc, unsigned int phaseIdx) |
| unsigned int | getPhaseStartOffset (unsigned int channel, unsigned int adc, unsigned int phaseIdx) const |
| unsigned int | getPhaseNumber (unsigned int channel, unsigned int adc, float &phase) const |
| Returns the index for a given phase. | |
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. | |
Definition at line 40 of file TileCalibDrawerOfc.h.
OFC field identifier.
| Enumerator | |
|---|---|
| FieldA | |
| FieldB | |
| FieldG | |
| FieldC | |
| FieldDG | |
Definition at line 45 of file TileCalibDrawerOfc.h.
|
inlinevirtual |
|
protected |
Ctor (const).
Definition at line 42 of file TileCalibDrawerOfc.cxx.
|
protected |
Ctor (non0const).
Definition at line 50 of file TileCalibDrawerOfc.cxx.
|
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 object content to std::cout.
Reimplemented from TileCalibDrawerBase.
Definition at line 122 of file TileCalibDrawerOfc.h.
|
virtual |
Prints out the object content.
| stm | The stream to print to |
Reimplemented from TileCalibDrawerBase.
Definition at line 165 of file TileCalibDrawerOfc.cxx.
|
protectedinherited |
Prints the BLOB header summary information.
| stm | output stream to use |
Definition at line 200 of file TileCalibDrawerBase.cxx.
| void TileCalibDrawerOfc::fillOfc | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| float & | phase, | ||
| float * | w_a, | ||
| float * | w_b, | ||
| float * | w_c, | ||
| float * | g, | ||
| float * | dg ) const |
Fill all OFC for optimazation.
| 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) |
| phase | The phase of interest |
|
inherited |
|
inherited |
Returns start address of iEle-th basic unit.
| iEle | sequential basic unit number |
|
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.
|
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.
|
static |
Returns a pointer to a const TileCalibDrawerOfc.
Definition at line 31 of file TileCalibDrawerOfc.cxx.
|
static |
Returns a pointer to a non-const TileCalibDrawerOfc.
A negative nPhases value implies that the same phase table is used for all stored ADCs.
| blob | Reference to coral::Blob |
| objVersion | The objects version |
| nSamples | The number of samples to store. |
| nPhases | The number of phases to be stored for each ADC (negative: same phases for all ADCs) |
| nChans | The number of channels |
| nGains | The number of gains |
| 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 14 of file TileCalibDrawerOfc.cxx.
|
inherited |
Returns the number of channels stored in the BLOB.
| uint32_t TileCalibDrawerOfc::getNFields | ( | uint16_t | objVersion = 0 | ) | const |
Returns the number of fields.
Returns 3 for OF1, 4 for OF2, 5 for OF2+pulse_derivative.
| objVersion | The object version If default objVersion is passed, the object version is determined from the Blob. |
|
inherited |
Returns the number of gains stored for each channel.
|
inherited |
Returns the number of data objects stored int the BLOB.
| int32_t TileCalibDrawerOfc::getNPhases | ( | ) | const |
Returns the number of phases (WARNING: Can be negative!)
| uint32_t TileCalibDrawerOfc::getNSamples | ( | ) | const |
Returns the number of sample stored.
|
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.
| float TileCalibDrawerOfc::getOfc | ( | unsigned int | field, |
| unsigned int | channel, | ||
| unsigned int | adc, | ||
| float | phase, | ||
| unsigned int | sample ) const |
Returns OFC data.
| field | The field identifier |
| 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) |
| phase | The phase of interest |
| sample | The sample of interest |
|
private |
|
private |
Returns pointer to first data OFC for a given field, ADC & phase.
| field | The field identifier |
| channel | The channel number |
| adc | The gain index |
| phase | The phase |
|
private |
| float TileCalibDrawerOfc::getPhase | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| unsigned int | phaseIdx ) const |
Returns the stored phase.
| channel | The channel number |
| adc | The gain index |
| phaseIdx | The phase index |
|
private |
Returns the index for a given phase.
| channel | The channel number |
| adc | The gain index |
| phase | The phase of interest |
|
private |
|
private |
Returns pointer to the requested phase value.
| channel | The channel number |
| adc | The gain index |
| phaseIdx | The phase index |
|
private |
|
inherited |
Returns the unix timestamp of the comment (seconds since 1.1.1970)
|
inlinevirtual |
Returns TileCalibType::OFC.
Reimplemented from TileCalibDrawerBase.
Definition at line 51 of file TileCalibDrawerOfc.h.
| void TileCalibDrawerOfc::init | ( | uint16_t | objVersion, |
| uint32_t | nSamples, | ||
| int32_t | nPhases, | ||
| uint16_t | nChans, | ||
| uint16_t | nGains, | ||
| const std::string & | author = "", | ||
| const std::string & | comment = "", | ||
| uint64_t | timeStamp = 0 ) |
Function for initializing a TileCalibDrawerOfc BLOB.
| objVersion | The objects version |
| nSamples | The number of samples to store. |
| nPhases | The number of phases to be stored for each ADC (negative: same phases for all ADCs) |
| nChans | The number of channels |
| nGains | The number of gains |
| author | String containing the author user id |
| comment | String containing the actual comment |
| timeStamp | Unix time stamp (if 0, current time is used) |
A negative nPhases value implies that the same phase table is used for all stored ADCs.
Definition at line 91 of file TileCalibDrawerOfc.cxx.
|
private |
Definition at line 58 of file TileCalibDrawerOfc.cxx.
| void TileCalibDrawerOfc::setOfc | ( | unsigned int | field, |
| unsigned int | channel, | ||
| unsigned int | adc, | ||
| float | phase, | ||
| unsigned int | sample, | ||
| float | value ) |
Sets OFC data.
| field | The field identifier |
| channel | The channel number |
| adc | The gain index |
| phase | The phase |
| sample | The sample number |
| value | The value to set |
| void TileCalibDrawerOfc::setPhases | ( | unsigned int | channel, |
| unsigned int | adc, | ||
| const std::vector< float > & | phases ) |
Sets a phase value.
| channel | The channel number |
| adc | The gain index |
| phases | Vector containing the phases to set |
Definition at line 144 of file TileCalibDrawerOfc.cxx.
|
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.