ATLAS Offline Software
LArRawChannelBuilderPedestalDataBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
8 
10  const std::string& name,
11  const IInterface* parent):
13 {
14  m_helper = new LArRawChannelBuilderStatistics( 2, // number of possible errors
15  0x80); // bit pattern special for this tool,
16  // to be stored in "uint16_t provenance"
17  m_helper->setErrorString(0, "no errors");
18  m_helper->setErrorString(1, "no DataBase");
19  m_helper->setErrorString(2, "no DataBase entry");
20 }
21 
23 {
25  return StatusCode::SUCCESS;
26 }
27 
28 bool LArRawChannelBuilderPedestalDataBase::pedestal(float& pedestal, MsgStream* /*pLog*/)
29 {
30  pedestal = 0;
31  const EventContext& ctx = Gaudi::Hive::currentContext();
32 
34  float DBpedestal
35  =larPedestal->pedestal(m_parent->curr_chid,m_parent->curr_gain);
36  if (DBpedestal <= (1.0+LArElecCalib::ERRORCODE))
37  {
39  return false;
40  }
41  pedestal=DBpedestal;
44 
45  return true;
46 }
ILArPedestal::pedestal
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArRawChannelBuilderParams::curr_gain
CaloGain::CaloGain curr_gain
Definition: LArRawChannelBuilderParams.h:25
LArRawChannelBuilderPedestalDataBase::pedestal
bool pedestal(float &pedestal, MsgStream *pLog)
Definition: LArRawChannelBuilderPedestalDataBase.cxx:28
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArRawChannelBuilderPedestalToolBase
extention of Interface definition for Tools for Pedestal Obtention
Definition: LArRawChannelBuilderPedestalToolBase.h:23
LArRawChannelBuilderStatistics::setErrorString
void setErrorString(unsigned int nerr, const std::string &s)
Definition: LArRawChannelBuilderStatistics.cxx:69
LArRawChannelBuilderStatistics
Returns various counters from the LArRawChannel building.
Definition: LArRawChannelBuilderStatistics.h:21
LArRawChannelBuilderPedestalDataBase::m_larPedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_larPedestalKey
Definition: LArRawChannelBuilderPedestalDataBase.h:35
LArRawChannelBuilderStatistics::incrementErrorCount
void incrementErrorCount(unsigned int nerr)
Definition: LArRawChannelBuilderStatistics.cxx:34
ReadCondHandle.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArRawChannelBuilderToolBaseClass::m_helper
LArRawChannelBuilderStatistics * m_helper
Definition: LArRawChannelBuilderToolBaseClass.h:82
LArRawChannelBuilderPedestalDataBase.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArRawChannelBuilderPedestalDataBase::initTool
StatusCode initTool()
Definition: LArRawChannelBuilderPedestalDataBase.cxx:22
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArRawChannelBuilderPedestalDataBase::LArRawChannelBuilderPedestalDataBase
LArRawChannelBuilderPedestalDataBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArRawChannelBuilderPedestalDataBase.cxx:9
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition: LArCalibErrorCode.h:17
LArRawChannelBuilderStatistics::returnBitPattern
unsigned int returnBitPattern() const
Definition: LArRawChannelBuilderStatistics.cxx:85
LArRawChannelBuilderParams::curr_chid
HWIdentifier curr_chid
Definition: LArRawChannelBuilderParams.h:24
LArRawChannelBuilderParams::qualityBitPattern
unsigned int qualityBitPattern
Definition: LArRawChannelBuilderParams.h:34
LArRawChannelBuilderToolBaseClass::m_parent
LArRawChannelBuilderParams * m_parent
Definition: LArRawChannelBuilderToolBaseClass.h:80