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

#include <LArPedestalBlob.h>

Inheritance diagram for LArPedestalBlob:
Collaboration diagram for LArPedestalBlob:

Public Member Functions

 LArPedestalBlob ()
 
 ~LArPedestalBlob ()
 

Protected Member Functions

void readBlob (const CondAttrListCollection *attrList, MsgStream &msg)
 
float pedestalByHash (const IdentifierHash &hs, const unsigned gain) const
 
float pedestalRMSByHash (const IdentifierHash &hs, const unsigned gain) const
 

Protected Attributes

unsigned m_nChannels
 

Private Attributes

std::vector< const float * > m_pPedestal
 
std::vector< const float * > m_pPedestalRMS
 

Detailed Description

Definition at line 16 of file LArPedestalBlob.h.

Constructor & Destructor Documentation

◆ LArPedestalBlob()

LArPedestalBlob::LArPedestalBlob ( )

Definition at line 12 of file LArPedestalBlob.cxx.

12  :
13  m_nChannels(0)
14  {}

◆ ~LArPedestalBlob()

LArPedestalBlob::~LArPedestalBlob ( )

Definition at line 16 of file LArPedestalBlob.cxx.

16 {}

Member Function Documentation

◆ pedestalByHash()

float LArPedestalBlob::pedestalByHash ( const IdentifierHash hs,
const unsigned  gain 
) const
inlineprotected

Definition at line 26 of file LArPedestalBlob.h.

26  {
27  // check ranges ???
28  return m_pPedestal[gain][hs];
29  }

◆ pedestalRMSByHash()

float LArPedestalBlob::pedestalRMSByHash ( const IdentifierHash hs,
const unsigned  gain 
) const
inlineprotected

Definition at line 31 of file LArPedestalBlob.h.

31  {
32  // check ranges ???
33  return m_pPedestalRMS[gain][hs];
34  }

◆ readBlob()

void LArPedestalBlob::readBlob ( const CondAttrListCollection attrList,
MsgStream &  msg 
)
protected

Definition at line 18 of file LArPedestalBlob.cxx.

18  {
19  m_nChannels=0;
20  m_pPedestal.clear();
21  m_pPedestalRMS.clear();
22 
23  if (!attrList) return;
24 
26  CondAttrListCollection::const_iterator gainIt_e=attrList->end();
27 
28  m_pPedestal.resize(attrList->size());
29  m_pPedestalRMS.resize(attrList->size());
30  msg << MSG::DEBUG << "Found data for " << attrList->size() << " gains." << endmsg;
31 
32  int blobSize=0;
33 
34  for(;gainIt!=gainIt_e;++gainIt) {
35  const unsigned gain=gainIt->first;
36  if (gain>=attrList->size()) {
37  msg << MSG::ERROR << "Found unexpected COOL-channel (=gain) number:" << gain << endmsg;
38  return; //ERROR
39  }
40  const coral::AttributeList& attr=gainIt->second;
41  const coral::Blob& pedBlob = attr["Pedestal"].data<coral::Blob>();
42  const coral::Blob& rmsBlob = attr["PedestalRMS"].data<coral::Blob>();
43  if (blobSize==0) blobSize=pedBlob.size();
44 
45  //Sanity checks:
46  if (blobSize!=pedBlob.size() || blobSize!=rmsBlob.size()) {
47  msg << MSG::ERROR << "Unequal blob size (" << blobSize << "/"
48  << pedBlob.size() << "/" << rmsBlob.size() << ")" <<endmsg;
49  return;
50  }
51  m_pPedestal[gain]=static_cast<const float*>(pedBlob.startingAddress());
52  m_pPedestalRMS[gain]=static_cast<const float*>(rmsBlob.startingAddress());
53  }// end loop over COOL channels
54 
55 
56  m_nChannels=blobSize/sizeof(float);
57  msg << MSG::DEBUG << "Found data for " << m_nChannels << endmsg;
58  return;
59 }

Member Data Documentation

◆ m_nChannels

unsigned LArPedestalBlob::m_nChannels
protected

Definition at line 40 of file LArPedestalBlob.h.

◆ m_pPedestal

std::vector<const float*> LArPedestalBlob::m_pPedestal
private

Definition at line 37 of file LArPedestalBlob.h.

◆ m_pPedestalRMS

std::vector<const float*> LArPedestalBlob::m_pPedestalRMS
private

Definition at line 38 of file LArPedestalBlob.h.


The documentation for this class was generated from the following files:
LArPedestalBlob::m_pPedestalRMS
std::vector< const float * > m_pPedestalRMS
Definition: LArPedestalBlob.h:38
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
CreatePhysValWebPage.hs
hs
Definition: CreatePhysValWebPage.py:107
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
LArPedestalBlob::m_pPedestal
std::vector< const float * > m_pPedestal
Definition: LArPedestalBlob.h:37
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
DEBUG
#define DEBUG
Definition: page_access.h:11
LArPedestalBlob::m_nChannels
unsigned m_nChannels
Definition: LArPedestalBlob.h:40
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
readCCLHist.float
float
Definition: readCCLHist.py:83