ATLAS Offline Software
Loading...
Searching...
No Matches
FCALHVModule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 Clockwork(const Clockwork &) = delete;
32 Clockwork & operator =(const Clockwork &) = delete;
33
35 unsigned int iSide;
36 unsigned int iSector;
37 unsigned int iSampling;
38 const FCALHVLine* hvLine[4]{};
39};
40
42 , unsigned int iSide
43 , unsigned int iSector
44 , unsigned int iSampling)
45 : m_c (std::make_unique<Clockwork> (manager,this,iSide,iSector,iSampling))
46{
47}
48
50
51unsigned int FCALHVModule::getSideIndex() const
52{
53 return m_c->iSide;
54}
55
57{
58 return m_c->iSampling;
59}
60
61unsigned int FCALHVModule::getSectorIndex() const
62{
63 return m_c->iSector;
64}
65
67{
68 return 4;
69}
70
71const FCALHVLine& FCALHVModule::getHVLine(unsigned int iLine) const
72{
73 // Check bounds and throw error if out of range.
74 if (iLine>3) {
75 std::string msg = std::string("FCALHVModule requesting out of range HV line, number ") + std::to_string(iLine);
76 throw std::runtime_error(msg.c_str());
77 }
78
79 return *(m_c->hvLine[iLine]);
80}
81
83{
84 return *(m_c->manager);
85}
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)
Clockwork(const Clockwork &)=delete
const FCALHVManager * manager
Clockwork & operator=(const Clockwork &)=delete
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