ATLAS Offline Software
Loading...
Searching...
No Matches
EMECHVManager.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_EMECHVMANAGER_H
6#define LARHV_EMECHVMANAGER_H
7
11#include <memory>
12#include <functional>
13
14#if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
15class LArHVIdMapping;
16#endif
17
18struct EMECHVPayload;
20
34
36{
37 public:
39
41 {
42 public:
43 static constexpr double INVALID = -99999;
44 class Payload;
46 EMECHVData (std::unique_ptr<Payload> payload);
47 EMECHVData& operator= (EMECHVData&& other) noexcept;
49 bool hvOn (const EMECHVElectrode& electrode, const int& iGap) const;
50 double voltage (const EMECHVElectrode& electrode, const int& iGap) const;
51 double current (const EMECHVElectrode& electrode, const int& iGap) const;
52 int hvLineNo (const EMECHVElectrode& electrode, const int& iGap) const;
53 private:
54 static int index (const EMECHVElectrode& electrode) ;
55 std::unique_ptr<Payload> m_payload;
56 };
57
58 EMECHVManager(IOType wheel);
60
61 const EMECHVDescriptor& getDescriptor() const;
62
63 unsigned int beginPhiIndex() const;
64 unsigned int endPhiIndex() const;
65
66 unsigned int beginEtaIndex() const;
67 unsigned int endEtaIndex() const;
68
69 const EMECHVModule& getHVModule(unsigned int iSide
70 , unsigned int iEta
71 , unsigned int iPhi
72 , unsigned int iSector) const;
73
74 // Begin/End side index (0=negative and 1= positive)
75 static unsigned int beginSideIndex() ;
76 static unsigned int endSideIndex() ;
77
78 unsigned int beginSectorIndex() const;
79 unsigned int endSectorIndex() const;
80
81 // Gets the Wheel, 0 for the Outer Wheel HV Manager and 1 for the inner Wheel HV Manager
83
84 // Get the database payload --- for use by simulation only
85 // (doesn't account for conditions changes)
86 EMECHVData getDataSim() const;
87
88#if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
89 EMECHVData getData (const LArHVIdMapping& hvIdMapping,
90 const std::vector<const CondAttrListCollection*>& attrLists) const;
91 // Get hvLine for an electrode
92 int hvLineNo(const EMECHVElectrode& electrode
93 , int gap
94 , const LArHVIdMapping* hvIdMapping
95 , HWIdentifier *hvlId=nullptr) const;
96#endif
97
98 private:
99 using idfunc_t = std::function<std::vector<HWIdentifier>(HWIdentifier)>;
100 EMECHVData getData (const idfunc_t& idfunc,
101 const std::vector<const CondAttrListCollection*>& attrLists) const;
102
103 EMECHVManager& operator=(const EMECHVManager& right) = delete;
104 EMECHVManager(const EMECHVManager& right) = delete;
105
106 class Clockwork;
107 std::unique_ptr<const Clockwork> m_c;
108};
109
110#endif
This class is a collection of AttributeLists where each one is associated with a channel number.
std::unique_ptr< Payload > m_payload
static constexpr double INVALID
EMECHVData & operator=(EMECHVData &&other) noexcept
double current(const EMECHVElectrode &electrode, const int &iGap) const
bool hvOn(const EMECHVElectrode &electrode, const int &iGap) const
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
int hvLineNo(const EMECHVElectrode &electrode, const int &iGap) const
unsigned int beginEtaIndex() const
const EMECHVDescriptor & getDescriptor() const
int hvLineNo(const EMECHVElectrode &electrode, int gap, const LArHVIdMapping *hvIdMapping, HWIdentifier *hvlId=nullptr) const
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
unsigned int beginSectorIndex() const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
std::function< std::vector< HWIdentifier >(HWIdentifier)> idfunc_t
EMECHVManager & operator=(const EMECHVManager &right)=delete
std::unique_ptr< const Clockwork > m_c
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
EMECHVManager::IOType getWheelIndex() const
EMECHVModule::IOType IOType
unsigned int endSectorIndex() const
unsigned int beginPhiIndex() const
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
EMECHVManager(const EMECHVManager &right)=delete
EMECHVData getDataSim() const
EMECHVManager(IOType wheel)
Definition index.py:1