Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CaloCondBlobBase Class Reference

This class provides the core BLOB infrastructure. More...

#include <CaloCondBlobBase.h>

Inheritance diagram for CaloCondBlobBase:
Collaboration diagram for CaloCondBlobBase:

Public Member Functions

virtual ~CaloCondBlobBase ()
 Dtor. More...
 
 CaloCondBlobBase (const CaloCondBlobBase &other)
 Copy Ctor. More...
 
CaloCondBlobBaseoperator= (const CaloCondBlobBase &other)
 Assignment operator. More...
 
virtual uint16_t getType () const
 Returns CaloCondDrawer::BASE. More...
 
virtual void dump () const
 Prints the BLOB header summary information to std::cout. More...
 
virtual void dump (std::ostream &stm) const
 Prints the BLOB header summary information. More...
 
long getBlobSize () const
 Returns the BLOB size. More...
 
uint16_t getObjType () const
 Returns the BLOB object type. More...
 
uint16_t getObjVersion () const
 Returns the BLOB object version. More...
 
uint32_t getObjSizeUint32 () const
 Returns the size of a data object in units of uint32_t. More...
 
uint32_t getObjSizeByte () const
 Returns the size of a data object in units of bytes. More...
 
uint32_t getNObjs () const
 Returns the number of data objects stored int the BLOB. More...
 
uint32_t getNChans () const
 Returns the number of channels stored in the BLOB. More...
 
uint32_t getNGains () const
 Returns the number of gains stored for each channel. More...
 
uint32_t getCommentSizeUint32 () const
 Returns the space occupied by the comment fields in units of uint32_t. More...
 
uint32_t getCommentSizeChar () const
 Returns the space occupied by the comment fields in units of chars. More...
 
unsigned int getHdrSize () const
 Returns the size of the header in units of uint32_t. More...
 
std::string getAuthor () const
 Returns the comment author. More...
 
std::string getComment () const
 Returns the actual comment. More...
 
uint64_t getTimeStamp () const
 Returns the unix timestamp of the comment (seconds since 1.1.1970) More...
 
std::string getDate () const
 Returns the date of the comment as string (derived from timestamp) More...
 
std::string getFullComment () const
 Returns a formated string build from all comment fields. More...
 
const void * getAddress (unsigned int iEle) const
 Returns start address of iEle-th basic unit. More...
 
void * getAddress (unsigned int iEle)
 

Protected Member Functions

 CaloCondBlobBase (const coral::Blob &blob)
 Ctor for const blob. More...
 
 CaloCondBlobBase (coral::Blob &blob)
 Ctor for non-const blob. More...
 
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. More...
 
void dumpHeader (std::ostream &stm) const
 Prints the BLOB header summary information. More...
 

Protected Attributes

const void * m_pDataStart
 

Private Member Functions

 CaloCondBlobBase (coral::Blob *blob_nc, const coral::Blob *blob)
 Internal ctor. More...
 
const uint32_t * getBlobStart () const
 Returns the BLOB start address as uint32_t pointer. More...
 
uint32_t * getBlobStart ()
 Returns the BLOB start address as uint32_t pointer. More...
 

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. More...
 
const coral::Blob * m_blob
 Const reference to the BLOB (always there) More...
 
bool m_isBlobOwner
 Do I own the BLOB? More...
 
unsigned m_sizeOfObj
 Chache of some frequently-used numbers. More...
 
unsigned m_nChans
 
unsigned m_nGains
 

Detailed Description

This class provides the core BLOB infrastructure.

Author
Nils Gollub nils..nosp@m.goll.nosp@m.ub@ce.nosp@m.rn.c.nosp@m.h

All data storage classes inherit from this class. It provides the infrastructure to store and retrieve units of conditions data associated with one channel/gain ("data object") by implementing a common BLOB header. This header holds the following information:

A data object contains all conditions data related to one channel/gain (depending on data stored on channel or adc level), for example 5 floats. The conditions data units themselves must be build from objects of 32 bit length, i.e. available types are float, uint32_t and int32_t.

Definition at line 43 of file CaloCondBlobBase.h.

Constructor & Destructor Documentation

◆ ~CaloCondBlobBase()

CaloCondBlobBase::~CaloCondBlobBase ( )
virtual

Dtor.

