|
ATLAS Offline Software
|
Go to the documentation of this file.
20 ,
const std::string&
author
69 unsigned int thisObjSize = 0;
82 if(blobObjSize != thisObjSize){
96 ,
const std::string&
author
103 uint32_t objCount = extraHeaderSize;
107 unsigned int nPhasesAbs = std::abs(nPhases);
108 int nPhasesSgn = nPhases < 0 ? -1 : 1;
109 unsigned int phasesSize = nPhasesAbs;
110 if(nPhasesSgn > 0){ phasesSize *= nChans*nGains; }
111 objCount += phasesSize;
114 objCount += (
nSamples * nFields * nGains * nPhasesAbs * nChans );
123 int32_t*
pi =
reinterpret_cast<int32_t*
>(++
pu);
126 for(
unsigned int iPhase = 0; iPhase < phasesSize; ++iPhase){
127 *(++
pi) = int32_t(0);
136 for(
unsigned int i = 0;
i < blobLengthUint32 - (
m_hdrSize32 + extraHeaderSize+phasesSize); ++
i){
146 std::set<int32_t> phaseSet;
151 if(
int(phaseSet.size()) != std::abs(
getNPhases())){
156 for (
const int32_t
phase : phaseSet) {
168 for(
int iPhase = 0; iPhase < std::abs(
getNPhases()); ++iPhase){
long getBlobSize() const
Returns the BLOB size in units of bytes.
float getOfc(unsigned int field, unsigned int channel, unsigned int adc, float phase, unsigned int sample) const
Returns OFC data.
Thrown if an index is out of range.
uint16_t getNGains() const
Returns the number of gains stored for each channel.
static const unsigned int m_hdrSize32
The header size in units of uint32_t.
Thrown if coral::Blob does not conform with expected structure.
#define PHASE_PRECISION
Class for storing Optimal Filtering Coefficients (OFCs) in a coral::Blob.
float round(const float toRound, const unsigned int decimals)
int32_t getNPhases() const
Returns the number of phases (WARNING: Can be negative!)
void setPhases(unsigned int channel, unsigned int adc, const std::vector< float > &phases)
Sets a phase value.
void dumpHeader(std::ostream &stm) const
Prints the BLOB header summary information.
Thrown if BLOB size is not correct.
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.
uint16_t getObjVersion() const
Returns the BLOB object version.
uint32_t getObjSizeByte() const
Returns the size of a data object in units of bytes.
virtual uint16_t getType() const
Returns TileCalibType::OFC.
This class provides the core BLOB infrastructure.
virtual void dump() const
Prints out the object content to std::cout.
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.
float getPhase(unsigned int channel, unsigned int adc, unsigned int phaseIdx) const
Returns the stored phase.
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.
uint16_t getObjType() const
Returns the BLOB object type.
TileCalibDrawerOfc(const coral::Blob &blob)
Ctor (const).
uint32_t getNSamples() const
Returns the number of sample stored.
const int32_t * getPhaseStartAddress(unsigned int channel, unsigned int adc, unsigned int phaseIdx) const
Returns pointer to the requested phase value.
uint32_t getNFields(uint16_t objVersion=0) const
Returns the number of fields.
Thrown if object type in BLOB does not agree with class type.
void zero(TH2 *h)
zero the contents of a 2d histogram
const void * getAddress(unsigned int iEle) const
Returns start address of iEle-th basic unit.