ATLAS Offline Software
Loading...
Searching...
No Matches
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))
14class LArHVIdMapping;
15#endif
16
21
35
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
81 int hvLineNo(const EMBPresamplerHVModule& module
82 , int gap
83 , const LArHVIdMapping* hvIdMapping
84 , HWIdentifier *hvlId = nullptr) const;
85#endif
86
87 private:
88 using idfunc_t = std::function<std::vector<HWIdentifier>(HWIdentifier)>;
90 const std::vector<const CondAttrListCollection*>& attrLists) const;
91
92 // Illegal operations
95
96 friend class ImaginaryFriend;
97 class Clockwork;
98 std::unique_ptr<const Clockwork> m_c;
99};
100
101#endif
This class is a collection of AttributeLists where each one is associated with a channel number.
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
bool hvOn(const EMBPresamplerHVModule &module, const int &iGap) const
double current(const EMBPresamplerHVModule &module, const int &iGap) const
EMBPresamplerHVData & operator=(EMBPresamplerHVData &&other) noexcept
int hvLineNo(const EMBPresamplerHVModule &module, const int &iGap) const
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
EMBPresamplerHVManager & operator=(const EMBPresamplerHVManager &right)=delete
std::unique_ptr< const Clockwork > m_c
const EMBPresamplerHVDescriptor * getDescriptor() const
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
EMBPresamplerHVManager(const EMBPresamplerHVManager &right)=delete
unsigned int beginPhiIndex() const
static unsigned int endSideIndex()
std::function< std::vector< HWIdentifier >(HWIdentifier)> idfunc_t
unsigned int beginEtaIndex() const
int hvLineNo(const EMBPresamplerHVModule &module, int gap, const LArHVIdMapping *hvIdMapping, HWIdentifier *hvlId=nullptr) const
Describes one HV Module within the EMB Presampler.
Definition index.py:1