ATLAS Offline Software
LArFebConfig.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARRECCONDITIONS_LARFEBCONFIG_H
6 #define LARRECCONDITIONS_LARFEBCONFIG_H
7 
10 #include "CoralBase/AttributeList.h"
12 #include <unordered_map>
13 
14 class LArOnlineID;
15 
16 class LArFebConfig: public AthMessaging {
17  public:
18  LArFebConfig()=delete;
19  LArFebConfig(const LArOnlineID* onlineId); // we do not own this pointer
20 
21  void add (HWIdentifier febid,
22  const coral::AttributeList* attrList);
23 
24  short lowerGainThreshold(const HWIdentifier& id) const;
25  short upperGainThreshold(const HWIdentifier& id) const;
26  void thresholds (const HWIdentifier& chid, short& lower, short& upper) const;
27 
28 
29  private:
31 
32  std::unordered_map<HWIdentifier::value_type,const coral::AttributeList*> m_attrPerFeb;
33 
34  const coral::AttributeList* getAttrList (const HWIdentifier& chid,
35  int& channel) const;
36  short
37  getThresholdFromAttrList(const std::string& MedLow,
38  const coral::AttributeList* attrList,
39  const std::string& chanstr) const;
40  short getThreshold(const std::string& MedLow, const HWIdentifier& chid) const;
41 
42  static const std::string s_lower;
43  static const std::string s_upper;
44 
46 
47 };
48 
49 inline short LArFebConfig::lowerGainThreshold(const HWIdentifier& chid) const {
50  return getThreshold(s_lower, chid);
51 }
52 
53 
54 inline short LArFebConfig::upperGainThreshold(const HWIdentifier& chid) const {
55  return getThreshold(s_upper,chid);
56 }
57 
58 
59 #include "AthenaKernel/CLASS_DEF.h"
60 CLASS_DEF( LArFebConfig, 155518838 , 1)
61 #include "AthenaKernel/CondCont.h"
62 CLASS_DEF( CondCont<LArFebConfig>, 148539538 , 1)
63 
64 #endif
LArFebConfig::s_upper
static const std::string s_upper
Definition: LArFebConfig.h:43
LArFebConfig::lowerGainThreshold
short lowerGainThreshold(const HWIdentifier &id) const
Definition: LArFebConfig.h:49
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
LArFebConfig::upperGainThreshold
short upperGainThreshold(const HWIdentifier &id) const
Definition: LArFebConfig.h:54
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
LArFebConfig::ERRORCODE
@ ERRORCODE
Definition: LArFebConfig.h:45
HWIdentifier
Definition: HWIdentifier.h:13
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
LArFebConfig
Definition: LArFebConfig.h:16
LArFebConfig::add
void add(HWIdentifier febid, const coral::AttributeList *attrList)
Definition: LArFebConfig.cxx:21
LArFebConfig::getThreshold
short getThreshold(const std::string &MedLow, const HWIdentifier &chid) const
Definition: LArFebConfig.cxx:75
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
LArFebConfig::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArFebConfig.h:30
HWIdentifier.h
LArOnlineID
Definition: LArOnlineID.h:20
LArFebConfig::m_attrPerFeb
std::unordered_map< HWIdentifier::value_type, const coral::AttributeList * > m_attrPerFeb
Definition: LArFebConfig.h:32
CondCont< LArFebConfig >
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
AthMessaging.h
LArFebConfig::getAttrList
const coral::AttributeList * getAttrList(const HWIdentifier &chid, int &channel) const
Definition: LArFebConfig.cxx:46
LArFebConfig::LArFebConfig
LArFebConfig()=delete
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition: LArCalibErrorCode.h:17
LArFebConfig::thresholds
void thresholds(const HWIdentifier &chid, short &lower, short &upper) const
Definition: LArFebConfig.cxx:28
LArFebConfig::s_lower
static const std::string s_lower
Definition: LArFebConfig.h:42
CLASS_DEF.h
macros to associate a CLID to a type
LArFebConfig::getThresholdFromAttrList
short getThresholdFromAttrList(const std::string &MedLow, const coral::AttributeList *attrList, const std::string &chanstr) const
Definition: LArFebConfig.cxx:66