ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LArSingleFloatBlob Class Reference

#include <LArSingleFloatBlob.h>

Inherited by LArDAC2uAFlat, LArDAC2uASC, LArfSamplSC, LArHVScaleCorrFlat, LArHVScaleCorrSC, LArMinBiasAverageSC, LArMinBiasSC, LArMphysOverMcalFlat, LArMphysOverMcalSC, LArNoiseSC, LArOFCweightSC, LAruA2MeVFlat, and LAruA2MeVSC.

Collaboration diagram for LArSingleFloatBlob:

Public Member Functions

 LArSingleFloatBlob ()
 
void readBlob (const CondAttrListCollection *attrList, const char *attrName, MsgStream &msg)
 

Protected Member Functions

const float & getDataByHash (const IdentifierHash &hs, const unsigned gain) const
 

Protected Attributes

std::vector< const float * > m_pValues
 
unsigned m_nChannels
 

Detailed Description

Definition at line 15 of file LArSingleFloatBlob.h.

Constructor & Destructor Documentation

◆ LArSingleFloatBlob()

LArSingleFloatBlob::LArSingleFloatBlob ( )

Definition at line 11 of file LArSingleFloatBlob.cxx.

11  :
12  m_nChannels(0)
13  {}

Member Function Documentation

◆ getDataByHash()

const float& LArSingleFloatBlob::getDataByHash ( const IdentifierHash hs,
const unsigned  gain 
) const
inlineprotected

Definition at line 25 of file LArSingleFloatBlob.h.

25  {
26  return m_pValues[gain][hs];
27  }

◆ readBlob()

void LArSingleFloatBlob::readBlob ( const CondAttrListCollection attrList,
const char *  attrName,
MsgStream &  msg 
)

Definition at line 15 of file LArSingleFloatBlob.cxx.

15  {
16  m_nChannels=0;
17 
18  if (!attrList) return;
19 
21  CondAttrListCollection::const_iterator gainIt_e=attrList->end();
22 
23  m_pValues.resize(attrList->size());
24  msg << MSG::DEBUG << "Found data for " << attrList->size() << " gains." << endmsg;
25 
26  int blobSize=0; //FIXME Force size to hash-max??? m_onlineHelper->channelHashMax()
27 
28  for(;gainIt!=gainIt_e;++gainIt) {
29  unsigned gain=gainIt->first;
30  //Special case: Single-gain constant in channel 1
31  if (gain==1 && attrList->size()==1) gain=0;
32 
33  if (gain>=attrList->size() || gain>2) {
34  msg << MSG::ERROR << "Found unexpected COOL-channel (=gain) number:" << gain << endmsg;
35  return; //ERROR
36  }
37 
38  const coral::AttributeList& attr=gainIt->second;
39  const coral::Blob& myBlob = attr[attrName].data<coral::Blob>();
40  m_pValues[gain]=static_cast<const float*>(myBlob.startingAddress());
41  if (blobSize==0) {
42  blobSize=myBlob.size();
43  }
44  else {
45  if (blobSize!=myBlob.size())
46  msg << MSG::ERROR << "Unequal blob size (" << blobSize << "/" << myBlob.size() << ")" << endmsg;
47  }
48  }// end loop over COOL channels
49 
50  m_nChannels=blobSize/sizeof(float);
51  msg << MSG::DEBUG << "Found data for " << m_nChannels << " Channels" << endmsg;
52  return;
53 }

Member Data Documentation

◆ m_nChannels

unsigned LArSingleFloatBlob::m_nChannels
protected

Definition at line 30 of file LArSingleFloatBlob.h.

◆ m_pValues

std::vector<const float*> LArSingleFloatBlob::m_pValues
protected

Definition at line 29 of file LArSingleFloatBlob.h.


The documentation for this class was generated from the following files:
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
LArSingleFloatBlob::m_nChannels
unsigned m_nChannels
Definition: LArSingleFloatBlob.h:30
CreatePhysValWebPage.hs
hs
Definition: CreatePhysValWebPage.py:107
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LArSingleFloatBlob::m_pValues
std::vector< const float * > m_pValues
Definition: LArSingleFloatBlob.h:29
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
python.PoolAttributeHelper.attrName
attrName
Definition: PoolAttributeHelper.py:100
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
DEBUG
#define DEBUG
Definition: page_access.h:11
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
readCCLHist.float
float
Definition: readCCLHist.py:83