ATLAS Offline Software
LArFebConfig.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 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  //Accessor methods from ILArFEBConfigReader
25  short lowerGainThreshold(const HWIdentifier& id) const;
26  short upperGainThreshold(const HWIdentifier& id) const;
27  void thresholds (const HWIdentifier& chid, short& lower, short& upper) const;
28 
29 
30  private:
32 
33  std::unordered_map<HWIdentifier::value_type,const coral::AttributeList*> m_attrPerFeb;
34 
35  const coral::AttributeList* getAttrList (const HWIdentifier& chid,
36  int& channel) const;
37  short
38  getThresholdFromAttrList(const std::string& MedLow,
39  const coral::AttributeList* attrList,
40  const std::string& chanstr) const;
41  short getThreshold(const std::string& MedLow, const HWIdentifier& chid) const;
42 
43  static const std::string s_lower;
44  static const std::string s_upper;
45 
47 
48 };
49 
50 inline short LArFebConfig::lowerGainThreshold(const HWIdentifier& chid) const {
51  return getThreshold(s_lower, chid);
52 }
53 
54 
55 inline short LArFebConfig::upperGainThreshold(const HWIdentifier& chid) const {
56  return getThreshold(s_upper,chid);
57 }
58 
59 
60 #include "AthenaKernel/CLASS_DEF.h"
61 CLASS_DEF( LArFebConfig, 155518838 , 1)
62 #include "AthenaKernel/CondCont.h"
63 CLASS_DEF( CondCont<LArFebConfig>, 148539538 , 1)
64 
65 #endif
LArFebConfig::s_upper
static const std::string s_upper
Definition: LArFebConfig.h:44
LArFebConfig::lowerGainThreshold
short lowerGainThreshold(const HWIdentifier &id) const
Definition: LArFebConfig.h:50
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
LArFebConfig::upperGainThreshold
short upperGainThreshold(const HWIdentifier &id) const
Definition: LArFebConfig.h:55
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
HWIdentifier
Definition: HWIdentifier.h:13
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
LArFebConfig
Definition: LArFebConfig.h:16
LArFebConfig::ERRORCODE
@ ERRORCODE
Definition: LArFebConfig.h:46
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:31
HWIdentifier.h
LArOnlineID
Definition: LArOnlineID.h:20
LArFebConfig::m_attrPerFeb
std::unordered_map< HWIdentifier::value_type, const coral::AttributeList * > m_attrPerFeb
Definition: LArFebConfig.h:33
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:43
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