ATLAS Offline Software
LArHVScaleCorrFlat.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
9  : LArCondFlatBase("LArHVScaleCorrFlat")
10 {}
11 
13 {}
14 
15 
17  : LArCondFlatBase("LArHVScaleCorrFlat")
18 {
19  if (initializeBase().isFailure()) return;
20 
21  this->readBlob(attrList,"HVScaleCorr",msg());
22 
23  if (m_pValues.size()!=1) {
24  ATH_MSG_ERROR( "Found unexpected number of gains (" << m_pValues.size() <<"). Expected exactly one gain." );
25  }
26 
27  return;
28 }
29 
30 
31 const float& LArHVScaleCorrFlat::HVScaleCorr(const HWIdentifier& chid) const {
32  return getDataByHash(m_onlineHelper->channel_Hash(chid),0);
33 
34 }
35 
LArOnlineID_Base::channel_Hash
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
Definition: LArOnlineID_Base.cxx:1636
LArSingleFloatBlob::readBlob
void readBlob(const CondAttrListCollection *attrList, const char *attrName, MsgStream &msg)
Definition: LArSingleFloatBlob.cxx:15
LArHVScaleCorrFlat.h
LArHVScaleCorrFlat::HVScaleCorr
virtual const float & HVScaleCorr(const HWIdentifier &chid) const
Definition: LArHVScaleCorrFlat.cxx:31
LArCondFlatBase
Definition: LArCondFlatBase.h:20
LArCondFlatBase::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArCondFlatBase.h:29
HWIdentifier
Definition: HWIdentifier.h:13
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArHVScaleCorrFlat::LArHVScaleCorrFlat
LArHVScaleCorrFlat()
Definition: LArHVScaleCorrFlat.cxx:8
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
LArSingleFloatBlob::getDataByHash
const float & getDataByHash(const IdentifierHash &hs, const unsigned gain) const
Definition: LArSingleFloatBlob.h:25
LArSingleFloatBlob::m_pValues
std::vector< const float * > m_pValues
Definition: LArSingleFloatBlob.h:29
LArCondFlatBase::initializeBase
StatusCode initializeBase()
Definition: LArCondFlatBase.cxx:29
LArHVScaleCorrFlat::~LArHVScaleCorrFlat
virtual ~LArHVScaleCorrFlat()
Definition: LArHVScaleCorrFlat.cxx:12