ATLAS Offline Software
FCALHVModule.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LArHV/FCALHVModule.h"
6 #include "LArHV/FCALHVManager.h"
7 #include "LArHV/FCALHVLine.h"
8 
9 #include <stdexcept>
10 
12 public:
13  Clockwork(const FCALHVManager* managerPtr
14  , const FCALHVModule* modulePtr
15  , unsigned int side
16  , unsigned int sector
17  , unsigned int sampling)
18  : manager(managerPtr)
19  , iSide(side)
20  , iSector(sector)
21  , iSampling(sampling) {
22  for(int iLine=0; iLine<4; ++iLine) {
23  hvLine[iLine] = new FCALHVLine(modulePtr,iLine);
24  }
25  }
27  for(int iLine=0; iLine<4; ++iLine) {
28  delete hvLine[iLine];
29  }
30  }
31 
33  unsigned int iSide;
34  unsigned int iSector;
35  unsigned int iSampling;
36  const FCALHVLine* hvLine[4]{};
37 };
38 
40  , unsigned int iSide
41  , unsigned int iSector
42  , unsigned int iSampling)
43  :m_c(new Clockwork(manager,this,iSide,iSector,iSampling))
44 {
45 }
46 
48 {
49  delete m_c;
50 }
51 
52 unsigned int FCALHVModule::getSideIndex() const
53 {
54  return m_c->iSide;
55 }
56 
57 unsigned int FCALHVModule::getSamplingIndex() const
58 {
59  return m_c->iSampling;
60 }
61 
62 unsigned int FCALHVModule::getSectorIndex() const
63 {
64  return m_c->iSector;
65 }
66 
68 {
69  return 4;
70 }
71 
72 const FCALHVLine& FCALHVModule::getHVLine(unsigned int iLine) const
73 {
74  // Check bounds and throw error if out of range.
75  if (iLine>3) {
76  std::string msg = std::string("FCALHVModule requesting out of range HV line, number ") + std::to_string(iLine);
77  throw std::runtime_error(msg.c_str());
78  }
79 
80  return *(m_c->hvLine[iLine]);
81 }
82 
84 {
85  return *(m_c->manager);
86 }
FCALHVModule::getSamplingIndex
unsigned int getSamplingIndex() const
Definition: FCALHVModule.cxx:57
FCALHVModule::Clockwork::manager
const FCALHVManager * manager
Definition: FCALHVModule.cxx:32
FCALHVModule::m_c
Clockwork * m_c
Definition: FCALHVModule.h:44
FCALHVModule::getSideIndex
unsigned int getSideIndex() const
Definition: FCALHVModule.cxx:52
FCALHVModule::Clockwork::hvLine
const FCALHVLine * hvLine[4]
Definition: FCALHVModule.cxx:36
FCALHVModule::Clockwork::iSampling
unsigned int iSampling
Definition: FCALHVModule.cxx:35
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
FCALHVModule::Clockwork::iSide
unsigned int iSide
Definition: FCALHVModule.cxx:33
FCALHVModule::Clockwork::~Clockwork
~Clockwork()
Definition: FCALHVModule.cxx:26
FCALHVLine.h
TRT::Hit::side
@ side
Definition: HitInfo.h:83
FCALHVLine
Definition: FCALHVLine.h:15
FCALHVModule::getNumHVLines
static unsigned int getNumHVLines()
Definition: FCALHVModule.cxx:67
FCALHVModule::Clockwork::iSector
unsigned int iSector
Definition: FCALHVModule.cxx:34
FCALHVModule::Clockwork
Definition: FCALHVModule.cxx:11
FCALHVModule::~FCALHVModule
~FCALHVModule()
Definition: FCALHVModule.cxx:47
FCALHVModule::FCALHVModule
FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling)
Definition: FCALHVModule.cxx:39
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
FCALHVModule::getSectorIndex
unsigned int getSectorIndex() const
Definition: FCALHVModule.cxx:62
FCALHVModule::getHVLine
const FCALHVLine & getHVLine(unsigned int iLine) const
Definition: FCALHVModule.cxx:72
FCALHVModule::getManager
const FCALHVManager & getManager() const
Definition: FCALHVModule.cxx:83
FCALHVModule.h
FCALHVManager.h
FCALHVModule
Describes one HV Module within the FCAL.
Definition: FCALHVModule.h:20
FCALHVModule::Clockwork::Clockwork
Clockwork(const FCALHVManager *managerPtr, const FCALHVModule *modulePtr, unsigned int side, unsigned int sector, unsigned int sampling)
Definition: FCALHVModule.cxx:13
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
FCALHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: FCALHVManager.h:35
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7