ATLAS Offline Software
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 
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 
18  RPCtrigDataObject(sl.number(),sl.name())
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 
37 bool
39 {
40  if(m_sector == patterns.sector()) return true;
41  return false;
42 }
43 
44 bool
46 {
47  return !(*this == patterns);
48 }
49 
50 
51 bool
53 {
54  if(m_sector < patterns.sector()) return true;
55  return false;
56 }
57 
58 void
60 {
61  m_pad_patterns.push_back(patterns);
62 }
63 
64 
67 {
68  this->load_pad_patterns(patterns);
69  return *this;
70 }
71 
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 
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 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Pad::getOverlapEta
ubit16 getOverlapEta(ubit16 bunch)
Definition: Pad.cxx:440
BaseObject::name
const std::string & name() const
Definition: BaseObject.h:23
SLpatterns.h
SLpatterns::load_pad_patterns
void load_pad_patterns(PADpatterns *)
Definition: SLpatterns.cxx:59
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
SLpatterns::pad_patterns
const PADdata::PatternsList & pad_patterns(void) const
Definition: SLpatterns.h:48
SLpatterns::m_pad_patterns
PADdata::PatternsList m_pad_patterns
Definition: SLpatterns.h:26
detail
Definition: extract_histogram_tag.cxx:14
SLpatterns::operator==
bool operator==(const SLpatterns &) const
Definition: SLpatterns.cxx:38
SLpatterns::m_sector
int m_sector
Definition: SLpatterns.h:23
SectorLogic
Definition: SectorLogic.h:96
SLpatterns::m_debug
unsigned long int m_debug
Definition: SLpatterns.h:24
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Pad::getPTCoding
ubit16 getPTCoding(ubit16 bunch)
Definition: Pad.cxx:410
RpcCablingCondData
Definition: RpcCablingCondData.h:21
PADpatterns
Definition: PADpatterns.h:20
SLpatterns::give_SectorL
SectorLogic * give_SectorL(const RpcCablingCondData *readCdo, int NOBXS, int BCZERO)
Definition: SLpatterns.cxx:73
SLpatterns::operator=
SLpatterns operator=(const SLpatterns &)
Definition: SLpatterns.cxx:26
SLpatterns::operator<<
SLpatterns & operator<<(PADpatterns *)
Definition: SLpatterns.cxx:66
Pad::getRoIAmbiguity
ubit16 getRoIAmbiguity(ubit16 bunch)
Definition: Pad.cxx:450
Pad::getOverlapPhi
ubit16 getOverlapPhi(ubit16 bunch)
Definition: Pad.cxx:430
SLpatterns::Print
void Print(std::ostream &, bool) const
Definition: SLpatterns.cxx:118
SLpatterns::SLpatterns
SLpatterns(int, unsigned long int)
Definition: SLpatterns.cxx:11
SLpatterns
Definition: SLpatterns.h:21
Pad::getBCIDCounter
ubit16 getBCIDCounter(ubit16 bunch)
Definition: Pad.cxx:460
SLpatterns::debug
unsigned long int debug(void) const
Definition: SLpatterns.h:46
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SLpatterns::operator<
bool operator<(const SLpatterns &) const
Definition: SLpatterns.cxx:52
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
SLpatterns::operator!=
bool operator!=(const SLpatterns &) const
Definition: SLpatterns.cxx:45
Pad
Definition: Pad.h:10
L1TopoSimulationConfig.subsystem
subsystem
Definition: L1TopoSimulationConfig.py:263
SLpatterns::sector
int sector(void) const
Definition: SLpatterns.h:44
SLpatterns::m_SectorL
std::unique_ptr< SectorLogic > m_SectorL
Definition: SLpatterns.h:28
Pad::getRoI
ubit16 getRoI(ubit16 bunch)
Definition: Pad.cxx:400
Pad::getOPL
ubit16 getOPL(ubit16 bunch)
Definition: Pad.cxx:420