Definition at line 43 of file CaloCondBlobBase.cxx.

44 {
45  //=== delete the coral::Blob if owner
46  if(m_isBlobOwner) {delete m_blob;}
47 }

◆ CaloCondBlobBase() [1/4]

CaloCondBlobBase::CaloCondBlobBase ( const CaloCondBlobBase other)

Copy Ctor.

Definition at line 51 of file CaloCondBlobBase.cxx.

52  : m_blob_nc(new coral::Blob(*other.m_blob))
53  , m_blob (m_blob_nc)
54  , m_isBlobOwner(true),
55  m_sizeOfObj(other.getObjSizeUint32()),
56  m_nChans(other.getNChans()),
57  m_nGains(other.getNChans()),
58  m_pDataStart(static_cast<const void*>(getBlobStart()+getHdrSize()))
59 {
60 }

◆ CaloCondBlobBase() [2/4]

CaloCondBlobBase::CaloCondBlobBase ( const coral::Blob &  blob)
protected

Ctor for const blob.

Definition at line 31 of file CaloCondBlobBase.cxx.

32  : CaloCondBlobBase (nullptr, &blob)
33 {
34 }

◆ CaloCondBlobBase() [3/4]

CaloCondBlobBase::CaloCondBlobBase ( coral::Blob &  blob)
protected

Ctor for non-const blob.

Definition at line 36 of file CaloCondBlobBase.cxx.

38 {
39 }

◆ CaloCondBlobBase() [4/4]

CaloCondBlobBase::CaloCondBlobBase ( coral::Blob *  blob_nc,
const coral::Blob *  blob 
)
private

Internal ctor.

Definition at line 13 of file CaloCondBlobBase.cxx.

15  : m_blob_nc(blob_nc),
16  m_blob(blob)
17  , m_isBlobOwner(false),m_sizeOfObj(0),m_nChans(0),m_nGains(0), m_pDataStart(nullptr)
18 {
19  if(uint64_t(m_blob->size())>=getHdrSize()*sizeof(uint32_t)) {
20  m_sizeOfObj=static_cast<const uint32_t*>(m_blob->startingAddress())[1];
21  //m_nChans=static_cast<uint16_t*>(m_blob->startingAddress())[6];
22  //m_nGains=static_cast<uint16_t*>(m_blob->startingAddress())[7];
23  const CaloCondBlobBase& this_c = *this;
24  m_nChans=unpacknChans(this_c.getBlobStart()[3]);
25  m_nGains=unpacknGains(this_c.getBlobStart()[3]);
26  m_pDataStart=static_cast<const void*>(this_c.getBlobStart()+getHdrSize());
27  //std::cout << "CaloCondBlobObj: nChans=" << m_nChans << " nGains=" << m_nGains << std::endl;
28  }
29  }

Member Function Documentation

◆ createBlob()

uint32_t CaloCondBlobBase::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 
)
protected

(re-)creation of the referenced BLOB object.

Parameters
objTypeObject type
objVersionObject version
objSizeUint32Size of a data object (in uint32_t)
nObjsTotal number of data objects
nChansnumber of stored channels
nGainsnumber of stored gains
authorcomment author
commentactual comment
timeStampunix time stamp (if 0, current time is used)

Definition at line 84 of file CaloCondBlobBase.cxx.

