ATLAS Offline Software
HWMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HWMAP_H
6 #define HWMAP_H
7 #include <vector>
8 #include <string>
10 #include "AthenaKernel/CondCont.h"
11 namespace TRTCond{
12  class HWMap{
13  public:
14  HWMap() {
15  // Initialize HV-line/pad maps
16  const int nBarrelPadsTotal = 32*(42+65+100);
17  m_Barrel_HV_CoolChanNames = new std::vector<std::string>(nBarrelPadsTotal,"");
18  m_Barrel_HV_CoolChanNums = new std::vector<int>(nBarrelPadsTotal,-1);
19  const int nEndcapCellsTotal = 32*3*(6*4+8*2);
20  m_EndcapA_HV_CoolChanNames = new std::vector<std::string>(nEndcapCellsTotal,"");
21  m_EndcapA_HV_CoolChanNums = new std::vector<int>(nEndcapCellsTotal,-1);
22  m_EndcapC_HV_CoolChanNames = new std::vector<std::string>(nEndcapCellsTotal,"");
23  m_EndcapC_HV_CoolChanNums = new std::vector<int>(nEndcapCellsTotal,-1);
24  // These are moved to CondStore which takes care of their deletion
25  }
26 
27  HWMap (const HWMap&) = delete;
28  HWMap& operator= (const HWMap&) = delete;
29 
30  virtual ~HWMap() {}
31 
32  const std::vector<std::string>* get_Barrel_HV_Names() const {return m_Barrel_HV_CoolChanNames; }
33  const std::vector<std::string>* get_EndcapA_HV_Names() const {return m_EndcapA_HV_CoolChanNames; }
34  const std::vector<std::string>* get_EndcapC_HV_Names() const {return m_EndcapC_HV_CoolChanNames; }
35  const std::vector<int>* get_Barrel_HV_Nums() const {return m_Barrel_HV_CoolChanNums; }
36  const std::vector<int>* get_EndcapA_HV_Nums() const {return m_EndcapA_HV_CoolChanNums; }
37  const std::vector<int>* get_EndcapC_HV_Nums() const {return m_EndcapC_HV_CoolChanNums; }
38 
39  void setBarrelName(int i, const std::string & name) {
41  }
42  void setEndcapAName(int i, const std::string & name) {
44  }
45  void setEndcapCName(int i, const std::string & name) {
47  }
48 
49  void setBarrelNum(int i, const int & channel_number) {
50  m_Barrel_HV_CoolChanNums->at(i)=channel_number;
51  }
52 
53  void setEndcapANum(int i, const int & channel_number) {
54  m_EndcapA_HV_CoolChanNums->at(i)=channel_number;
55  }
56 
57  void setEndcapCNum(int i, const int & channel_number) {
58  m_EndcapC_HV_CoolChanNums->at(i)=channel_number;
59  }
60 
61  private:
62 
63  std::vector<std::string>* m_Barrel_HV_CoolChanNames;
64  std::vector<std::string>* m_EndcapA_HV_CoolChanNames;
65  std::vector<std::string>* m_EndcapC_HV_CoolChanNames;
66  std::vector<int>* m_Barrel_HV_CoolChanNums;
67  std::vector<int>* m_EndcapA_HV_CoolChanNums;
68  std::vector<int>* m_EndcapC_HV_CoolChanNums;
69 
70  };
71 }
72 CLASS_DEF(TRTCond::HWMap,132179951,1)
73 CONDCONT_DEF(TRTCond::HWMap,183899721);
74 #endif
TRTCond::HWMap::m_Barrel_HV_CoolChanNames
std::vector< std::string > * m_Barrel_HV_CoolChanNames
Definition: HWMap.h:63
TRTCond::HWMap::setBarrelNum
void setBarrelNum(int i, const int &channel_number)
Definition: HWMap.h:49
CondCont.h
Hold mappings of ranges to condition objects.
TRTCond::HWMap::get_EndcapC_HV_Nums
const std::vector< int > * get_EndcapC_HV_Nums() const
Definition: HWMap.h:37
TRTCond::HWMap::setEndcapCName
void setEndcapCName(int i, const std::string &name)
Definition: HWMap.h:45
TRTCond::HWMap::m_EndcapC_HV_CoolChanNums
std::vector< int > * m_EndcapC_HV_CoolChanNums
Definition: HWMap.h:68
CONDCONT_DEF
CONDCONT_DEF(TRTCond::HWMap, 183899721)
TRTCond::HWMap::get_Barrel_HV_Names
const std::vector< std::string > * get_Barrel_HV_Names() const
Definition: HWMap.h:32
TRTCond::HWMap
Definition: HWMap.h:12
TRTCond::HWMap::get_EndcapA_HV_Nums
const std::vector< int > * get_EndcapA_HV_Nums() const
Definition: HWMap.h:36
TRTCond::HWMap::m_EndcapA_HV_CoolChanNames
std::vector< std::string > * m_EndcapA_HV_CoolChanNames
Definition: HWMap.h:64
TRTCond::HWMap::~HWMap
virtual ~HWMap()
Definition: HWMap.h:30
TRTCond::HWMap::setEndcapANum
void setEndcapANum(int i, const int &channel_number)
Definition: HWMap.h:53
TRTCond::HWMap::HWMap
HWMap()
Definition: HWMap.h:14
lumiFormat.i
int i
Definition: lumiFormat.py:85
TRTCond::HWMap::get_EndcapA_HV_Names
const std::vector< std::string > * get_EndcapA_HV_Names() const
Definition: HWMap.h:33
TRTCond::HWMap::setEndcapCNum
void setEndcapCNum(int i, const int &channel_number)
Definition: HWMap.h:57
TRTCond::HWMap::operator=
HWMap & operator=(const HWMap &)=delete
TRTCond::HWMap::get_Barrel_HV_Nums
const std::vector< int > * get_Barrel_HV_Nums() const
Definition: HWMap.h:35
TRTCond::HWMap::setEndcapAName
void setEndcapAName(int i, const std::string &name)
Definition: HWMap.h:42
TRTCond::HWMap::get_EndcapC_HV_Names
const std::vector< std::string > * get_EndcapC_HV_Names() const
Definition: HWMap.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TRTCond::HWMap::m_Barrel_HV_CoolChanNums
std::vector< int > * m_Barrel_HV_CoolChanNums
Definition: HWMap.h:66
TRTCond::HWMap::m_EndcapA_HV_CoolChanNums
std::vector< int > * m_EndcapA_HV_CoolChanNums
Definition: HWMap.h:67
TRTCond::HWMap::setBarrelName
void setBarrelName(int i, const std::string &name)
Definition: HWMap.h:39
TRTCond
Definition: BasicRtRelation.cxx:8
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
TRTCond::HWMap::m_EndcapC_HV_CoolChanNames
std::vector< std::string > * m_EndcapC_HV_CoolChanNames
Definition: HWMap.h:65
CLASS_DEF.h
macros to associate a CLID to a type
TRTCond::HWMap::HWMap
HWMap(const HWMap &)=delete