ATLAS Offline Software
LArHVNMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef LARHVNMAP_H
7 #define LARHVNMAP_H
8 
11 
12 #include <vector>
13 
14 class LArHVNMap {
15 
16  public:
17 
18  LArHVNMap()=delete;
19 
20  LArHVNMap(std::vector<short>& vVec, const LArHVLineID* hvHelper);
21  LArHVNMap(unsigned len, const LArHVLineID* hvHelper);
22  ~LArHVNMap () {};
23 
24 
25  // retrieving ncell using hvline ID
26  short HVNcell(const HWIdentifier& chid) const;
27 
28  short HVNcell_Hash(const IdentifierHash& h) const {
29  if (h<m_hvNcell.size())
30  return m_hvNcell[h];
31  else
32  return m_noCell;
33  }
34 
35  const std::vector<short>& HVNcellVec() const {return m_hvNcell;}
36 
37  void incHVline(unsigned hvHash);
38 
39 
40  private:
42 
43  std::vector<short> m_hvNcell;
44  const short m_noCell;
45 };
46 
47 #include "AthenaKernel/CondCont.h"
48 CLASS_DEF( LArHVNMap, 18310106, 1)
49 CONDCONT_DEF( LArHVNMap, 38107992);
50 
51 inline void LArHVNMap::incHVline(unsigned hvHash) {
52  if(hvHash<m_hvNcell.size()) ++m_hvNcell[hvHash];
53 }
54 
55 #endif
LArHVNMap::HVNcell_Hash
short HVNcell_Hash(const IdentifierHash &h) const
Definition: LArHVNMap.h:28
CondCont.h
Hold mappings of ranges to condition objects.
LArHVNMap
Definition: LArHVNMap.h:14
LArHVNMap::m_hvNcell
std::vector< short > m_hvNcell
Definition: LArHVNMap.h:43
LArHVNMap::incHVline
void incHVline(unsigned hvHash)
Definition: LArHVNMap.h:51
CONDCONT_DEF
CONDCONT_DEF(LArHVNMap, 38107992)
LArHVLineID.h
HWIdentifier
Definition: HWIdentifier.h:13
extractSporadic.h
list h
Definition: extractSporadic.py:97
LArHVNMap::m_noCell
const short m_noCell
Definition: LArHVNMap.h:44
LArHVNMap::m_hvHelper
const LArHVLineID * m_hvHelper
Definition: LArHVNMap.h:41
IdentifierHash.h
h
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:67
LArHVNMap::HVNcell
short HVNcell(const HWIdentifier &chid) const
Definition: LArHVNMap.cxx:18
LArHVNMap::HVNcellVec
const std::vector< short > & HVNcellVec() const
Definition: LArHVNMap.h:35
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
LArHVNMap::LArHVNMap
LArHVNMap()=delete
LArHVNMap::~LArHVNMap
~LArHVNMap()
Definition: LArHVNMap.h:22
LArHVLineID
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.
Definition: LArHVLineID.h:48