ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1RPClogic
src
CMAreadout.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigT1RPClogic/CMAreadout.h
"
6
7
CMAreadout::CMAreadout
(
CMApatterns
*
patterns
,
uint
NOBXS,
uint
BCZERO) :
8
RPCtrigDataObject
(
patterns
->
number
(),
"CMA readout"
),
9
m_CMAconfiguration
(
patterns
->cma_parameters().conf_type()),
10
m_sector
(
patterns
->
sector
()),
11
m_cma_identity
(
patterns
->cma_parameters().
id
())
12
{
13
m_low_pt_matrix
=
patterns
->give_low_pt_matrix(NOBXS, BCZERO);
14
m_high_pt_matrix
=
patterns
->give_high_pt_matrix(NOBXS, BCZERO);
15
}
16
17
18
CMAreadout::CMAreadout
(
const
CMAreadout
& readout) :
19
RPCtrigDataObject
(readout.
number
(),readout.
name
()),
20
m_CMAconfiguration
(readout.
m_CMAconfiguration
),
21
m_sector
(readout.
m_sector
),
22
m_cma_identity
(readout.
m_cma_identity
),
23
m_low_pt_matrix
(readout.
m_low_pt_matrix
),
24
m_high_pt_matrix
(readout.
m_high_pt_matrix
)
25
{
26
}
27
28
CMAreadout
29
CMAreadout::operator=
(
const
CMAreadout
& readout)
30
{
31
static_cast<
RPCtrigDataObject
&
>
(*this) =
32
static_cast<
const
RPCtrigDataObject
&
>
(readout);
33
m_CMAconfiguration
= readout.
m_CMAconfiguration
;
34
m_sector
= readout.
m_sector
;
35
m_cma_identity
= readout.
m_cma_identity
;
36
m_low_pt_matrix
= readout.
m_low_pt_matrix
;
37
m_high_pt_matrix
= readout.
m_high_pt_matrix
;
38
return
*
this
;
39
}
40
41
42
bool
43
CMAreadout::operator==
(
const
CMAreadout
& cmaReadout)
const
44
{
45
if
(
m_sector
== cmaReadout.
sector
() &&
46
m_cma_identity
.PAD_index() == cmaReadout.
id
().
PAD_index
() &&
47
m_cma_identity
.type() == cmaReadout.
id
().
type
() &&
48
m_cma_identity
.Ixx_index() == cmaReadout.
id
().
Ixx_index
() )
49
{
50
return
true
;
51
}
52
return
false
;
53
}
54
55
bool
56
CMAreadout::operator!=
(
const
CMAreadout
& cmaReadout)
const
57
{
58
return
!(*
this
== cmaReadout);
59
}
60
61
bool
62
CMAreadout::operator<
(
const
CMAreadout
& cmaReadout)
const
63
{
64
if
(
m_sector
< cmaReadout.
sector
() )
return
true
;
65
if
(
m_cma_identity
.PAD_index() < cmaReadout.
id
().
PAD_index
() )
66
return
true
;
67
if
(
m_cma_identity
.type() < cmaReadout.
id
().
type
())
return
true
;
68
if
(
m_cma_identity
.Ixx_index() < cmaReadout.
id
().
Ixx_index
() )
69
return
true
;
70
return
false
;
71
}
72
73
std::array<MatrixReadOut*, 2>
74
CMAreadout::give_matrix_readout
(MsgStream& log,
uint
NOBXS)
75
{
76
MatrixReadOut::DataVersion
type
=(
m_CMAconfiguration
==
CMAparameters::Atlas
)?
77
MatrixReadOut::Atlas
:
MatrixReadOut::Simulation
;
78
79
if
(!
m_low_pt_matrix_readout
)
80
m_low_pt_matrix_readout
= std::make_unique<MatrixReadOut>(
m_low_pt_matrix
,0,NOBXS,
type
);
81
if
(!
m_high_pt_matrix_readout
)
82
m_high_pt_matrix_readout
= std::make_unique<MatrixReadOut>(
m_high_pt_matrix
,0,NOBXS,
type
);
83
84
unsigned
short
int
lowFrag =
m_low_pt_matrix_readout
->checkFragment();
85
unsigned
short
int
highFrag =
m_high_pt_matrix_readout
->checkFragment();
86
if
(log.level()<=MSG::DEBUG) {
87
log << MSG::DEBUG <<
"CheckFragment for low Pt Matrix = "
<< lowFrag <<
endmsg
;
88
log << MSG::DEBUG <<
"CheckFragment for high Pt Matrix = "
<< highFrag <<
endmsg
;
89
}
90
91
return
{
m_low_pt_matrix_readout
.get(),
m_high_pt_matrix_readout
.get()};
92
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CMAreadout.h
uint
unsigned int uint
Definition
LArOFPhaseFill.cxx:19
BaseObject::name
const std::string & name() const
Definition
BaseObject.h:23
CMAidentity::type
ViewType type() const
Definition
CMAidentity.cxx:117
CMAidentity::Ixx_index
int Ixx_index() const
Definition
CMAidentity.cxx:123
CMAidentity::PAD_index
int PAD_index() const
Definition
CMAidentity.cxx:122
CMAparameters::Atlas
@ Atlas
Definition
CMAparameters.h:24
CMApatterns
Definition
CMApatterns.h:21
CMAreadout
Definition
CMAreadout.h:23
CMAreadout::operator=
CMAreadout operator=(const CMAreadout &)
Definition
CMAreadout.cxx:29
CMAreadout::m_low_pt_matrix
Matrix * m_low_pt_matrix
Definition
CMAreadout.h:29
CMAreadout::operator!=
bool operator!=(const CMAreadout &) const
Definition
CMAreadout.cxx:56
CMAreadout::m_high_pt_matrix_readout
std::unique_ptr< MatrixReadOut > m_high_pt_matrix_readout
Definition
CMAreadout.h:31
CMAreadout::m_sector
int m_sector
Definition
CMAreadout.h:27
CMAreadout::m_high_pt_matrix
Matrix * m_high_pt_matrix
Definition
CMAreadout.h:30
CMAreadout::id
const CMAidentity & id(void) const
Definition
CMAreadout.h:46
CMAreadout::operator<
bool operator<(const CMAreadout &) const
Definition
CMAreadout.cxx:62
CMAreadout::m_CMAconfiguration
CMAparameters::CMAconfiguration m_CMAconfiguration
Definition
CMAreadout.h:25
CMAreadout::give_matrix_readout
std::array< MatrixReadOut *, 2 > give_matrix_readout(MsgStream &log, uint NOBXS)
Definition
CMAreadout.cxx:74
CMAreadout::m_cma_identity
CMAidentity m_cma_identity
Definition
CMAreadout.h:28
CMAreadout::sector
int sector(void) const
Definition
CMAreadout.h:45
CMAreadout::m_low_pt_matrix_readout
std::unique_ptr< MatrixReadOut > m_low_pt_matrix_readout
Definition
CMAreadout.h:31
CMAreadout::CMAreadout
CMAreadout(CMApatterns *, uint NOBXS, uint BCZERO)
Definition
CMAreadout.cxx:7
CMAreadout::operator==
bool operator==(const CMAreadout &) const
Definition
CMAreadout.cxx:43
MatrixReadOut::DataVersion
DataVersion
Definition
MatrixReadOut.h:20
MatrixReadOut::Atlas
@ Atlas
Definition
MatrixReadOut.h:20
MatrixReadOut::Simulation
@ Simulation
Definition
MatrixReadOut.h:20
RPCtrigDataObject::number
int number() const
Definition
RPCtrigDataObject.h:30
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition
RPCtrigDataObject.cxx:10
patterns
std::vector< std::string > patterns
Definition
listroot.cxx:187
type
Generated on
for ATLAS Offline Software by
1.17.0