ATLAS Offline Software
Loading...
Searching...
No Matches
FCALHVModule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 (std::make_unique<Clockwork> (manager,this,iSide,iSector,iSampling))
44{
45}
46
48
49unsigned int FCALHVModule::getSideIndex() const
50{
51 return m_c->iSide;
52}
53
55{
56 return m_c->iSampling;
57}
58
59unsigned int FCALHVModule::getSectorIndex() const
60{
61 return m_c->iSector;
62}
63
65{
66 return 4;
67}
68
69const FCALHVLine& FCALHVModule::getHVLine(unsigned int iLine) const
70{
71 // Check bounds and throw error if out of range.
72 if (iLine>3) {
73 std::string msg = std::string("FCALHVModule requesting out of range HV line, number ") + std::to_string(iLine);
74 throw std::runtime_error(msg.c_str());
75 }
76
77 return *(m_c->hvLine[iLine]);
78}
79
81{
82 return *(m_c->manager);
83}
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
unsigned int getSamplingIndex() const
unsigned int getSideIndex() const
std::unique_ptr< Clockwork > m_c
unsigned int getSectorIndex() const
FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling)
static unsigned int getNumHVLines()
STL namespace.
MsgStream & msg
Definition testRead.cxx:32