ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
10
11SLpatterns::SLpatterns(int sector,unsigned long int debug) :
12 RPCtrigDataObject(0,"Sector Logic patterns"),m_sector(sector),
14{
15}
16
19{
20 m_sector = sl.sector();
21 m_debug = sl.debug();
23}
24
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();
34 return *this;
35}
36
37bool
39{
40 if(m_sector == patterns.sector()) return true;
41 return false;
42}
43
44bool
46{
47 return !(*this == patterns);
48}
49
50
51bool
53{
54 if(m_sector < patterns.sector()) return true;
55 return false;
56}
57
58void
63
64
67{
68 this->load_pad_patterns(patterns);
69 return *this;
70}
71
73SLpatterns::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
117void
118SLpatterns::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
const std::string & name() const
Definition BaseObject.h:23
Definition Pad.h:10
ubit16 getPTCoding(ubit16 bunch)
Definition Pad.cxx:410
ubit16 getBCIDCounter(ubit16 bunch)
Definition Pad.cxx:460
ubit16 getRoI(ubit16 bunch)
Definition Pad.cxx:400
ubit16 getOPL(ubit16 bunch)
Definition Pad.cxx:420
ubit16 getRoIAmbiguity(ubit16 bunch)
Definition Pad.cxx:450
ubit16 getOverlapPhi(ubit16 bunch)
Definition Pad.cxx:430
ubit16 getOverlapEta(ubit16 bunch)
Definition Pad.cxx:440
int number(void) const
RPCtrigDataObject(int, const std::string &)
bool operator==(const SLpatterns &) const
int sector(void) const
Definition SLpatterns.h:44
SectorLogic * give_SectorL(const RpcCablingCondData *readCdo, int NOBXS, int BCZERO)
bool operator!=(const SLpatterns &) const
unsigned long int debug(void) const
Definition SLpatterns.h:46
const PADdata::PatternsList & pad_patterns(void) const
Definition SLpatterns.h:48
SLpatterns & operator<<(PADpatterns *)
bool operator<(const SLpatterns &) const
PADdata::PatternsList m_pad_patterns
Definition SLpatterns.h:26
void load_pad_patterns(PADpatterns *)
SLpatterns operator=(const SLpatterns &)
unsigned long int m_debug
Definition SLpatterns.h:24
SLpatterns(int, unsigned long int)
std::unique_ptr< SectorLogic > m_SectorL
Definition SLpatterns.h:28
void Print(std::ostream &, bool) const
std::vector< std::string > patterns
Definition listroot.cxx:187