93 {
94 
95  //=== blob data length including header in bytes
96  const uint32_t dataSizeByte = (getHdrSize()+objSizeUint32*nObjs) * sizeof(uint32_t);
97 
98  //=== calculate comment length, including two ASCII NULLs to end text fields
99  uint32_t commentSizeChar(0);
100  if(!author.empty() || !comment.empty() || timeStamp){
101  commentSizeChar += author.size()+comment.size()+sizeof(uint64_t) + 2;
102  //=== force comment length to end on 4 byte boundary
103  commentSizeChar += (commentSizeChar % sizeof(uint32_t)) ?
104  (sizeof(uint32_t)-(commentSizeChar % sizeof(uint32_t))) : 0;
105  }
106 
107  //=== create blob
108  const uint32_t blobSizeInBytes = dataSizeByte+commentSizeChar;
109  m_blob_nc->resize(blobSizeInBytes);
110 
111  //=== fill header
112  reinterpret_cast<uint16_t*>(getBlobStart())[0] = objType;
113  reinterpret_cast<uint16_t*>(getBlobStart())[1] = objVersion;
114  getBlobStart()[1] = objSizeUint32;
115  m_sizeOfObj=objSizeUint32;
116  getBlobStart()[2] = nObjs;
117  getBlobStart()[3] = packGainAndNchans(nGains,nChans);
118  m_nChans=nChans;
119  m_nGains=nGains;
120  getBlobStart()[4] = commentSizeChar/sizeof(uint32_t);
121 
122  //==== fill comment fields
123  if(commentSizeChar){
124  if(!timeStamp) timeStamp = ::time(nullptr);
125  uint8_t* pChar = reinterpret_cast<uint8_t*> (getBlobStart()+dataSizeByte/sizeof(uint32_t));
127  std::string::const_iterator iStr = author.begin();
128  for(; iStr!=author.end(); ++iStr){ *pChar = *iStr; ++pChar; }
129  *pChar = 0;
130  for(iStr=comment.begin(); iStr!=comment.end(); ++iStr){ *(++pChar) = *iStr; }
131  *(++pChar) = 0;
132  }
133 
134  m_pDataStart=static_cast<const void*>(getBlobStart()+getHdrSize());
135  return (blobSizeInBytes/sizeof(uint32_t));
136 }

◆ dump() [1/2]

virtual void CaloCondBlobBase::dump ( ) const
inlinevirtual

Prints the BLOB header summary information to std::cout.

Reimplemented in CaloCondBlobDat< T >.

Definition at line 56 of file CaloCondBlobBase.h.

56 { dumpHeader(std::cout); }

◆ dump() [2/2]

virtual void CaloCondBlobBase::dump ( std::ostream &  stm) const
inlinevirtual

Prints the BLOB header summary information.

Parameters
stmThe output stream to use

Reimplemented in CaloCondBlobDat< T >, and CaloCondBlobDat< float >.

Definition at line 59 of file CaloCondBlobBase.h.

59 {dumpHeader(stm);}

◆ dumpHeader()

void CaloCondBlobBase::dumpHeader ( std::ostream &  stm) const
protected

Prints the BLOB header summary information.

Parameters
stmoutput stream to use

Definition at line 229 of file CaloCondBlobBase.cxx.

230 {
231  stm << "This is a " << CaloCondType::getClassName(getObjType()) << std::endl;
232  stm << "ObjType : " << getObjType() << std::endl;
233  stm << "ObjVersion : " << getObjVersion() << std::endl;
234  stm << "ObjSize [bytes]: " << getObjSizeByte() << std::endl;
235  stm << "NObjs : " << getNObjs() << std::endl;
236  stm << "NChannels : " << getNChans() << std::endl;
237  stm << "NGains : " << getNGains() << std::endl;
238  if(!getCommentSizeUint32()){
239  stm << "=== No comment available ===" << std::endl;
240  }
241  else{
242  stm << "Author : " << getAuthor() << std::endl;
243  stm << "Date : " << getDate() << " ("<< getTimeStamp() << ")" << std::endl;
244  stm << "Comment: : " << getComment() << std::endl;
245  }
246 }

◆ getAddress() [1/2]

void * CaloCondBlobBase::getAddress ( unsigned int  iEle)
inline

Definition at line 272 of file CaloCondBlobBase.h.

273 {
274  if(iEle>=getNObjs()){
275  throw CaloCond::IndexOutOfRange("CaloCondBlobBase::getAddress", iEle, getNObjs());
276  }
277  return static_cast<void*>
278  ( getBlobStart() + getHdrSize() + getObjSizeUint32()*iEle );
279 }

◆ getAddress() [2/2]

const void * CaloCondBlobBase::getAddress ( unsigned int  iEle) const
inline

Returns start address of iEle-th basic unit.

Parameters
iElesequential basic unit number

Definition at line 260 of file CaloCondBlobBase.h.

261 {
262  if(iEle>=getNObjs()){
263  throw CaloCond::IndexOutOfRange("CaloCondBlobBase::getAddress", iEle, getNObjs());
264  }
265  return static_cast<const void*>
266  ( getBlobStart() + getHdrSize() + getObjSizeUint32()*iEle );
267 }

◆ getAuthor()

std::string CaloCondBlobBase::getAuthor ( ) const

Returns the comment author.

