ATLAS Offline Software
Loading...
Searching...
No Matches
HECHVManager.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_HECHVMANAGER_H
6#define LARHV_HECHVMANAGER_H
7
9#include "LArHV/HECHVModule.h"
11#include <memory>
12#include <functional>
13
14#if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
15class LArHVIdMapping;
16#endif
17
19struct HECHVPayload;
20
34
36{
37 public:
39 {
40 public:
41 static constexpr double INVALID = -99999;
42 class Payload;
44 HECHVData (std::unique_ptr<Payload> payload);
45 HECHVData& operator= (HECHVData&& other) noexcept;
47 bool hvOn (const HECHVSubgap& subgap) const;
48 double voltage (const HECHVSubgap& subgap) const;
49 double current (const HECHVSubgap& subgap) const;
50 int hvLineNo (const HECHVSubgap& subgap) const;
51 private:
52 static int index (const HECHVSubgap& subgap) ;
53 std::unique_ptr<Payload> m_payload;
54 };
55
58
59 const HECHVDescriptor& getDescriptor() const;
60
61 // Begin/End side index (0=negative and 1= positive)
62 static unsigned int beginSideIndex() ;
63 static unsigned int endSideIndex() ;
64
65 static unsigned int beginPhiIndex() ;
66 static unsigned int endPhiIndex() ;
67
68 static unsigned int beginSamplingIndex() ;
69 static unsigned int endSamplingIndex() ;
70
71 const HECHVModule& getHVModule(unsigned int iSide
72 , unsigned int iPhi
73 , unsigned int iSampling) const;
74
75 // Get the database payload --- for use by simulation only
76 // (doesn't account for conditions changes)
77 HECHVData getDataSim() const;
78
79#if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE))
80 HECHVData getData (const LArHVIdMapping& hvIdMapping,
81 const std::vector<const CondAttrListCollection*>& attrLists) const;
82 // Get hvLine for a subgap
83 int hvLineNo(const HECHVSubgap& subgap
84 , const LArHVIdMapping* hvIdMapping
85 , HWIdentifier *hvlId=nullptr) const;
86#endif
87
88 private:
89 using idfunc_t = std::function<std::vector<HWIdentifier>(HWIdentifier)>;
90 HECHVData getData (const idfunc_t& idfunc,
91 const std::vector<const CondAttrListCollection*>& attrLists) const;
92
93 HECHVManager(const HECHVManager& right) = delete;
94 HECHVManager& operator=(const HECHVManager& right) = delete;
95
96 class Clockwork;
97 std::unique_ptr<const Clockwork> m_c;
98};
99
100#endif
This class is a collection of AttributeLists where each one is associated with a channel number.
double current(const HECHVSubgap &subgap) const
bool hvOn(const HECHVSubgap &subgap) const
std::unique_ptr< Payload > m_payload
int hvLineNo(const HECHVSubgap &subgap) const
static constexpr double INVALID
HECHVData & operator=(HECHVData &&other) noexcept
double voltage(const HECHVSubgap &subgap) const
static unsigned int beginPhiIndex()
HECHVManager(const HECHVManager &right)=delete
std::unique_ptr< const Clockwork > m_c
static unsigned int endSamplingIndex()
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
const HECHVDescriptor & getDescriptor() const
static unsigned int endSideIndex()
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
int hvLineNo(const HECHVSubgap &subgap, const LArHVIdMapping *hvIdMapping, HWIdentifier *hvlId=nullptr) const
HECHVData getDataSim() const
HECHVManager & operator=(const HECHVManager &right)=delete
std::function< std::vector< HWIdentifier >(HWIdentifier)> idfunc_t
static unsigned int beginSamplingIndex()
static unsigned int endPhiIndex()
Describes one HV Module within the HEC.
Definition HECHVModule.h:21
Definition index.py:1