ATLAS Offline Software
Trigger
TrigT1
TrigT1RPClogic
src
PADreadout.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigT1RPClogic/PADreadout.h
"
6
#include "
TrigT1RPChardware/MatrixReadOut.h
"
7
8
9
PADreadout::PADreadout
(
int
sector,
int
pad) :
10
RPCtrigDataObject
(sector*100+pad,
"PAD readout"
),
11
m_sector(sector),
12
m_PAD(pad)
13
{
14
}
15
16
17
PADreadout::PADreadout
(
const
PADreadout
& readout) :
18
RPCtrigDataObject
(readout.
number
(),readout.
name
()),
19
m_sector(readout.sector()),
20
m_PAD(readout.PAD())
21
{
22
for
(
int
i
=0;
i
<8;++
i
)
m_matrices_readout
[
i
] = readout.
matrices_readout
(
i
);
23
}
24
25
PADreadout
26
PADreadout::operator=
(
const
PADreadout
& readout)
27
{
28
static_cast<
RPCtrigDataObject
&
>
(*this) =
29
static_cast<
const
RPCtrigDataObject
&
>
(readout);
30
m_sector
= readout.
sector
();
31
m_PAD
= readout.
PAD
();
32
33
for
(
int
i
=0;
i
<8;++
i
)
m_matrices_readout
[
i
] = readout.
matrices_readout
(
i
);
34
return
*
this
;
35
}
36
37
38
bool
39
PADreadout::operator==
(
const
PADreadout
& padReadout)
const
40
{
41
if
(
m_sector
== padReadout.
sector
() &&
42
m_PAD
== padReadout.
PAD
() )
43
{
44
return
true
;
45
}
46
return
false
;
47
}
48
49
bool
50
PADreadout::operator!=
(
const
PADreadout
& padReadout)
const
51
{
52
return
!(*
this
== padReadout);
53
}
54
55
bool
56
PADreadout::operator<
(
const
PADreadout
& padReadout)
const
57
{
58
if
(
m_sector
< padReadout.
sector
() )
return
true
;
59
if
(
m_PAD
< padReadout.
PAD
() )
return
true
;
60
return
false
;
61
}
62
63
void
64
PADreadout::load_readout
(std::array<MatrixReadOut*, 2>& readout)
65
{
66
int
mat
= 0;
67
for
(
int
i
=0;
i
< 8; ++
i
)
if
(
m_matrices_readout
[
i
] == 0){
mat
=
i
;
break
;}
68
if
(
mat
> 6 )
69
{
70
std::runtime_error(
"trying to load more than 8 matrices into PAD readout!"
);
71
}
72
m_matrices_readout
[
mat
] = readout[0];
73
m_matrices_readout
[
mat
+1] = readout[1];
74
}
75
76
MatrixReadOut
*
77
PADreadout::matrices_readout
(
int
i
)
const
78
{
79
if
(
i
>7)
80
{
81
return
0;
82
}
83
return
m_matrices_readout
[
i
];
84
}
85
86
PadReadOut
*
87
PADreadout::give_pad_readout
(
void
)
88
{
89
if
(!
m_pad_readout
)
m_pad_readout
= std::make_unique<PadReadOut>(
m_PAD
,
m_matrices_readout
);
90
return
m_pad_readout
.get();
91
}
PADreadout::operator<
bool operator<(const PADreadout &) const
Definition:
PADreadout.cxx:56
mat
GeoMaterial * mat
Definition:
LArDetectorConstructionTBEC.cxx:53
PADreadout::m_matrices_readout
MatrixReadOut * m_matrices_readout[8]
Definition:
PADreadout.h:25
PADreadout::m_pad_readout
std::unique_ptr< PadReadOut > m_pad_readout
Definition:
PADreadout.h:26
PADreadout
Definition:
PADreadout.h:20
PadReadOut
Definition:
PadReadOut.h:15
PADreadout.h
MatrixReadOut
Definition:
MatrixReadOut.h:18
lumiFormat.i
int i
Definition:
lumiFormat.py:92
PADreadout::PAD
int PAD(void) const
Definition:
PADreadout.h:41
PADreadout::sector
int sector(void) const
Definition:
PADreadout.h:40
PADreadout::operator!=
bool operator!=(const PADreadout &) const
Definition:
PADreadout.cxx:50
PADreadout::matrices_readout
MatrixReadOut * matrices_readout(int) const
Definition:
PADreadout.cxx:77
python.selection.number
number
Definition:
selection.py:20
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:195
RPCtrigDataObject
Definition:
RPCtrigDataObject.h:15
PADreadout::m_PAD
int m_PAD
Definition:
PADreadout.h:23
PADreadout::m_sector
int m_sector
Definition:
PADreadout.h:22
PADreadout::operator=
PADreadout operator=(const PADreadout &)
Definition:
PADreadout.cxx:26
PADreadout::PADreadout
PADreadout(int, int)
Definition:
PADreadout.cxx:9
PADreadout::operator==
bool operator==(const PADreadout &) const
Definition:
PADreadout.cxx:39
MatrixReadOut.h
PADreadout::load_readout
void load_readout(std::array< MatrixReadOut *, 2 > &)
Definition:
PADreadout.cxx:64
PADreadout::give_pad_readout
PadReadOut * give_pad_readout(void)
Definition:
PADreadout.cxx:87
Generated on Fri Jul 5 2024 21:24:01 for ATLAS Offline Software by
1.8.18