ATLAS Offline Software
Loading...
Searching...
No Matches
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 :
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 }
std::vector< const float * > m_pPedestal

◆ 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 }
std::vector< const float * > m_pPedestalRMS

◆ readBlob()

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

Definition at line 18 of file LArPedestalBlob.cxx.

18 {
20 m_pPedestal.clear();
21 m_pPedestalRMS.clear();
22
23 if (!attrList) return;
24
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}
#define endmsg
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
size_type size() const
number of Chan/AttributeList pairs
ChanAttrListMap::const_iterator const_iterator
MsgStream & msg
Definition testRead.cxx:32

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: