ATLAS Offline Software
Loading...
Searching...
No Matches
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
7#include "LArHV/FCALHVLine.h"
8
9#include <stdexcept>
10
12public:
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
52unsigned int FCALHVModule::getSideIndex() const
53{
54 return m_c->iSide;
55}
56
58{
59 return m_c->iSampling;
60}
61
62unsigned int FCALHVModule::getSectorIndex() const
63{
64 return m_c->iSector;
65}
66
68{
69 return 4;
70}
71
72const 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}
This class provides direct access to information on the HV electrodes within the barrels.
Clockwork(const FCALHVManager *managerPtr, const FCALHVModule *modulePtr, unsigned int side, unsigned int sector, unsigned int sampling)
const FCALHVManager * manager
const FCALHVLine * hvLine[4]
const FCALHVLine & getHVLine(unsigned int iLine) const
const FCALHVManager & getManager() const
Clockwork * m_c
unsigned int getSamplingIndex() const
unsigned int getSideIndex() const
unsigned int getSectorIndex() const
FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling)
static unsigned int getNumHVLines()
MsgStream & msg
Definition testRead.cxx:32