ATLAS Offline Software
EMBPresamplerHVManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARHV_EMBPRESAMPLERHVMANAGER_H
6 #define LARHV_EMBPRESAMPLERHVMANAGER_H
7 
10 #include <memory>
11 #include <functional>
12 
13 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
14 class LArHVIdMapping;
15 #endif
16 
21 
37 {
38  public:
40  {
41  public:
42  static constexpr double INVALID = -99999;
43  class Payload;
45  EMBPresamplerHVData (std::unique_ptr<Payload> payload);
48  bool hvOn (const EMBPresamplerHVModule& module, const int& iGap) const;
49  double voltage (const EMBPresamplerHVModule& module, const int& iGap) const;
50  double current (const EMBPresamplerHVModule& module, const int& iGap) const;
51  int hvLineNo (const EMBPresamplerHVModule& module, const int& iGap) const;
52  private:
53  static int index (const EMBPresamplerHVModule& module) ;
54  std::unique_ptr<Payload> m_payload;
55  };
56 
59 
61 
62  unsigned int beginPhiIndex() const;
63  unsigned int endPhiIndex() const;
64 
65  unsigned int beginEtaIndex() const;
66  unsigned int endEtaIndex() const;
67 
68  // Returns a high voltage module
69  const EMBPresamplerHVModule& getHVModule(unsigned int iSide
70  , unsigned int iEta
71  , unsigned int iPhi) const;
72 
73  // Begin/end side index (0=negative and 1= positive)
74  static unsigned int beginSideIndex() ;
75  static unsigned int endSideIndex() ;
76 
77 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
78  EMBPresamplerHVData getData (const LArHVIdMapping& hvIdMapping,
79  const std::vector<const CondAttrListCollection*>& attrLists) const;
80  // Get hvLine for a module
82  , int gap
83  , const LArHVIdMapping* hvIdMapping) const;
84 #endif
85 
86  private:
87  using idfunc_t = std::function<std::vector<HWIdentifier>(HWIdentifier)>;
88  EMBPresamplerHVData getData (const idfunc_t& idfunc,
89  const std::vector<const CondAttrListCollection*>& attrLists) const;
90 
91  // Illegal operations
94 
95  friend class ImaginaryFriend;
96  class Clockwork;
97  std::unique_ptr<const Clockwork> m_c;
98 };
99 
100 #endif
EMBPresamplerHVManager::EMBPresamplerHVManager
EMBPresamplerHVManager()
Definition: EMBPresamplerHVManager.cxx:139
EMBPresamplerHVManager::endSideIndex
static unsigned int endSideIndex()
Definition: EMBPresamplerHVManager.cxx:182
EMBPresamplerHVManager::ImaginaryFriend
friend class ImaginaryFriend
Definition: EMBPresamplerHVManager.h:95
EMBPresamplerHVManager::Clockwork
Definition: EMBPresamplerHVManager.cxx:37
EMBPresamplerHVManager::EMBPresamplerHVData::operator=
EMBPresamplerHVData & operator=(EMBPresamplerHVData &&other) noexcept
Definition: EMBPresamplerHVManager.cxx:88
EMBPresamplerHVManager::m_c
std::unique_ptr< const Clockwork > m_c
Definition: EMBPresamplerHVManager.h:96
EMBPresamplerHVDescriptor
Definition: EMBPresamplerHVDescriptor.h:12
EMBPresamplerHVManager::endPhiIndex
unsigned int endPhiIndex() const
Definition: EMBPresamplerHVManager.cxx:157
EMBPresamplerHVManager::idfunc_t
std::function< std::vector< HWIdentifier >(HWIdentifier)> idfunc_t
Definition: EMBPresamplerHVManager.h:87
EMBPresamplerHVManager::EMBPresamplerHVData::Payload
Definition: EMBPresamplerHVManager.cxx:71
EMBPresamplerHVManager::operator=
EMBPresamplerHVManager & operator=(const EMBPresamplerHVManager &right)=delete
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
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
EMBPresamplerHVManager::hvLineNo
int hvLineNo(const EMBPresamplerHVModule &module, int gap, const LArHVIdMapping *hvIdMapping) const
Definition: EMBPresamplerHVManager.cxx:284
EMBPresamplerHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: EMBPresamplerHVManager.h:37
EMBPresamplerHVManager::beginPhiIndex
unsigned int beginPhiIndex() const
Definition: EMBPresamplerHVManager.cxx:152
python.PyAthena.module
module
Definition: PyAthena.py:134
EMBPresamplerHVManager::EMBPresamplerHVData::EMBPresamplerHVData
EMBPresamplerHVData()
EMBPresamplerHVManager::EMBPresamplerHVManager
EMBPresamplerHVManager(const EMBPresamplerHVManager &right)=delete
EMBPresamplerHVManager::EMBPresamplerHVData
Definition: EMBPresamplerHVManager.h:40
EMBPresamplerHVManager::EMBPresamplerHVData::current
double current(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:115
EMBPresamplerHVManager::EMBPresamplerHVData::hvOn
bool hvOn(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:101
EMBPresamplerHVManager::endEtaIndex
unsigned int endEtaIndex() const
Definition: EMBPresamplerHVManager.cxx:167
EMBPresamplerHVManager::getData
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Definition: EMBPresamplerHVManager.cxx:276
EMBPresamplerHVManager::getDescriptor
const EMBPresamplerHVDescriptor * getDescriptor() const
Definition: EMBPresamplerHVManager.cxx:147
EMBPresamplerHVModule.h
HWIdentifier.h
EMBPresamplerHVManager::EMBPresamplerHVData::voltage
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:108
EMBPresamplerHVManager::EMBPresamplerHVData::hvLineNo
int hvLineNo(const EMBPresamplerHVModule &module, const int &iGap) const
Definition: EMBPresamplerHVManager.cxx:122
EMBPresamplerHVManager::beginEtaIndex
unsigned int beginEtaIndex() const
Definition: EMBPresamplerHVManager.cxx:162
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
EMBPresamplerHVManager::beginSideIndex
static unsigned int beginSideIndex()
Definition: EMBPresamplerHVManager.cxx:177
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArHVIdMapping
Definition: LArHVIdMapping.h:21
EMBPresamplerHVManager::EMBPresamplerHVData::INVALID
static constexpr double INVALID
Definition: EMBPresamplerHVManager.h:42
EMBPresamplerHVManager::EMBPresamplerHVData::index
static int index(const EMBPresamplerHVModule &module)
Definition: EMBPresamplerHVManager.cxx:129
EMBPresamplerHVPayload
Definition: EMBPresamplerHVPayload.h:8
EMBPresamplerHVManager::EMBPresamplerHVData::m_payload
std::unique_ptr< Payload > m_payload
Definition: EMBPresamplerHVManager.h:54
EMBPresamplerHVManager::~EMBPresamplerHVManager
~EMBPresamplerHVManager()
EMBPresamplerHVManager::EMBPresamplerHVData::~EMBPresamplerHVData
~EMBPresamplerHVData()
EMBPresamplerHVManager::getHVModule
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
Definition: EMBPresamplerHVManager.cxx:172
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
EMBPresamplerHVModule
Describes one HV Module within the EMB Presampler.
Definition: EMBPresamplerHVModule.h:22