ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArHV
src
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
5
#include "
LArHV/FCALHVModule.h
"
6
#include "
LArHV/FCALHVManager.h
"
7
#include "
LArHV/FCALHVLine.h
"
8
9
#include <stdexcept>
10
11
class
FCALHVModule::Clockwork
{
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
}
26
~Clockwork
() {
27
for
(
int
iLine=0; iLine<4; ++iLine) {
28
delete
hvLine
[iLine];
29
}
30
}
31
32
const
FCALHVManager
*
manager
;
33
unsigned
int
iSide
;
34
unsigned
int
iSector
;
35
unsigned
int
iSampling
;
36
const
FCALHVLine
*
hvLine
[4]{};
37
};
38
39
FCALHVModule::FCALHVModule
(
const
FCALHVManager
* manager
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
47
FCALHVModule::~FCALHVModule
() =
default
;
48
49
unsigned
int
FCALHVModule::getSideIndex
()
const
50
{
51
return
m_c
->iSide;
52
}
53
54
unsigned
int
FCALHVModule::getSamplingIndex
()
const
55
{
56
return
m_c
->iSampling;
57
}
58
59
unsigned
int
FCALHVModule::getSectorIndex
()
const
60
{
61
return
m_c
->iSector;
62
}
63
64
unsigned
int
FCALHVModule::getNumHVLines
()
65
{
66
return
4;
67
}
68
69
const
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
80
const
FCALHVManager
&
FCALHVModule::getManager
()
const
81
{
82
return
*(
m_c
->manager);
83
}
FCALHVLine.h
FCALHVManager.h
FCALHVModule.h
FCALHVLine
Definition
FCALHVLine.h:15
FCALHVManager
This class provides direct access to information on the HV electrodes within the barrels.
Definition
FCALHVManager.h:35
FCALHVModule::Clockwork
Definition
FCALHVModule.cxx:11
FCALHVModule::Clockwork::Clockwork
Clockwork(const FCALHVManager *managerPtr, const FCALHVModule *modulePtr, unsigned int side, unsigned int sector, unsigned int sampling)
Definition
FCALHVModule.cxx:13
FCALHVModule::Clockwork::manager
const FCALHVManager * manager
Definition
FCALHVModule.cxx:32
FCALHVModule::Clockwork::iSector
unsigned int iSector
Definition
FCALHVModule.cxx:34
FCALHVModule::Clockwork::~Clockwork
~Clockwork()
Definition
FCALHVModule.cxx:26
FCALHVModule::Clockwork::hvLine
const FCALHVLine * hvLine[4]
Definition
FCALHVModule.cxx:36
FCALHVModule::Clockwork::iSide
unsigned int iSide
Definition
FCALHVModule.cxx:33
FCALHVModule::Clockwork::iSampling
unsigned int iSampling
Definition
FCALHVModule.cxx:35
FCALHVModule::getHVLine
const FCALHVLine & getHVLine(unsigned int iLine) const
Definition
FCALHVModule.cxx:69
FCALHVModule::getManager
const FCALHVManager & getManager() const
Definition
FCALHVModule.cxx:80
FCALHVModule::getSamplingIndex
unsigned int getSamplingIndex() const
Definition
FCALHVModule.cxx:54
FCALHVModule::getSideIndex
unsigned int getSideIndex() const
Definition
FCALHVModule.cxx:49
FCALHVModule::m_c
std::unique_ptr< Clockwork > m_c
Definition
FCALHVModule.h:47
FCALHVModule::getSectorIndex
unsigned int getSectorIndex() const
Definition
FCALHVModule.cxx:59
FCALHVModule::~FCALHVModule
~FCALHVModule()
FCALHVModule::FCALHVModule
FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling)
Definition
FCALHVModule.cxx:39
FCALHVModule::getNumHVLines
static unsigned int getNumHVLines()
Definition
FCALHVModule.cxx:64
std
STL namespace.
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0