Definition at line 176 of file CaloCondBlobBase.cxx.

177 {
178  if(!getCommentSizeUint32()) return std::string("");
179  const char* iBeg =
180  reinterpret_cast<const char*>(getBlobStart()+getHdrSize() +
182  sizeof(uint64_t)/sizeof(uint32_t));
183  return std::string(iBeg);
184 }

◆ getBlobSize()

long CaloCondBlobBase::getBlobSize ( ) const
inline

Returns the BLOB size.

Definition at line 66 of file CaloCondBlobBase.h.

66 {return m_blob->size(); }

◆ getBlobStart() [1/2]

uint32_t * CaloCondBlobBase::getBlobStart ( )
inlineprivate

Returns the BLOB start address as uint32_t pointer.

Definition at line 186 of file CaloCondBlobBase.h.

187 {
188  return static_cast<uint32_t*>(m_blob_nc->startingAddress());
189 }

◆ getBlobStart() [2/2]

const uint32_t * CaloCondBlobBase::getBlobStart ( ) const
inlineprivate

Returns the BLOB start address as uint32_t pointer.

Definition at line 178 of file CaloCondBlobBase.h.

179 {
180  return static_cast<const uint32_t*>(m_blob->startingAddress());
181 }

◆ getComment()

std::string CaloCondBlobBase::getComment ( ) const

Returns the actual comment.

Definition at line 190 of file CaloCondBlobBase.cxx.

191 {
192  if(!getCommentSizeUint32()) return std::string("");
193  const char* iBeg =
194  reinterpret_cast<const char*>(getBlobStart()+getHdrSize() +
196  sizeof(uint64_t)/sizeof(uint32_t));
197  const char* iEnd = iBeg + getCommentSizeChar();
198  iBeg = std::find(iBeg,iEnd,0);
199  return std::string(++iBeg);
200 }

◆ getCommentSizeChar()

uint32_t CaloCondBlobBase::getCommentSizeChar ( ) const
inline

Returns the space occupied by the comment fields in units of chars.

Definition at line 84 of file CaloCondBlobBase.h.

84 {return getCommentSizeUint32()*sizeof(uint32_t);}

◆ getCommentSizeUint32()

uint32_t CaloCondBlobBase::getCommentSizeUint32 ( ) const
inline

Returns the space occupied by the comment fields in units of uint32_t.

Definition at line 250 of file CaloCondBlobBase.h.

251 {
252  if(uint64_t(m_blob->size())<getHdrSize()*sizeof(uint32_t))
253  throw CaloCond::InvalidBlob("CaloCondBlobBase::getCommentSizeUint32");
254  return static_cast<const uint32_t*>(m_blob->startingAddress())[4];
255 }

◆ getDate()

std::string CaloCondBlobBase::getDate ( ) const

Returns the date of the comment as string (derived from timestamp)

Definition at line 205 of file CaloCondBlobBase.cxx.

206 {
207  if(!getCommentSizeUint32()) return std::string("");
208  ::time_t timeStamp = getTimeStamp();
209  char buf[26];
210  char* iBeg = ::ctime_r(&timeStamp, buf);
211  char* iEnd = iBeg;
212  while(*iEnd!='\n'){++iEnd;}
213  return std::string(iBeg,iEnd-iBeg);
214 }

◆ getFullComment()

std::string CaloCondBlobBase::getFullComment ( ) const

Returns a formated string build from all comment fields.

Definition at line 219 of file CaloCondBlobBase.cxx.

220 {
221  if(!getCommentSizeUint32()) return std::string("");
222  return getAuthor()+" ("+getDate()+"): "+getComment();
223 }

◆ getHdrSize()

unsigned int CaloCondBlobBase::getHdrSize ( ) const
inline

Returns the size of the header in units of uint32_t.

Definition at line 86 of file CaloCondBlobBase.h.

86 {return 5;}

◆ getNChans()

uint32_t CaloCondBlobBase::getNChans ( ) const
inline

Returns the number of channels stored in the BLOB.

Definition at line 232 of file CaloCondBlobBase.h.

233 {
234  return m_nChans;
235 }

◆ getNGains()

uint32_t CaloCondBlobBase::getNGains ( ) const
inline

Returns the number of gains stored for each channel.

Definition at line 240 of file CaloCondBlobBase.h.

