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-2026 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
Clockwork
(
const
Clockwork
&) =
delete
;
32
Clockwork
&
operator =
(
const
Clockwork
&) =
delete
;
33
34
const
FCALHVManager
*
manager
;
35
unsigned
int
iSide
;
36
unsigned
int
iSector
;
37
unsigned
int
iSampling
;
38
const
FCALHVLine
*
hvLine
[4]{};
39
};
40
41
FCALHVModule::FCALHVModule
(
const
FCALHVManager
* manager
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
49
FCALHVModule::~FCALHVModule
() =
default
;
50
51
unsigned
int
FCALHVModule::getSideIndex
()
const
52
{
53
return
m_c
->iSide;
54
}
55
56
unsigned
int
FCALHVModule::getSamplingIndex
()
const
57
{
58
return
m_c
->iSampling;
59
}
60
61
unsigned
int
FCALHVModule::getSectorIndex
()
const
62
{
63
return
m_c
->iSector;
64
}
65
66
unsigned
int
FCALHVModule::getNumHVLines
()
67
{
68
return
4;
69
}
70
71
const
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
82
const
FCALHVManager
&
FCALHVModule::getManager
()
const
83
{
84
return
*(
m_c
->manager);
85
}
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::Clockwork
Clockwork(const Clockwork &)=delete
FCALHVModule::Clockwork::manager
const FCALHVManager * manager
Definition
FCALHVModule.cxx:34
FCALHVModule::Clockwork::iSector
unsigned int iSector
Definition
FCALHVModule.cxx:36
FCALHVModule::Clockwork::~Clockwork
~Clockwork()
Definition
FCALHVModule.cxx:26
FCALHVModule::Clockwork::operator=
Clockwork & operator=(const Clockwork &)=delete
FCALHVModule::Clockwork::hvLine
const FCALHVLine * hvLine[4]
Definition
FCALHVModule.cxx:38
FCALHVModule::Clockwork::iSide
unsigned int iSide
Definition
FCALHVModule.cxx:35
FCALHVModule::Clockwork::iSampling
unsigned int iSampling
Definition
FCALHVModule.cxx:37
FCALHVModule::getHVLine
const FCALHVLine & getHVLine(unsigned int iLine) const
Definition
FCALHVModule.cxx:71
FCALHVModule::getManager
const FCALHVManager & getManager() const
Definition
FCALHVModule.cxx:82
FCALHVModule::getSamplingIndex
unsigned int getSamplingIndex() const
Definition
FCALHVModule.cxx:56
FCALHVModule::getSideIndex
unsigned int getSideIndex() const
Definition
FCALHVModule.cxx:51
FCALHVModule::m_c
std::unique_ptr< Clockwork > m_c
Definition
FCALHVModule.h:47
FCALHVModule::getSectorIndex
unsigned int getSectorIndex() const
Definition
FCALHVModule.cxx:61
FCALHVModule::~FCALHVModule
~FCALHVModule()
FCALHVModule::FCALHVModule
FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling)
Definition
FCALHVModule.cxx:41
FCALHVModule::getNumHVLines
static unsigned int getNumHVLines()
Definition
FCALHVModule.cxx:66
std
STL namespace.
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0