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

#include <LArAutoCorrBlob.h>

Inheritance diagram for LArAutoCorrBlob:
Collaboration diagram for LArAutoCorrBlob:

Public Types

enum  { ERRORCODE = LArElecCalib::ERRORCODE }
 

Public Member Functions

 LArAutoCorrBlob ()
 
 ~LArAutoCorrBlob ()
 

Protected Member Functions

void readBlob (const CondAttrListCollection *attrList, MsgStream &msg)
 
ILArAutoCorr::AutoCorrRef_t autocorrByHash (const IdentifierHash &hs, int gain) const
 

Protected Attributes

unsigned m_nChannels
 
unsigned m_nPoints
 

Private Attributes

std::vector< const float * > m_pAutoCorr
 

Detailed Description

Definition at line 17 of file LArAutoCorrBlob.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ERRORCODE 

Definition at line 20 of file LArAutoCorrBlob.h.

Constructor & Destructor Documentation

◆ LArAutoCorrBlob()

LArAutoCorrBlob::LArAutoCorrBlob ( )

Definition at line 9 of file LArAutoCorrBlob.cxx.

10  :m_nChannels(0),
11  m_nPoints(0)
12 {}

◆ ~LArAutoCorrBlob()

LArAutoCorrBlob::~LArAutoCorrBlob ( )

Definition at line 14 of file LArAutoCorrBlob.cxx.

15 {}

Member Function Documentation

◆ autocorrByHash()

ILArAutoCorr::AutoCorrRef_t LArAutoCorrBlob::autocorrByHash ( const IdentifierHash hs,
int  gain 
) const
inlineprotected

Definition at line 28 of file LArAutoCorrBlob.h.

28  {
29  const float* start=m_pAutoCorr[gain]+hs*m_nPoints;
30  if (*start==ERRORCODE)
31  return ILArAutoCorr::AutoCorrRef_t(NULL,NULL);
32  else
34  }

◆ readBlob()

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

Definition at line 18 of file LArAutoCorrBlob.cxx.

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

Member Data Documentation

◆ m_nChannels

unsigned LArAutoCorrBlob::m_nChannels
protected

Definition at line 37 of file LArAutoCorrBlob.h.

◆ m_nPoints

unsigned LArAutoCorrBlob::m_nPoints
protected

Definition at line 38 of file LArAutoCorrBlob.h.

◆ m_pAutoCorr

std::vector<const float*> LArAutoCorrBlob::m_pAutoCorr
private

Definition at line 41 of file LArAutoCorrBlob.h.


The documentation for this class was generated from the following files:
LArAutoCorrBlob::m_pAutoCorr
std::vector< const float * > m_pAutoCorr
Definition: LArAutoCorrBlob.h:41
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
LArAutoCorrBlob::m_nChannels
unsigned m_nChannels
Definition: LArAutoCorrBlob.h:37
ILArAutoCorr::AutoCorrRef_t
LArVectorProxy AutoCorrRef_t
Definition: ILArAutoCorr.h:33
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
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
LArAutoCorrBlob::ERRORCODE
@ ERRORCODE
Definition: LArAutoCorrBlob.h:20
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
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
DEBUG
#define DEBUG
Definition: page_access.h:11
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition: LArCalibErrorCode.h:17
LArAutoCorrBlob::m_nPoints
unsigned m_nPoints
Definition: LArAutoCorrBlob.h:38
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
readCCLHist.float
float
Definition: readCCLHist.py:83