241 {
242  return m_nGains;
243 
244 
245 }

◆ getNObjs()

uint32_t CaloCondBlobBase::getNObjs ( ) const
inline

Returns the number of data objects stored int the BLOB.

Definition at line 222 of file CaloCondBlobBase.h.

223 {
224  if(uint64_t(m_blob->size())<getHdrSize()*sizeof(uint32_t))
225  throw CaloCond::InvalidBlob("CaloCondBlobBase::getNObjs");
226  return static_cast<const uint32_t*>(m_blob->startingAddress())[2];
227 }

◆ getObjSizeByte()

uint32_t CaloCondBlobBase::getObjSizeByte ( ) const
inline

Returns the size of a data object in units of bytes.

Definition at line 74 of file CaloCondBlobBase.h.

74 {return getObjSizeUint32()*sizeof(uint32_t);}

◆ getObjSizeUint32()

uint32_t CaloCondBlobBase::getObjSizeUint32 ( ) const
inline

Returns the size of a data object in units of uint32_t.

Definition at line 214 of file CaloCondBlobBase.h.

215 {
216  return m_sizeOfObj;
217 }

◆ getObjType()

uint16_t CaloCondBlobBase::getObjType ( ) const
inline

Returns the BLOB object type.

Definition at line 194 of file CaloCondBlobBase.h.

195 {
196  if(uint64_t(m_blob->size())<getHdrSize()*sizeof(uint32_t))
197  throw CaloCond::InvalidBlob("CaloCondBlobBase::getObjType");
198  return static_cast<const uint16_t*>(m_blob->startingAddress())[0];
199 }

◆ getObjVersion()

uint16_t CaloCondBlobBase::getObjVersion ( ) const
inline

Returns the BLOB object version.

Definition at line 204 of file CaloCondBlobBase.h.

205 {
206  if(uint64_t(m_blob->size())<getHdrSize()*sizeof(uint32_t))
207  throw CaloCond::InvalidBlob("CaloCondBlobBase::getObjVersion");
208  return static_cast<const uint16_t*>(m_blob->startingAddress())[1];
209 }

◆ getTimeStamp()

uint64_t CaloCondBlobBase::getTimeStamp ( ) const
inline

Returns the unix timestamp of the comment (seconds since 1.1.1970)

Definition at line 284 of file CaloCondBlobBase.h.

