ATLAS Offline Software
LArHVData.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 
6 #ifndef LARHVDATA_H
7 #define LARHVDATA_H
8 
9 // Includes for Gaudi
10 #include <vector>
11 #include <map>
12 #include <set>
13 
14 class Identifier;
15 class StatusCode;
16 
17 class LArHVData {
18 
19  friend class LArHVCondAlg; //The conditions alg filling this object
20 
21  public:
22  LArHVData() = default;
23  ~LArHVData () = default;
24 
27  struct HV_t {
28  HV_t(float ihv, float icurr, float iweight) :
29  hv(ihv),current(icurr),weight(iweight) {};
30  float hv;
31  float current;
32  float weight;
33  };
34 
35  const std::set<Identifier>& getUpdatedCells() const;
36 
39  const std::vector<LArHVData::HV_t> & getHV(const Identifier& id) const;
40 
41  typedef std::map<Identifier, std::vector<HV_t> > hvMap;
42 
43  private:
45  std::set<Identifier> m_updatedCells;
46 
47  const std::vector<LArHVData::HV_t> m_empty {};
48 
49 };
50 
51 inline
52 const std::set<Identifier>& LArHVData::getUpdatedCells() const {
53  return m_updatedCells;
54 }
55 
56 #include "AthenaKernel/CLASS_DEF.h"
57 CLASS_DEF( LArHVData, 94850034, 1)
58 #include "AthenaKernel/CondCont.h"
59 CLASS_DEF( CondCont<LArHVData>, 35533232, 1)
60 
61 #endif
LArHVCondAlg
Definition: LArHVCondAlg.h:55
LArHVData::getUpdatedCells
const std::set< Identifier > & getUpdatedCells() const
Definition: LArHVData.h:52
LArHVData::~LArHVData
~LArHVData()=default
LArHVData::HV_t::HV_t
HV_t(float ihv, float icurr, float iweight)
Definition: LArHVData.h:28
LArHVData::HV_t::weight
float weight
Definition: LArHVData.h:32
LArHVData::HV_t::hv
float hv
Definition: LArHVData.h:29
LArHVData::m_empty
const std::vector< LArHVData::HV_t > m_empty
Definition: LArHVData.h:47
LArHVData::hvMap
std::map< Identifier, std::vector< HV_t > > hvMap
Definition: LArHVData.h:41
LArHVData::HV_t
struct for HV, current and weight
Definition: LArHVData.h:27
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
LArHVData::m_voltage
hvMap m_voltage
Definition: LArHVData.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArHVData::getHV
const std::vector< LArHVData::HV_t > & getHV(const Identifier &id) const
brief Given a Offline Readout ID, return values of HV and Weight
Definition: LArHVData.cxx:8
LArHVData::HV_t::current
float current
Definition: LArHVData.h:31
LArHVData::LArHVData
LArHVData()=default
CondCont
Hold mapping of ranges to condition objects.
Definition: CondCont.h:811
LArHVData::m_updatedCells
std::set< Identifier > m_updatedCells
Definition: LArHVData.h:45
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
CLASS_DEF.h
macros to associate a CLID to a type
LArHVData
Definition: LArHVData.h:17