ATLAS Offline Software
Loading...
Searching...
No Matches
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
14class 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);
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
48CLASS_DEF( LArHVNMap, 18310106, 1)
50
51inline void LArHVNMap::incHVline(unsigned hvHash) {
52 if(hvHash<m_hvNcell.size()) ++m_hvNcell[hvHash];
53}
54
55#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Header file for AthHistogramAlgorithm.
This is a "hash" representation of an Identifier.
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.
Definition LArHVLineID.h:43
short HVNcell_Hash(const IdentifierHash &h) const
Definition LArHVNMap.h:28
LArHVNMap()=delete
short HVNcell(const HWIdentifier &chid) const
Definition LArHVNMap.cxx:18
const LArHVLineID * m_hvHelper
Definition LArHVNMap.h:41
void incHVline(unsigned hvHash)
Definition LArHVNMap.h:51
std::vector< short > m_hvNcell
Definition LArHVNMap.h:43
const short m_noCell
Definition LArHVNMap.h:44
const std::vector< short > & HVNcellVec() const
Definition LArHVNMap.h:35