285 {
286  if(!getCommentSizeUint32()) return 0;
287  auto p = reinterpret_cast<const uint8_t*>(getBlobStart()+getHdrSize() +
289  return CxxUtils::get_unaligned64 (p);
290 }

◆ getType()

virtual uint16_t CaloCondBlobBase::getType ( ) const
inlinevirtual

Returns CaloCondDrawer::BASE.

Reimplemented in CaloCondBlobFlt.

Definition at line 53 of file CaloCondBlobBase.h.

53 {return CaloCondType::BASE;}

◆ operator=()

CaloCondBlobBase & CaloCondBlobBase::operator= ( const CaloCondBlobBase other)

Assignment operator.

Definition at line 65 of file CaloCondBlobBase.cxx.

66 {
67  //=== catch self-assignment
68  if(&other == this) {return *this;}
69  if (m_isBlobOwner) delete m_blob;
70  m_blob = other.m_blob;
71  m_blob_nc = other.m_blob_nc;
72  m_isBlobOwner = false;
73  m_sizeOfObj=static_cast<const uint32_t*>(m_blob->startingAddress())[1];
76  m_pDataStart=static_cast<const void*>(getBlobStart()+getHdrSize());
77  return *this;
78 }

◆ packGainAndNchans()

uint32_t CaloCondBlobBase::packGainAndNchans ( const uint32_t  gain,
const uint32_t  nChans 
)
staticprivate

Definition at line 139 of file CaloCondBlobBase.cxx.

139  {
140 
141  if (gain>0x7F)
142  throw CaloCond::InvalidBlob("CaloCondBlobBase::packGainAndNchans: Gain too large");
143 
144  if (nChans>0xFFFFFF)
145  throw CaloCond::InvalidBlob("CaloCondBlobBase::packGainAndNchans: Number of channels too large");
146 
147  return 0x80000000 | (gain << 24) | nChans;
148 }

◆ unpacknChans()

uint32_t CaloCondBlobBase::unpacknChans ( const uint32_t  gainAndnChans)
staticprivate

Definition at line 160 of file CaloCondBlobBase.cxx.

160  {
161  if (gainAndnChans & 0x80000000) { //new version: 24 bytes for the nChans, 7 for the gain
162  //std::cout << "CaloCondBlobBase: Reading nChans from new version" << std::endl;
163  return gainAndnChans & 0xFFFFFF;
164  }
165  else //Old version: 16 bits for nChans
166  //std::cout << "CaloCondBlobBase: Reading nChangs from old version" << std::endl;
167  return gainAndnChans & 0xFFFF;
168 }

◆ unpacknGains()

uint32_t CaloCondBlobBase::unpacknGains ( const uint32_t  gainAndnChans)
staticprivate

Definition at line 150 of file CaloCondBlobBase.cxx.

150  {
151  if (gainAndnChans & 0x80000000) { //new version: 24 bytes for the nChans, 7 for the gain
152  //std::cout << "CaloCondBlobBase: Reading gain from new version" << std::endl;
153  return (gainAndnChans>>24) & 0x7F;
154  }
155  else //Old version: 16 bigs for gain
156  //std::cout << "CaloCondBlobBase: Reading gain from old version" << std::endl;
157  return (gainAndnChans>>16) & 0xFFFF;
158 }

Member Data Documentation

◆ m_blob

const coral::Blob* CaloCondBlobBase::m_blob
private

Const reference to the BLOB (always there)

Definition at line 161 of file CaloCondBlobBase.h.

◆ m_blob_nc

coral::Blob* CaloCondBlobBase::m_blob_nc
private

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.

◆ m_isBlobOwner

bool CaloCondBlobBase::m_isBlobOwner
private

Do I own the BLOB?

Definition at line 164 of file CaloCondBlobBase.h.

◆ m_nChans

unsigned CaloCondBlobBase::m_nChans
private

Definition at line 168 of file CaloCondBlobBase.h.

◆ m_nGains

unsigned CaloCondBlobBase::m_nGains
private

Definition at line 169 of file CaloCondBlobBase.h.

◆ m_pDataStart

const void* CaloCondBlobBase::m_pDataStart
protected

Definition at line 171 of file CaloCondBlobBase.h.

◆ m_sizeOfObj

unsigned CaloCondBlobBase::m_sizeOfObj
private

Chache of some frequently-used numbers.

Definition at line 167 of file CaloCondBlobBase.h.


The documentation for this class was generated from the following files:
CaloCondBlobBase::getCommentSizeUint32
uint32_t getCommentSizeUint32() const
Returns the space occupied by the comment fields in units of uint32_t.
Definition: CaloCondBlobBase.h:250
CaloCondBlobBase::m_isBlobOwner
bool m_isBlobOwner
Do I own the BLOB?
Definition: CaloCondBlobBase.h:164
CaloCondBlobBase::packGainAndNchans
static uint32_t packGainAndNchans(const uint32_t gain, const uint32_t nChans)
Definition: CaloCondBlobBase.cxx:139
CaloCondBlobBase::getObjSizeUint32
uint32_t getObjSizeUint32() const
Returns the size of a data object in units of uint32_t.
Definition: CaloCondBlobBase.h:214
CaloCondBlobBase::getAuthor
std::string getAuthor() const
Returns the comment author.
Definition: CaloCondBlobBase.cxx:176
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CxxUtils::set_unaligned< uint64_t >
void set_unaligned< uint64_t >(uint8_t *ATH_RESTRICT &p, uint64_t val)
Definition: set_unaligned.h:181
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CaloCondBlobBase::m_nGains
unsigned m_nGains
Definition: CaloCondBlobBase.h:169
CaloCondBlobBase::m_blob_nc
coral::Blob * m_blob_nc
Non-const reference to the BLOB.
Definition: CaloCondBlobBase.h:158
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CxxUtils::get_unaligned64
uint64_t get_unaligned64(const uint8_t *ATH_RESTRICT &p)
Read an 8-byte little-endian value from a possibly unaligned pointer.
Definition: get_unaligned.h:103
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
CaloCondBlobBase::m_pDataStart
const void * m_pDataStart
Definition: CaloCondBlobBase.h:171
CaloCondBlobBase::getObjType
uint16_t getObjType() const
Returns the BLOB object type.
Definition: CaloCondBlobBase.h:194
CaloCondBlobBase::getDate
std::string getDate() const
Returns the date of the comment as string (derived from timestamp)
Definition: CaloCondBlobBase.cxx:205
TileCalibBlobPython_writeOfc.objVersion
objVersion
Definition: TileCalibBlobPython_writeOfc.py:71
CaloCondBlobBase::CaloCondBlobBase
CaloCondBlobBase(const CaloCondBlobBase &other)
Copy Ctor.
Definition: CaloCondBlobBase.cxx:51
CaloCondBlobBase::getHdrSize
unsigned int getHdrSize() const
Returns the size of the header in units of uint32_t.
Definition: CaloCondBlobBase.h:86
CaloCondBlobBase::getCommentSizeChar
uint32_t getCommentSizeChar() const
Returns the space occupied by the comment fields in units of chars.
Definition: CaloCondBlobBase.h:84
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloCondBlobBase::getBlobStart
const uint32_t * getBlobStart() const
Returns the BLOB start address as uint32_t pointer.
Definition: CaloCondBlobBase.h:178
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
CaloCondBlobBase::getObjVersion
uint16_t getObjVersion() const
Returns the BLOB object version.
Definition: CaloCondBlobBase.h:204
CaloCondType::BASE
@ BASE
Enum for CaloCondBlobBase class.
Definition: CaloCondType.h:28
CaloCondBlobBase::getComment
std::string getComment() const
Returns the actual comment.
Definition: CaloCondBlobBase.cxx:190
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CaloCondBlobBase::m_nChans
unsigned m_nChans
Definition: CaloCondBlobBase.h:168
CaloCondBlobBase::dumpHeader
void dumpHeader(std::ostream &stm) const
Prints the BLOB header summary information.
Definition: CaloCondBlobBase.cxx:229
CaloCondBlobBase::unpacknChans
static uint32_t unpacknChans(const uint32_t gainAndnChans)
Definition: CaloCondBlobBase.cxx:160
CaloCond::InvalidBlob
Thrown if coral::Blob does not conform with expected structure.
Definition: Calorimeter/CaloCondBlobObjs/CaloCondBlobObjs/Exception.h:50
CaloCondBlobAlgs_fillNoiseFromASCII.comment
string comment
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:27
CaloCond::IndexOutOfRange
Thrown if an index is out of range.
Definition: Calorimeter/CaloCondBlobObjs/CaloCondBlobObjs/Exception.h:124
CaloCondType::getClassName
static std::string getClassName(CaloCondType::TYPE type)
Returns the class name.
Definition: CaloCondType.cxx:10
CaloCondBlobBase::getNObjs
uint32_t getNObjs() const
Returns the number of data objects stored int the BLOB.
Definition: CaloCondBlobBase.h:222
CaloCondBlobBase::getNGains
uint32_t getNGains() const
Returns the number of gains stored for each channel.
Definition: CaloCondBlobBase.h:240
xAOD::timeStamp
setEventNumber timeStamp
Definition: EventInfo_v1.cxx:128
CaloCondBlobBase::m_blob
const coral::Blob * m_blob
Const reference to the BLOB (always there)
Definition: CaloCondBlobBase.h:161
CaloCondBlobBase::getObjSizeByte
uint32_t getObjSizeByte() const
Returns the size of a data object in units of bytes.
Definition: CaloCondBlobBase.h:74
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CaloCondBlobBase
This class provides the core BLOB infrastructure.
Definition: CaloCondBlobBase.h:43
CaloCondBlobBase::m_sizeOfObj
unsigned m_sizeOfObj
Chache of some frequently-used numbers.
Definition: CaloCondBlobBase.h:167
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
CaloCondBlobBase::getTimeStamp
uint64_t getTimeStamp() const
Returns the unix timestamp of the comment (seconds since 1.1.1970)
Definition: CaloCondBlobBase.h:284
CaloCondBlobBase::unpacknGains
static uint32_t unpacknGains(const uint32_t gainAndnChans)
Definition: CaloCondBlobBase.cxx:150
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
CaloCondBlobBase::getNChans
uint32_t getNChans() const
Returns the number of channels stored in the BLOB.
Definition: CaloCondBlobBase.h:232