ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1RPClogic
src
SLpatterns.cxx
Go to the documentation of this file.
1
/* // -*- C++ -*- */
2
3
/*
4
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
8
#include "
TrigT1RPClogic/SLpatterns.h
"
9
10
11
SLpatterns::SLpatterns
(
int
sector
,
unsigned
long
int
debug
) :
12
RPCtrigDataObject
(0,
"Sector Logic patterns"
),
m_sector
(
sector
),
13
m_debug
(
debug
)
14
{
15
}
16
17
SLpatterns::SLpatterns
(
const
SLpatterns
& sl) :
18
RPCtrigDataObject
(sl.
number
(),sl.
name
())
19
{
20
m_sector
= sl.
sector
();
21
m_debug
= sl.
debug
();
22
m_pad_patterns
= sl.
pad_patterns
();
23
}
24
25
SLpatterns
26
SLpatterns::operator=
(
const
SLpatterns
& sl)
27
{
28
static_cast<
RPCtrigDataObject
&
>
(*this) =
29
static_cast<
const
RPCtrigDataObject
&
>
(sl);
30
m_sector
= sl.
sector
();
31
m_debug
= sl.
debug
();
32
m_pad_patterns
.clear();
33
m_pad_patterns
= sl.
pad_patterns
();
34
return
*
this
;
35
}
36
37
bool
38
SLpatterns::operator==
(
const
SLpatterns
&
patterns
)
const
39
{
40
if
(
m_sector
==
patterns
.sector())
return
true
;
41
return
false
;
42
}
43
44
bool
45
SLpatterns::operator!=
(
const
SLpatterns
&
patterns
)
const
46
{
47
return
!(*
this
==
patterns
);
48
}
49
50
51
bool
52
SLpatterns::operator<
(
const
SLpatterns
&
patterns
)
const
53
{
54
if
(
m_sector
<
patterns
.sector())
return
true
;
55
return
false
;
56
}
57
58
void
59
SLpatterns::load_pad_patterns
(
PADpatterns
*
patterns
)
60
{
61
m_pad_patterns
.push_back(
patterns
);
62
}
63
64
65
SLpatterns
&
66
SLpatterns::operator<<
(
PADpatterns
*
patterns
)
67
{
68
this->
load_pad_patterns
(patterns);
69
return
*
this
;
70
}
71
72
SectorLogic
*
73
SLpatterns::give_SectorL
(
const
RpcCablingCondData
* readCdo,
int
NOBXS,
int
BCZERO)
74
{
75
if
(!
m_SectorL
)
76
{
77
int
subsystem = (
m_sector
< 32)? 0 : 1;
78
int
logic_sector =
m_sector
%32;
79
80
81
82
PADdata::PatternsList::iterator pad =
m_pad_patterns
.begin();
83
bool
oldSimulation=
false
;
84
// M. Corradi 3/3/2010: check if using old cabling
85
if
(pad !=
m_pad_patterns
.end()) {
86
oldSimulation=(*pad)->give_pad(readCdo, NOBXS, BCZERO)->isOldSimulation();
87
}
88
89
m_SectorL
= std::make_unique<SectorLogic>(0,0,
m_debug
,subsystem,logic_sector,oldSimulation, NOBXS, BCZERO);
90
91
while
(pad !=
m_pad_patterns
.end())
92
{
93
Pad
* Pad_board = (*pad)->give_pad(readCdo, NOBXS, BCZERO);
94
for
(
int
bunch=0;bunch<NOBXS;++bunch)
95
{
96
m_SectorL
->load( (*pad)->pad_id(),
97
bunch,
98
Pad_board->
getRoI
(bunch),
99
Pad_board->
getPTCoding
(bunch),
100
Pad_board->
getOPL
(bunch),
101
Pad_board->
getOverlapPhi
(bunch),
102
Pad_board->
getOverlapEta
(bunch),
103
Pad_board->
getRoIAmbiguity
(bunch),
104
Pad_board->
getBCIDCounter
(bunch) );
105
}
106
107
++pad;
108
}
109
110
m_SectorL
->execute();
111
112
}
113
114
return
m_SectorL
.get();
115
}
116
117
void
118
SLpatterns::Print
(std::ostream& stream,
bool
detail
)
const
119
{
120
stream <<
name
() <<
" number "
121
<<
m_sector
<< std::endl;
122
stream <<
"It contains n. "
<<
m_pad_patterns
.size()
123
<<
" PADs"
;
124
125
if
(
detail
)
126
{
127
stream <<
" :"
<< std::endl;
128
PADdata::PatternsList::const_iterator pad =
m_pad_patterns
.begin();
129
while
(pad !=
m_pad_patterns
.end())
130
{
131
(*pad)->Print(stream,
false
);
132
++pad;
133
}
134
}
135
else
stream <<
"."
<< std::endl;
136
}
137
SLpatterns.h
BaseObject::name
const std::string & name() const
Definition
BaseObject.h:23
PADpatterns
Definition
PADpatterns.h:20
Pad
Definition
Pad.h:10
Pad::getPTCoding
ubit16 getPTCoding(ubit16 bunch)
Definition
Pad.cxx:411
Pad::getBCIDCounter
ubit16 getBCIDCounter(ubit16 bunch)
Definition
Pad.cxx:461
Pad::getRoI
ubit16 getRoI(ubit16 bunch)
Definition
Pad.cxx:401
Pad::getOPL
ubit16 getOPL(ubit16 bunch)
Definition
Pad.cxx:421
Pad::getRoIAmbiguity
ubit16 getRoIAmbiguity(ubit16 bunch)
Definition
Pad.cxx:451
Pad::getOverlapPhi
ubit16 getOverlapPhi(ubit16 bunch)
Definition
Pad.cxx:431
Pad::getOverlapEta
ubit16 getOverlapEta(ubit16 bunch)
Definition
Pad.cxx:441
RPCtrigDataObject::number
int number() const
Definition
RPCtrigDataObject.h:30
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition
RPCtrigDataObject.cxx:10
RpcCablingCondData
Definition
RpcCablingCondData.h:23
SLpatterns
Definition
SLpatterns.h:21
SLpatterns::operator==
bool operator==(const SLpatterns &) const
Definition
SLpatterns.cxx:38
SLpatterns::sector
int sector(void) const
Definition
SLpatterns.h:44
SLpatterns::give_SectorL
SectorLogic * give_SectorL(const RpcCablingCondData *readCdo, int NOBXS, int BCZERO)
Definition
SLpatterns.cxx:73
SLpatterns::m_sector
int m_sector
Definition
SLpatterns.h:23
SLpatterns::operator!=
bool operator!=(const SLpatterns &) const
Definition
SLpatterns.cxx:45
SLpatterns::debug
unsigned long int debug(void) const
Definition
SLpatterns.h:46
SLpatterns::pad_patterns
const PADdata::PatternsList & pad_patterns(void) const
Definition
SLpatterns.h:48
SLpatterns::operator<<
SLpatterns & operator<<(PADpatterns *)
Definition
SLpatterns.cxx:66
SLpatterns::operator<
bool operator<(const SLpatterns &) const
Definition
SLpatterns.cxx:52
SLpatterns::m_pad_patterns
PADdata::PatternsList m_pad_patterns
Definition
SLpatterns.h:26
SLpatterns::load_pad_patterns
void load_pad_patterns(PADpatterns *)
Definition
SLpatterns.cxx:59
SLpatterns::operator=
SLpatterns operator=(const SLpatterns &)
Definition
SLpatterns.cxx:26
SLpatterns::m_debug
unsigned long int m_debug
Definition
SLpatterns.h:24
SLpatterns::SLpatterns
SLpatterns(int, unsigned long int)
Definition
SLpatterns.cxx:11
SLpatterns::m_SectorL
std::unique_ptr< SectorLogic > m_SectorL
Definition
SLpatterns.h:28
SLpatterns::Print
void Print(std::ostream &, bool) const
Definition
SLpatterns.cxx:118
SectorLogic
Definition
SectorLogic.h:96
patterns
std::vector< std::string > patterns
Definition
listroot.cxx:187
detail
Definition
extract_histogram_tag.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0