ATLAS Offline Software
Loading...
Searching...
No Matches
RPC_CondCabling::SectorLogicSetup Class Reference

#include <SectorLogicSetup.h>

Inheritance diagram for RPC_CondCabling::SectorLogicSetup:

Public Types

typedef std::multimap< CMAinput, int > StationMap
typedef std::map< int, RPCchamber > RPCmap
typedef std::map< int, WiredOR > WORmap
typedef std::map< CMAidentity, EtaCMA > EtaCMAmap
typedef std::map< CMAidentity, EvenPhiCMA > EvenPhiCMAmap
typedef std::map< CMAidentity, OddPhiCMA > OddPhiCMAmap
typedef std::list< int > SECTORlist
typedef std::map< std::string, std::string, std::less<> > TrigRoadsMap

Public Member Functions

 SectorLogicSetup (int, const std::string &, const std::string &, bool)
virtual ~SectorLogicSetup ()=default
 SectorLogicSetup (const SectorLogicSetup &)=delete
SectorLogicSetup & operator= (const SectorLogicSetup &)=delete
 SectorLogicSetup (SectorLogicSetup &&)=default
SectorLogicSetup & operator= (SectorLogicSetup &&)=default
const std::string & positive_sector () const
const std::string & negative_sector () const
const std::string & online_database () const
const std::string & layout () const
int sector_type () const
bool cosmic () const
const SECTORlist & sectors () const
const StationMap & giveStations () const
const RPCmap & giveRPC () const
const WORmap & giveWOR () const
const EtaCMAmap & giveEtaCMA () const
const EvenPhiCMAmap & giveEvenPhiCMA () const
const OddPhiCMAmap & giveOddPhiCMA () const
const RPCchamber * find_chamber (int, int) const
RPCchamber * find_chamber (int, int)
WiredOR * find_wor (int, int)
WiredOR * previousWOR (const WiredOR &)
EtaCMA * previousCMA (const EtaCMA &)
EvenPhiCMA * previousCMA (const EvenPhiCMA &)
OddPhiCMA * previousCMA (const OddPhiCMA &)
std::list< const EtaCMA * > find_eta_CMAs_in_PAD (int)
bool setup (MsgStream &)
bool check ()
bool global_strip_add (ViewType, HalfType, int, int, int, int &) const
bool local_strip_add (ViewType, int, int, int &, int &) const
bool global_conn_add (ViewType, HalfType, int, int, int, int &, int &, int &) const
bool local_conn_add (ViewType, int, int, int &, int &, int &) const
const CMAparameters::CMAlist give_CMAs (const int, const ViewType, const int, const int) const
bool give_RoI_borders (const CMAidentity &ETA, const CMAidentity &PHI, unsigned int &firstEtaCode, unsigned int &lastEtaCode, unsigned int &firstPhiCode, unsigned int &lastPhiCode) const
bool give_LowPt_borders (const CMAidentity &ETA, const CMAidentity &PHI, unsigned int &firstEtaCode, unsigned int &lastEtaCode, unsigned int &firstPhiCode, unsigned int &lastPhiCode) const
bool give_HighPt_borders (const CMAidentity &ETA, const CMAidentity &PHI, unsigned int &firstEtaCode, unsigned int &lastEtaCode, unsigned int &firstPhiCode, unsigned int &lastPhiCode) const
bool give_LowPt_layout (const CMAidentity &ID, unsigned short int &start_pivot_ch, unsigned int &start_pivot_code, unsigned short int &stop_pivot_ch, unsigned int &stop_pivot_code, unsigned short int &start_confirm_ch, unsigned int &start_confirm_code, unsigned short int &stop_confirm_ch, unsigned int &stop_confirm_code) const
bool give_HighPt_layout (const CMAidentity &ID, unsigned short int &start_pivot_ch, unsigned int &start_pivot_code, unsigned short int &stop_pivot_ch, unsigned int &stop_pivot_code, unsigned short int &start_confirm_ch, unsigned int &start_confirm_code, unsigned short int &stop_confirm_ch, unsigned int &stop_confirm_code) const
const CMAparameters * give_CMA (const CMAidentity &CMA) const
bool correct (const CMAidentity &CMA, L1RPCcabCorrection type, CMAinput it, unsigned int layer, unsigned short int Channel1, unsigned short int Channel2, short int num) const
std::list< unsigned int > give_strip_code (const CMAidentity &CMA, int logic_sector, unsigned short int lh, unsigned short int ijk, unsigned short int Channel) const
bool operator+= (RPCchamberdata &)
bool operator+= (WiredORdata &)
bool operator+= (CMApivotdata &)
bool operator+= (CMAcablingdata &)
HalfType side () const
SectorLogicSetup & operator<< (int)
void PrintElement (std::ostream &, int, const std::string &, int, bool) const
void SetPtoTrigRoads (const TrigRoadsMap *)
const TrigRoadsMap * GetPtoTrigRoads () const
ObjectType tag () const
const std::string & name () const
virtual void Print (std::ostream &, bool) const

Private Member Functions

std::string no_elements (const std::string &, int)
void get_station (CMAinput, int)
EtaCMAmap::const_iterator find_etaCMA (int Eta, int Phi) const
EvenPhiCMAmap::const_iterator find_evenphiCMA (int Eta, int Phi) const
OddPhiCMAmap::const_iterator find_oddphiCMA (int Eta, int Phi) const
EtaCMAmap::iterator find_etaCMA (int Eta, int Phi)
EvenPhiCMAmap::iterator find_evenphiCMA (int Eta, int Phi)
OddPhiCMAmap::iterator find_oddphiCMA (int Eta, int Phi)

Private Attributes

std::string m_positive_sector
std::string m_negative_sector
int m_sector_type
SECTORlist m_sectors
StationMap m_stations
RPCmap m_RPCs
WORmap m_WORs
EtaCMAmap m_etaCMAs
EvenPhiCMAmap m_evenphiCMAs
OddPhiCMAmap m_oddphiCMAs
std::string m_online_database
std::string m_layout
bool m_cosmic
const std::map< std::string, std::string, std::less<> > * m_trigroads = nullptr
ObjectType m_tag
std::string m_name

Friends

std::ostream & operator<< (std::ostream &stream, const SectorLogicSetup &setup)

Detailed Description

Definition at line 27 of file SectorLogicSetup.h.

Member Typedef Documentation

◆ EtaCMAmap

◆ EvenPhiCMAmap

◆ OddPhiCMAmap

◆ RPCmap

Definition at line 30 of file SectorLogicSetup.h.

◆ SECTORlist

Definition at line 35 of file SectorLogicSetup.h.

◆ StationMap

Definition at line 29 of file SectorLogicSetup.h.

◆ TrigRoadsMap

typedef std::map<std::string, std::string, std::less<> > RPC_CondCabling::SectorLogicSetup::TrigRoadsMap

Definition at line 36 of file SectorLogicSetup.h.

◆ WORmap

Definition at line 31 of file SectorLogicSetup.h.

Constructor & Destructor Documentation

◆ SectorLogicSetup() [1/3]

SectorLogicSetup::SectorLogicSetup ( int type,
const std::string & database,
const std::string & layout,
bool conf )

Definition at line 13 of file SectorLogicSetup.cxx.

13 :
14 BaseObject(Logic, "Sector Logic Map"),
17 m_sector_type(type),
18 m_online_database (database),
20 m_cosmic (conf)
21{
22}
@ Logic
Definition BaseObject.h:11
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7
const std::string & layout() const

◆ ~SectorLogicSetup()

virtual RPC_CondCabling::SectorLogicSetup::~SectorLogicSetup ( )
virtualdefault

◆ SectorLogicSetup() [2/3]

RPC_CondCabling::SectorLogicSetup::SectorLogicSetup ( const SectorLogicSetup & )
delete

◆ SectorLogicSetup() [3/3]

RPC_CondCabling::SectorLogicSetup::SectorLogicSetup ( SectorLogicSetup && )
default

Member Function Documentation

◆ check()

bool SectorLogicSetup::check ( void )

Definition at line 100 of file SectorLogicSetup.cxx.

100 {
101 using sIter = StationMap::const_iterator;
102 using rIter = RPCmap::iterator;
103 using wIter = WORmap::iterator;
104 std::pair<sIter, sIter> pivot = m_stations.equal_range(Pivot);
105
106 bool RPCcheck = true;
108 for (sIter stat = pivot.first; stat != pivot.second; ++stat) {
109 int Lkey = (*stat).second * 100;
110 int Ukey = (*stat).second * 100 + 99;
111 for (rIter it = m_RPCs.lower_bound(Lkey); it != m_RPCs.upper_bound(Ukey); ++it) { RPCcheck &= (*it).second.check(); }
112 }
113
114 bool WORcheck = true;
116 for (sIter stat = pivot.first; stat != pivot.second; ++stat) {
117 int Lkey = (*stat).second * 100;
118 int Ukey = (*stat).second * 100 + 99;
119 for (wIter it = m_WORs.lower_bound(Lkey); it != m_WORs.upper_bound(Ukey); ++it) {}
120 }
121
122 return RPCcheck & WORcheck;
123}
@ Pivot

◆ correct()

bool SectorLogicSetup::correct ( const CMAidentity & CMA,
L1RPCcabCorrection type,
CMAinput it,
unsigned int layer,
unsigned short int Channel1,
unsigned short int Channel2,
short int num ) const

Definition at line 524 of file SectorLogicSetup.cxx.

526 {
527 if (CMA.type() == Eta) {
528 EtaCMAmap::const_iterator etaCMA = find_etaCMA(CMA.PAD_index(), CMA.Ixx_index());
529 return (*etaCMA).second.correct(type, it, ly, Channel1, Channel2, number);
530 }
531 if (CMA.type() == Phi) {
532 if (CMA.coverage() == EvenSectors) {
533 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(CMA.PAD_index(), CMA.Ixx_index());
534 return (*phiCMA).second.correct(type, it, ly, Channel1, Channel2, number);
535 }
536 if (CMA.coverage() == OddSectors) {
537 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(CMA.PAD_index(), CMA.Ixx_index());
538 return (*phiCMA).second.correct(type, it, ly, Channel1, Channel2, number);
539 }
540 }
541 return false;
542}
@ OddSectors
Definition CMAidentity.h:14
@ EvenSectors
Definition CMAidentity.h:14
@ Phi
Definition RPCdef.h:8
@ Eta
Definition RPCdef.h:8
ViewType type() const
int Ixx_index() const
static bool coverage(const std::string &, CMAcoverage &)
int PAD_index() const
OddPhiCMAmap::const_iterator find_oddphiCMA(int Eta, int Phi) const
EtaCMAmap::const_iterator find_etaCMA(int Eta, int Phi) const
EvenPhiCMAmap::const_iterator find_evenphiCMA(int Eta, int Phi) const
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ cosmic()

bool RPC_CondCabling::SectorLogicSetup::cosmic ( ) const
inline

Definition at line 86 of file SectorLogicSetup.h.

86{ return m_cosmic; }

◆ find_chamber() [1/2]

RPCchamber * SectorLogicSetup::find_chamber ( int stat,
int num )

Definition at line 125 of file SectorLogicSetup.cxx.

125 {
126 RPCmap::iterator result = m_RPCs.find(stat * 100 + num);
127 if (result != m_RPCs.end())
128 return &(*result).second;
129 else
130 return nullptr;
131}

◆ find_chamber() [2/2]

const RPCchamber * SectorLogicSetup::find_chamber ( int stat,
int num ) const

Definition at line 133 of file SectorLogicSetup.cxx.

133 {
134 RPCmap::const_iterator result = m_RPCs.find(stat * 100 + num);
135 if (result != m_RPCs.end())
136 return &(*result).second;
137 else
138 return nullptr;
139}

◆ find_eta_CMAs_in_PAD()

std::list< const EtaCMA * > SectorLogicSetup::find_eta_CMAs_in_PAD ( int pad)

Definition at line 178 of file SectorLogicSetup.cxx.

178 {
179 std::list<const EtaCMA*> CMAlist;
180 EtaCMAmap::const_iterator it = m_etaCMAs.begin();
181 while (it != m_etaCMAs.end()) {
182 const EtaCMA* cma = &(*it).second;
183 if (cma->id().PAD_index() == pad) CMAlist.push_back(cma);
184 ++it;
185 }
186 return CMAlist;
187}
const CMAidentity & id() const

◆ find_etaCMA() [1/2]

SectorLogicSetup::EtaCMAmap::iterator SectorLogicSetup::find_etaCMA ( int Eta,
int Phi )
private

Definition at line 239 of file SectorLogicSetup.cxx.

239 {
240 EtaCMAmap::iterator it = m_etaCMAs.begin();
241 while (it != m_etaCMAs.end()) {
242 const EtaCMA* cma = &(*it).second;
243 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
244 ++it;
245 }
246 return m_etaCMAs.end();
247}

◆ find_etaCMA() [2/2]

SectorLogicSetup::EtaCMAmap::const_iterator SectorLogicSetup::find_etaCMA ( int Eta,
int Phi ) const
private

Definition at line 209 of file SectorLogicSetup.cxx.

209 {
210 EtaCMAmap::const_iterator it = m_etaCMAs.begin();
211 while (it != m_etaCMAs.end()) {
212 const EtaCMA* cma = &(*it).second;
213 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
214 ++it;
215 }
216 return m_etaCMAs.end();
217}

◆ find_evenphiCMA() [1/2]

SectorLogicSetup::EvenPhiCMAmap::iterator SectorLogicSetup::find_evenphiCMA ( int Eta,
int Phi )
private

Definition at line 219 of file SectorLogicSetup.cxx.

219 {
220 EvenPhiCMAmap::iterator it = m_evenphiCMAs.begin();
221 while (it != m_evenphiCMAs.end()) {
222 const EvenPhiCMA* cma = &(*it).second;
223 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
224 ++it;
225 }
226 return m_evenphiCMAs.end();
227}

◆ find_evenphiCMA() [2/2]

SectorLogicSetup::EvenPhiCMAmap::const_iterator SectorLogicSetup::find_evenphiCMA ( int Eta,
int Phi ) const
private

Definition at line 189 of file SectorLogicSetup.cxx.

189 {
190 EvenPhiCMAmap::const_iterator it = m_evenphiCMAs.begin();
191 while (it != m_evenphiCMAs.end()) {
192 const EvenPhiCMA* cma = &(*it).second;
193 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
194 ++it;
195 }
196 return m_evenphiCMAs.end();
197}

◆ find_oddphiCMA() [1/2]

SectorLogicSetup::OddPhiCMAmap::iterator SectorLogicSetup::find_oddphiCMA ( int Eta,
int Phi )
private

Definition at line 229 of file SectorLogicSetup.cxx.

229 {
230 OddPhiCMAmap::iterator it = m_oddphiCMAs.begin();
231 while (it != m_oddphiCMAs.end()) {
232 const OddPhiCMA* cma = &(*it).second;
233 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
234 ++it;
235 }
236 return m_oddphiCMAs.end();
237}

◆ find_oddphiCMA() [2/2]

SectorLogicSetup::OddPhiCMAmap::const_iterator SectorLogicSetup::find_oddphiCMA ( int Eta,
int Phi ) const
private

Definition at line 199 of file SectorLogicSetup.cxx.

199 {
200 OddPhiCMAmap::const_iterator it = m_oddphiCMAs.begin();
201 while (it != m_oddphiCMAs.end()) {
202 const OddPhiCMA* cma = &(*it).second;
203 if (cma->id().PAD_index() == PAD && cma->id().Ixx_index() == Ixx) return it;
204 ++it;
205 }
206 return m_oddphiCMAs.end();
207}

◆ find_wor()

WiredOR * SectorLogicSetup::find_wor ( int stat,
int num )

Definition at line 141 of file SectorLogicSetup.cxx.

141 {
142 WORmap::iterator result = m_WORs.find(stat * 100 + num);
143 if (result != m_WORs.end())
144 return &(*result).second;
145 else
146 return nullptr;
147}

◆ get_station()

void SectorLogicSetup::get_station ( CMAinput type,
int station )
private

Definition at line 32 of file SectorLogicSetup.cxx.

32 {
33 if (!station) return;
34 typedef StationMap::const_iterator cIter;
35 std::pair<cIter, cIter> p = m_stations.equal_range(type);
36 for (cIter it = p.first; it != p.second; ++it) {
37 if ((*it).second == station) return;
38 }
39 m_stations.insert(StationMap::value_type(type, station));
40}

◆ GetPtoTrigRoads()

const TrigRoadsMap * RPC_CondCabling::SectorLogicSetup::GetPtoTrigRoads ( ) const
inline

Definition at line 164 of file SectorLogicSetup.h.

164{ return m_trigroads; } // LBTAG
const std::map< std::string, std::string, std::less<> > * m_trigroads

◆ give_CMA()

const CMAparameters * SectorLogicSetup::give_CMA ( const CMAidentity & CMA) const

Definition at line 505 of file SectorLogicSetup.cxx.

505 {
506 if (CMA.type() == Eta) {
507 EtaCMAmap::const_iterator etaCMA = find_etaCMA(CMA.PAD_index(), CMA.Ixx_index());
508 return (etaCMA != m_etaCMAs.end()) ? &((*etaCMA).second) : nullptr;
509 }
510 if (CMA.type() == Phi) {
511 if (CMA.coverage() == EvenSectors) {
512 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(CMA.PAD_index(), CMA.Ixx_index());
513 return (phiCMA != m_evenphiCMAs.end()) ? &((*phiCMA).second) : nullptr;
514 }
515 if (CMA.coverage() == OddSectors) {
516 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(CMA.PAD_index(), CMA.Ixx_index());
517 return (phiCMA != m_oddphiCMAs.end()) ? &((*phiCMA)).second : nullptr;
518 }
519 }
520
521 return nullptr;
522}

◆ give_CMAs()

const CMAparameters::CMAlist SectorLogicSetup::give_CMAs ( const int sector,
const ViewType side,
const int station,
const int cabling_code ) const

Definition at line 296 of file SectorLogicSetup.cxx.

297 {
299 if (side == Eta) {
300 EtaCMAmap::const_iterator it = m_etaCMAs.begin();
301 while (it != m_etaCMAs.end()) {
302 const CMAinput IO = (*it).second.whichCMAinput(station);
303 const CMAparameters* cma = (*it).second.test(IO, cabling_code);
304 if (cma) list.push_back(cma);
305 ++it;
306 }
307 } else if (side == Phi) {
308 if (sector % 2) { // odd
309 OddPhiCMAmap::const_iterator it = m_oddphiCMAs.begin();
310 while (it != m_oddphiCMAs.end()) {
311 const CMAinput IO = (*it).second.whichCMAinput(station);
312 const CMAparameters* cma = (*it).second.test(IO, cabling_code);
313 if (cma) list.push_back(cma);
314 ++it;
315 }
316 } else { // even
317 EvenPhiCMAmap::const_iterator it = m_evenphiCMAs.begin();
318 while (it != m_evenphiCMAs.end()) {
319 const CMAinput IO = (*it).second.whichCMAinput(station);
320 const CMAparameters* cma = (*it).second.test(IO, cabling_code);
321 if (cma) list.push_back(cma);
322 ++it;
323 }
324 }
325 }
326 return list;
327}
CMAinput
const CMAparameters * test(CMAinput, int) const
std::list< const CMAparameters * > CMAlist
list(name, path='/')
Definition histSizes.py:38

◆ give_HighPt_borders()

bool SectorLogicSetup::give_HighPt_borders ( const CMAidentity & ETA,
const CMAidentity & PHI,
unsigned int & firstEtaCode,
unsigned int & lastEtaCode,
unsigned int & firstPhiCode,
unsigned int & lastPhiCode ) const

Definition at line 381 of file SectorLogicSetup.cxx.

384 {
385 EtaCMAmap::const_iterator etaCMA = find_etaCMA(ETA.PAD_index(), ETA.Ixx_index());
386 if (etaCMA == m_etaCMAs.end()) return false;
387
388 firstEtaCode = (*etaCMA).second.first_highPt_code();
389 lastEtaCode = (*etaCMA).second.last_highPt_code();
390
391 if (PHI.coverage() == OddSectors) {
392 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(PHI.PAD_index(), PHI.Ixx_index());
393 if (phiCMA == m_oddphiCMAs.end()) return false;
394 firstPhiCode = (*phiCMA).second.first_highPt_code();
395 lastPhiCode = (*phiCMA).second.last_highPt_code();
396 } else if (PHI.coverage() == EvenSectors) {
397 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(PHI.PAD_index(), PHI.Ixx_index());
398 if (phiCMA == m_evenphiCMAs.end()) return false;
399 firstPhiCode = (*phiCMA).second.first_highPt_code();
400 lastPhiCode = (*phiCMA).second.last_highPt_code();
401 } else
402 return false;
403
404 return true;
405}

◆ give_HighPt_layout()

bool SectorLogicSetup::give_HighPt_layout ( const CMAidentity & ID,
unsigned short int & start_pivot_ch,
unsigned int & start_pivot_code,
unsigned short int & stop_pivot_ch,
unsigned int & stop_pivot_code,
unsigned short int & start_confirm_ch,
unsigned int & start_confirm_code,
unsigned short int & stop_confirm_ch,
unsigned int & stop_confirm_code ) const

Definition at line 456 of file SectorLogicSetup.cxx.

459 {
460 if (ID.type() == Eta) {
461 EtaCMAmap::const_iterator etaCMA = find_etaCMA(ID.PAD_index(), ID.Ixx_index());
462 if (etaCMA == m_etaCMAs.end()) return false;
463
464 start_pivot_code = (*etaCMA).second.first_pivot_code();
465 stop_pivot_code = (*etaCMA).second.last_pivot_code();
466 start_confirm_code = (*etaCMA).second.first_highPt_code();
467 stop_confirm_code = (*etaCMA).second.last_highPt_code();
468
469 start_pivot_ch = (*etaCMA).second.first_pivot_channel();
470 stop_pivot_ch = (*etaCMA).second.last_pivot_channel();
471 start_confirm_ch = (*etaCMA).second.first_highPt_channel();
472 stop_confirm_ch = (*etaCMA).second.last_highPt_channel();
473 } else {
474 if (ID.coverage() == OddSectors) {
475 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(ID.PAD_index(), ID.Ixx_index());
476 if (phiCMA == m_oddphiCMAs.end()) return false;
477
478 start_pivot_code = (*phiCMA).second.first_pivot_code();
479 stop_pivot_code = (*phiCMA).second.last_pivot_code();
480 start_confirm_code = (*phiCMA).second.first_highPt_code();
481 stop_confirm_code = (*phiCMA).second.last_highPt_code();
482
483 start_pivot_ch = (*phiCMA).second.first_pivot_channel();
484 stop_pivot_ch = (*phiCMA).second.last_pivot_channel();
485 start_confirm_ch = (*phiCMA).second.first_highPt_channel();
486 stop_confirm_ch = (*phiCMA).second.last_highPt_channel();
487 } else {
488 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(ID.PAD_index(), ID.Ixx_index());
489 if (phiCMA == m_evenphiCMAs.end()) return false;
490 start_pivot_code = (*phiCMA).second.first_pivot_code();
491 stop_pivot_code = (*phiCMA).second.last_pivot_code();
492 start_confirm_code = (*phiCMA).second.first_highPt_code();
493 stop_confirm_code = (*phiCMA).second.last_highPt_code();
494
495 start_pivot_ch = (*phiCMA).second.first_pivot_channel();
496 stop_pivot_ch = (*phiCMA).second.last_pivot_channel();
497 start_confirm_ch = (*phiCMA).second.first_highPt_channel();
498 stop_confirm_ch = (*phiCMA).second.last_highPt_channel();
499 }
500 }
501
502 return !(start_confirm_ch == 999 || stop_confirm_ch == 999);
503}
ID
//////////////////////////////////////// JetAlgorithmType::ID defines most common physics jet finding...

◆ give_LowPt_borders()

bool SectorLogicSetup::give_LowPt_borders ( const CMAidentity & ETA,
const CMAidentity & PHI,
unsigned int & firstEtaCode,
unsigned int & lastEtaCode,
unsigned int & firstPhiCode,
unsigned int & lastPhiCode ) const

Definition at line 355 of file SectorLogicSetup.cxx.

358 {
359 EtaCMAmap::const_iterator etaCMA = find_etaCMA(ETA.PAD_index(), ETA.Ixx_index());
360 if (etaCMA == m_etaCMAs.end()) return false;
361
362 firstEtaCode = (*etaCMA).second.first_lowPt_code();
363 lastEtaCode = (*etaCMA).second.last_lowPt_code();
364
365 if (PHI.coverage() == OddSectors) {
366 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(PHI.PAD_index(), PHI.Ixx_index());
367 if (phiCMA == m_oddphiCMAs.end()) return false;
368 firstPhiCode = (*phiCMA).second.first_lowPt_code();
369 lastPhiCode = (*phiCMA).second.last_lowPt_code();
370 } else if (PHI.coverage() == EvenSectors) {
371 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(PHI.PAD_index(), PHI.Ixx_index());
372 if (phiCMA == m_evenphiCMAs.end()) return false;
373 firstPhiCode = (*phiCMA).second.first_lowPt_code();
374 lastPhiCode = (*phiCMA).second.last_lowPt_code();
375 } else
376 return false;
377
378 return true;
379}

◆ give_LowPt_layout()

bool SectorLogicSetup::give_LowPt_layout ( const CMAidentity & ID,
unsigned short int & start_pivot_ch,
unsigned int & start_pivot_code,
unsigned short int & stop_pivot_ch,
unsigned int & stop_pivot_code,
unsigned short int & start_confirm_ch,
unsigned int & start_confirm_code,
unsigned short int & stop_confirm_ch,
unsigned int & stop_confirm_code ) const

Definition at line 407 of file SectorLogicSetup.cxx.

410 {
411 if (ID.type() == Eta) {
412 EtaCMAmap::const_iterator etaCMA = find_etaCMA(ID.PAD_index(), ID.Ixx_index());
413 if (etaCMA == m_etaCMAs.end()) return false;
414
415 start_pivot_code = (*etaCMA).second.first_pivot_code();
416 stop_pivot_code = (*etaCMA).second.last_pivot_code();
417 start_confirm_code = (*etaCMA).second.first_lowPt_code();
418 stop_confirm_code = (*etaCMA).second.last_lowPt_code();
419
420 start_pivot_ch = (*etaCMA).second.first_pivot_channel();
421 stop_pivot_ch = (*etaCMA).second.last_pivot_channel();
422 start_confirm_ch = (*etaCMA).second.first_lowPt_channel();
423 stop_confirm_ch = (*etaCMA).second.last_lowPt_channel();
424 } else {
425 if (ID.coverage() == OddSectors) {
426 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(ID.PAD_index(), ID.Ixx_index());
427 if (phiCMA == m_oddphiCMAs.end()) return false;
428
429 start_pivot_code = (*phiCMA).second.first_pivot_code();
430 stop_pivot_code = (*phiCMA).second.last_pivot_code();
431 start_confirm_code = (*phiCMA).second.first_lowPt_code();
432 stop_confirm_code = (*phiCMA).second.last_lowPt_code();
433
434 start_pivot_ch = (*phiCMA).second.first_pivot_channel();
435 stop_pivot_ch = (*phiCMA).second.last_pivot_channel();
436 start_confirm_ch = (*phiCMA).second.first_lowPt_channel();
437 stop_confirm_ch = (*phiCMA).second.last_lowPt_channel();
438 } else {
439 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(ID.PAD_index(), ID.Ixx_index());
440 if (phiCMA == m_evenphiCMAs.end()) return false;
441 start_pivot_code = (*phiCMA).second.first_pivot_code();
442 stop_pivot_code = (*phiCMA).second.last_pivot_code();
443 start_confirm_code = (*phiCMA).second.first_lowPt_code();
444 stop_confirm_code = (*phiCMA).second.last_lowPt_code();
445
446 start_pivot_ch = (*phiCMA).second.first_pivot_channel();
447 stop_pivot_ch = (*phiCMA).second.last_pivot_channel();
448 start_confirm_ch = (*phiCMA).second.first_lowPt_channel();
449 stop_confirm_ch = (*phiCMA).second.last_lowPt_channel();
450 }
451 }
452
453 return !(start_confirm_ch == 999 || stop_confirm_ch == 999);
454}

◆ give_RoI_borders()

bool SectorLogicSetup::give_RoI_borders ( const CMAidentity & ETA,
const CMAidentity & PHI,
unsigned int & firstEtaCode,
unsigned int & lastEtaCode,
unsigned int & firstPhiCode,
unsigned int & lastPhiCode ) const

Definition at line 329 of file SectorLogicSetup.cxx.

332 {
333 EtaCMAmap::const_iterator etaCMA = find_etaCMA(ETA.PAD_index(), ETA.Ixx_index());
334 if (etaCMA == m_etaCMAs.end()) return false;
335
336 firstEtaCode = (*etaCMA).second.first_pivot_code();
337 lastEtaCode = (*etaCMA).second.last_pivot_code();
338
339 if (PHI.coverage() == OddSectors) {
340 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(PHI.PAD_index(), PHI.Ixx_index());
341 if (phiCMA == m_oddphiCMAs.end()) return false;
342 firstPhiCode = (*phiCMA).second.first_pivot_code();
343 lastPhiCode = (*phiCMA).second.last_pivot_code();
344 } else if (PHI.coverage() == EvenSectors) {
345 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(PHI.PAD_index(), PHI.Ixx_index());
346 if (phiCMA == m_evenphiCMAs.end()) return false;
347 firstPhiCode = (*phiCMA).second.first_pivot_code();
348 lastPhiCode = (*phiCMA).second.last_pivot_code();
349 } else
350 return false;
351
352 return firstEtaCode != lastEtaCode;
353}

◆ give_strip_code()

std::list< unsigned int > SectorLogicSetup::give_strip_code ( const CMAidentity & CMA,
int logic_sector,
unsigned short int lh,
unsigned short int ijk,
unsigned short int Channel ) const

Definition at line 544 of file SectorLogicSetup.cxx.

546 {
547 std::list<unsigned int> StripCodes;
548
549 if (CMA.type() == Eta) {
550 EtaCMAmap::const_iterator etaCMA = find_etaCMA(CMA.PAD_index(), CMA.Ixx_index());
551
552 if (etaCMA == m_etaCMAs.end()) return StripCodes;
553 (*etaCMA).second.give_strip_code(logic_sector, lh, ijk, Channel, StripCodes);
554 }
555 if (CMA.type() == Phi) {
556 if (CMA.coverage() == EvenSectors) {
557 EvenPhiCMAmap::const_iterator phiCMA = find_evenphiCMA(CMA.PAD_index(), CMA.Ixx_index());
558 if (phiCMA == m_evenphiCMAs.end()) return StripCodes;
559 (*phiCMA).second.give_strip_code(logic_sector, lh, ijk, Channel, StripCodes);
560 }
561 if (CMA.coverage() == OddSectors) {
562 OddPhiCMAmap::const_iterator phiCMA = find_oddphiCMA(CMA.PAD_index(), CMA.Ixx_index());
563 if (phiCMA == m_oddphiCMAs.end()) return StripCodes;
564 (*phiCMA).second.give_strip_code(logic_sector, lh, ijk, Channel, StripCodes);
565 }
566 }
567
568 return StripCodes;
569}

◆ giveEtaCMA()

const EtaCMAmap & RPC_CondCabling::SectorLogicSetup::giveEtaCMA ( ) const
inline

Definition at line 92 of file SectorLogicSetup.h.

92{ return m_etaCMAs; }

◆ giveEvenPhiCMA()

const EvenPhiCMAmap & RPC_CondCabling::SectorLogicSetup::giveEvenPhiCMA ( ) const
inline

Definition at line 93 of file SectorLogicSetup.h.

93{ return m_evenphiCMAs; }

◆ giveOddPhiCMA()

const OddPhiCMAmap & RPC_CondCabling::SectorLogicSetup::giveOddPhiCMA ( ) const
inline

Definition at line 94 of file SectorLogicSetup.h.

94{ return m_oddphiCMAs; }

◆ giveRPC()

const RPCmap & RPC_CondCabling::SectorLogicSetup::giveRPC ( ) const
inline

Definition at line 90 of file SectorLogicSetup.h.

90{ return m_RPCs; }

◆ giveStations()

const StationMap & RPC_CondCabling::SectorLogicSetup::giveStations ( ) const
inline

Definition at line 88 of file SectorLogicSetup.h.

88{ return m_stations; }

◆ giveWOR()

const WORmap & RPC_CondCabling::SectorLogicSetup::giveWOR ( ) const
inline

Definition at line 91 of file SectorLogicSetup.h.

91{ return m_WORs; }

◆ global_conn_add()

bool SectorLogicSetup::global_conn_add ( ViewType side,
HalfType h_barrel,
int station,
int rpc_index,
int strip_number,
int & global_address,
int & low_eta_strips,
int & hi_eta_strips ) const

Definition at line 272 of file SectorLogicSetup.cxx.

273 {
274 RPCmap::const_iterator result = m_RPCs.find(station * 100 + rpc_index);
275 if (result == m_RPCs.end()) return false;
276 return (*result).second.global_connector(side, h_barrel, strip_number, global_address, low_eta_strips, hi_eta_strips);
277}

◆ global_strip_add()

bool SectorLogicSetup::global_strip_add ( ViewType side,
HalfType h_barrel,
int station,
int rpc_index,
int strip_number,
int & global_address ) const

Definition at line 249 of file SectorLogicSetup.cxx.

250 {
251 RPCmap::const_iterator result = m_RPCs.find(station * 100 + rpc_index);
252 if (result == m_RPCs.end()) return false;
253 return (*result).second.global_strip(side, h_barrel, strip_number, global_address);
254}

◆ layout()

const std::string & RPC_CondCabling::SectorLogicSetup::layout ( ) const
inline

Definition at line 84 of file SectorLogicSetup.h.

84{ return m_layout; }

◆ local_conn_add()

bool SectorLogicSetup::local_conn_add ( ViewType side,
int station,
int global_address,
int & c_number,
int & rpc_index,
int & strip_number ) const

Definition at line 279 of file SectorLogicSetup.cxx.

280 {
281 if (side == Eta) {
282 RPCmap::const_iterator it = m_RPCs.lower_bound(station * 100);
283 while (it != m_RPCs.upper_bound(station * 100 + 99)) {
284 if ((*it).second.Gconn_2_Lnumber(side, global_address, c_number, strip_number)) {
285 rpc_index = (*it).second.number();
286 return true;
287 }
288 ++it;
289 }
290 }
291 if (side == Phi) { return false; }
292
293 return false;
294}

◆ local_strip_add()

bool SectorLogicSetup::local_strip_add ( ViewType side,
int station,
int global_address,
int & rpc_index,
int & strip_number ) const

Definition at line 256 of file SectorLogicSetup.cxx.

256 {
257 if (side == Eta) {
258 RPCmap::const_iterator it = m_RPCs.lower_bound(station * 100);
259 while (it != m_RPCs.upper_bound(station * 100 + 99)) {
260 if ((*it).second.Gstrip_2_Lnumber(side, global_address, strip_number)) {
261 rpc_index = (*it).second.number();
262 return true;
263 }
264 ++it;
265 }
266 }
267 if (side == Phi) { return false; }
268
269 return false;
270}

◆ name()

const std::string & BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23{ return m_name; }
std::string m_name
Definition BaseObject.h:16

◆ negative_sector()

const std::string & RPC_CondCabling::SectorLogicSetup::negative_sector ( ) const
inline

Definition at line 82 of file SectorLogicSetup.h.

82{ return m_negative_sector; }

◆ no_elements()

std::string SectorLogicSetup::no_elements ( const std::string & tech,
int stat )
nodiscardprivate

Definition at line 24 of file SectorLogicSetup.cxx.

24 {
25 std::ostringstream disp;
26 disp << "No " << tech << " elements for Sector Type " << m_sector_type;
27 if (stat) disp << ", station " << stat;
28 disp << "!" << std::endl;
29 return disp.str();
30}

◆ online_database()

const std::string & RPC_CondCabling::SectorLogicSetup::online_database ( ) const
inline

Definition at line 83 of file SectorLogicSetup.h.

83{ return m_online_database; }

◆ operator+=() [1/4]

bool SectorLogicSetup::operator+= ( CMAcablingdata & data)

Definition at line 820 of file SectorLogicSetup.cxx.

820 {
821 while (std::unique_ptr<EtaCMA> CMA = data.give_eta_cma()) {
822 std::pair<EtaCMAmap::iterator, bool> ins = m_etaCMAs.insert(EtaCMAmap::value_type(CMA->id(), *CMA));
823 if (!ins.second) {
824 EtaCMAmap::iterator inserted = m_etaCMAs.find(CMA->id());
825
826 int cma_start = CMA->pivot_start_ch();
827 int ins_start = (*inserted).second.pivot_start_ch();
828 if (cma_start * ins_start > 0) {
829 std::ostringstream display;
830 PrintElement(display, 0, "CMA", 0, false);
831 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting Eta CMA:"
832 << std::endl << *CMA << std::endl << "in " << display.str() << endmsg;
833 return ins.second;
834 }
835 (*inserted).second += *CMA;
836 }
837 }
838 return true;
839}
#define endmsg
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
void PrintElement(std::ostream &, int, const std::string &, int, bool) const
display
Definition pyroot.py:42

◆ operator+=() [2/4]

bool SectorLogicSetup::operator+= ( CMApivotdata & data)

Definition at line 772 of file SectorLogicSetup.cxx.

772 {
773 while (std::unique_ptr<EtaCMA> CMA{data.give_eta_cma()}) {
774 std::pair<EtaCMAmap::iterator, bool> ins = m_etaCMAs.insert(EtaCMAmap::value_type(CMA->id(), *CMA));
775 if (!ins.second) {
776 EtaCMAmap::iterator inserted = m_etaCMAs.find(CMA->id());
777
778 int cma_start = CMA->pivot_start_ch();
779 int ins_start = (*inserted).second.pivot_start_ch();
780 if (cma_start * ins_start > 0) {
781 std::ostringstream display;
782 PrintElement(display, 0, CMA->name(), 0, false);
783 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting Eta CMA:"
784 << std::endl << *CMA << std::endl << "in " << display.str() << endmsg;
785 return ins.second;
786 }
787 (*inserted).second += *CMA;
788 }
789
790 get_station(LowPt, CMA->lowPt_station());
791 get_station(Pivot, CMA->pivot_station());
792 get_station(HighPt, CMA->highPt_station());
793 }
794
795 while (std::unique_ptr<EvenPhiCMA> CMA{data.give_evenphi_cma()}) {
796 std::pair<EvenPhiCMAmap::iterator, bool> ins = m_evenphiCMAs.insert(EvenPhiCMAmap::value_type(CMA->id(), *CMA));
797 if (!ins.second) {
798 std::ostringstream display;
799 PrintElement(display, 0, CMA->name(), 0, false);
800 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting even Phi CMA:"
801 << std::endl << *CMA << std::endl << "in " << display.str() << endmsg;
802 return ins.second;
803 }
804 }
805
806 while (std::unique_ptr<OddPhiCMA> CMA{data.give_oddphi_cma()}) {
807 std::pair<OddPhiCMAmap::iterator, bool> ins = m_oddphiCMAs.insert(OddPhiCMAmap::value_type(CMA->id(), *CMA));
808 if (!ins.second) {
809 std::ostringstream display;
810 PrintElement(display, 0, CMA->name(), 0, false);
811 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting odd Phi CMA:"
812 << std::endl << *CMA << std::endl << "in " << display.str() << endmsg;
813 return ins.second;
814 }
815 }
816
817 return true;
818}
@ LowPt
@ HighPt

◆ operator+=() [3/4]

bool SectorLogicSetup::operator+= ( RPCchamberdata & data)

Definition at line 722 of file SectorLogicSetup.cxx.

722 {
723 while (std::unique_ptr<RPCchamber> cham = data.give_rpc()) {
724 int key = data.station() * 100;
725 std::pair<RPCmap::iterator, bool> ins = m_RPCs.insert(RPCmap::value_type(key + cham->number(), *cham));
726
727 RPCmap::iterator lower = m_RPCs.lower_bound(key);
728 RPCmap::iterator upper = m_RPCs.upper_bound(key + 99);
729 RPCmap::iterator current = (ins.first);
730
731 if (ins.second) {
732 if (current != lower) --current;
733 while (current != upper) {
734 int div = ((*current).second.number()) ? 1 : 2;
735 int eta_st = (*current).second.eta_strips() / div;
736 int eta_st_of = (*current).second.eta_strip_global() / div;
737 int eta_co = (*current).second.eta_connectors() / div;
738 int eta_co_of = (*current).second.eta_conn_global() / div;
739 ++current;
740 if (current != m_RPCs.end()) {
741 (*current).second.set_eta_st_global(eta_st + eta_st_of);
742 (*current).second.set_eta_co_global(eta_co + eta_co_of);
743 }
744 }
745 } else {
746 std::ostringstream display;
747 PrintElement(display, data.station(), "RPC", 0, false);
748 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting chamber:"
749 << std::endl << *cham << std::endl << "in " << display.str() << endmsg;
750 return ins.second;
751 }
752 }
753 return true;
754}
int upper(int c)

◆ operator+=() [4/4]

bool SectorLogicSetup::operator+= ( WiredORdata & data)

Definition at line 756 of file SectorLogicSetup.cxx.

756 {
757 while (std::unique_ptr<WiredOR> Wor = data.give_wor()) {
758 int key = data.station() * 100;
759 std::pair<WORmap::iterator, bool> ins = m_WORs.insert(WORmap::value_type(key + Wor->number(), *Wor));
760
761 if (!ins.second) {
762 std::ostringstream display;
763 PrintElement(display, data.station(), "WOR", 0, false);
764 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "SectorLogicSetup") << "Error in inserting WOR:"
765 << std::endl << *Wor << std::endl << "in " << display.str() << endmsg;
766 return ins.second;
767 }
768 }
769 return true;
770}

◆ operator<<()

SectorLogicSetup & SectorLogicSetup::operator<< ( int sector)

Definition at line 571 of file SectorLogicSetup.cxx.

571 {
572 m_sectors.push_back(sector);
573
574 std::ostringstream str;
575 if (sector < 32) {
576 str << std::setw(3) << sector << std::ends;
577 m_negative_sector += str.str();
578 } else {
579 str << std::setw(3) << sector - 32 << std::ends;
580 m_positive_sector += str.str();
581 }
582
583 return *this;
584}

◆ operator=() [1/2]

SectorLogicSetup & RPC_CondCabling::SectorLogicSetup::operator= ( const SectorLogicSetup & )
delete

◆ operator=() [2/2]

SectorLogicSetup & RPC_CondCabling::SectorLogicSetup::operator= ( SectorLogicSetup && )
default

◆ positive_sector()

const std::string & RPC_CondCabling::SectorLogicSetup::positive_sector ( ) const
inline

Definition at line 81 of file SectorLogicSetup.h.

81{ return m_positive_sector; }

◆ previousCMA() [1/3]

EtaCMA * SectorLogicSetup::previousCMA ( const EtaCMA & cma)

Definition at line 157 of file SectorLogicSetup.cxx.

157 {
158 EtaCMAmap::iterator result = m_etaCMAs.find(cma.id());
159 if (result == m_etaCMAs.end() || result == m_etaCMAs.begin()) return nullptr;
160 --result;
161 return &(*result).second;
162}

◆ previousCMA() [2/3]

EvenPhiCMA * SectorLogicSetup::previousCMA ( const EvenPhiCMA & cma)

Definition at line 164 of file SectorLogicSetup.cxx.

164 {
165 EvenPhiCMAmap::iterator result = m_evenphiCMAs.find(cma.id());
166 if (result == m_evenphiCMAs.end() || result == m_evenphiCMAs.begin()) return nullptr;
167 --result;
168 return &(*result).second;
169}

◆ previousCMA() [3/3]

OddPhiCMA * SectorLogicSetup::previousCMA ( const OddPhiCMA & cma)

Definition at line 171 of file SectorLogicSetup.cxx.

171 {
172 OddPhiCMAmap::iterator result = m_oddphiCMAs.find(cma.id());
173 if (result == m_oddphiCMAs.end() || result == m_oddphiCMAs.begin()) return nullptr;
174 --result;
175 return &(*result).second;
176}

◆ previousWOR()

WiredOR * SectorLogicSetup::previousWOR ( const WiredOR & wor)

Definition at line 149 of file SectorLogicSetup.cxx.

149 {
150 WORmap::iterator result = m_WORs.find(wor.station() * 100 + wor.number());
151 WORmap::iterator begin = m_WORs.lower_bound(wor.station() * 100);
152 if (result == m_WORs.end() || result == begin) return nullptr;
153 --result;
154 return &(*result).second;
155}
int number() const
int station() const

◆ Print()

◆ PrintElement()

void SectorLogicSetup::PrintElement ( std::ostream & stream,
int station,
const std::string & ele,
int obj,
bool detail ) const

Definition at line 586 of file SectorLogicSetup.cxx.

586 {
587 int klw = station * 100;
588 int khg = station * 100 + 99;
589
590 if (station == 0) khg = 10 * 100 + 99;
591
592 bool all = ele == name() || ele.empty();
593 bool printed = false;
594
595 bool nRPC = !m_RPCs.empty();
596 bool nWOR = !m_WORs.empty();
597 bool nEtaCMA = !m_etaCMAs.empty();
598 bool nEvenPhiCMA = !m_evenphiCMAs.empty();
599 bool nOddPhiCMA = !m_oddphiCMAs.empty();
600
601 stream << name() << " type n. " << sector_type() << std::endl;
602 stream << "It applies to negative logic sector n. ";
603 stream << negative_sector() << std::endl;
604 stream << " logic sector n. ";
605 stream << positive_sector() << std::endl;
606
607 if (nRPC && (ele == (*m_RPCs.begin()).second.name() || all)) {
608 printed = true;
609 RPCmap::const_iterator low = m_RPCs.lower_bound(klw);
610 RPCmap::const_iterator high = m_RPCs.upper_bound(khg);
611 stream << "It contains " << distance(low, high);
612 stream << " RPCs chamber on station " << station << std::endl;
613
614 for (RPCmap::const_iterator it = low; it != high; ++it) {
615 if (!obj)
616 (*it).second.Print(stream, detail);
617 else if (obj == (*it).second.number())
618 (*it).second.Print(stream, detail);
619 }
620 }
621
622 if (nWOR && (ele == (*m_WORs.begin()).second.name() || all)) {
623 printed = true;
624 WORmap::const_iterator low = m_WORs.lower_bound(klw);
625 WORmap::const_iterator high = m_WORs.upper_bound(khg);
626 stream << "It contains " << distance(low, high);
627 stream << " WORs links on station " << station << std::endl;
628
629 for (WORmap::const_iterator it = low; it != high; ++it) {
630 if (!obj)
631 (*it).second.Print(stream, detail);
632 else if (obj == (*it).second.number())
633 (*it).second.Print(stream, detail);
634 }
635 }
636
637 if (nEtaCMA && (ele == (*m_etaCMAs.begin()).second.name() || all)) {
638 printed = true;
639 stream << "It contains " << m_etaCMAs.size() << " eta CMA:" << std::endl;
640 EtaCMAmap::const_iterator ei;
641 for (ei = m_etaCMAs.begin(); ei != m_etaCMAs.end(); ++ei) {
642 if (!obj)
643 (*ei).second.Print(stream, detail);
644 else if (obj == (*ei).second.number())
645 (*ei).second.Print(stream, detail);
646 }
647 }
648
649 if (nEvenPhiCMA && (ele == (*m_evenphiCMAs.begin()).second.name() || all)) {
650 printed = true;
651 stream << "It contains ";
652 stream << m_evenphiCMAs.size() << " even phi CMA:" << std::endl;
653 EvenPhiCMAmap::const_iterator ev;
654
655 for (ev = m_evenphiCMAs.begin(); ev != m_evenphiCMAs.end(); ++ev) {
656 if (!obj)
657 (*ev).second.Print(stream, detail);
658 else if (obj == (*ev).second.number())
659 (*ev).second.Print(stream, detail);
660 }
661 }
662
663 if (nOddPhiCMA && (ele == (*m_oddphiCMAs.begin()).second.name() || all)) {
664 printed = true;
665 stream << "It contains ";
666 stream << m_oddphiCMAs.size() << " odd phi CMA:" << std::endl;
667 OddPhiCMAmap::const_iterator od;
668
669 for (od = m_oddphiCMAs.begin(); od != m_oddphiCMAs.end(); ++od) {
670 if (!obj)
671 (*od).second.Print(stream, detail);
672 else if (obj == (*od).second.number())
673 (*od).second.Print(stream, detail);
674 }
675 }
676
677 if (ele == "CMA") {
678 printed = true;
679
680 stream << "It contains " << m_etaCMAs.size() << " eta CMA:" << std::endl;
681 EtaCMAmap::const_iterator ei;
682 stream << "nome=" << (*m_etaCMAs.begin()).second.name() << std::endl;
683 for (ei = m_etaCMAs.begin(); ei != m_etaCMAs.end(); ++ei) {
684 if (!obj)
685 (*ei).second.Print(stream, detail);
686 else if (obj == (*ei).second.number())
687 (*ei).second.Print(stream, detail);
688 }
689
690 stream << "plus ";
691 stream << m_evenphiCMAs.size() << " even phi CMA:" << std::endl;
692 EvenPhiCMAmap::const_iterator ev;
693 for (ev = m_evenphiCMAs.begin(); ev != m_evenphiCMAs.end(); ++ev) {
694 if (!obj)
695 (*ev).second.Print(stream, detail);
696 else if (obj == (*ev).second.number())
697 (*ev).second.Print(stream, detail);
698 }
699
700 stream << "plus ";
701 stream << m_oddphiCMAs.size() << " odd phi CMA:" << std::endl;
702 OddPhiCMAmap::const_iterator od;
703 for (od = m_oddphiCMAs.begin(); od != m_oddphiCMAs.end(); ++od) {
704 if (!obj)
705 (*od).second.Print(stream, detail);
706 else if (obj == (*od).second.number())
707 (*od).second.Print(stream, detail);
708 }
709 }
710
711 if (!printed) {
712 stream << std::endl;
713 stream << "No " << ele << " elements are present into this map!" << std::endl;
714 }
715}
const std::string & name() const
Definition BaseObject.h:23
const std::string & negative_sector() const
const std::string & positive_sector() const
int ev
Definition globals.cxx:25
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space

◆ sector_type()

int RPC_CondCabling::SectorLogicSetup::sector_type ( ) const
inline

Definition at line 85 of file SectorLogicSetup.h.

85{ return m_sector_type; }

◆ sectors()

const SECTORlist & RPC_CondCabling::SectorLogicSetup::sectors ( ) const
inline

Definition at line 87 of file SectorLogicSetup.h.

87{ return m_sectors; }

◆ SetPtoTrigRoads()

void SectorLogicSetup::SetPtoTrigRoads ( const TrigRoadsMap * RPC_trigroads)

Definition at line 847 of file SectorLogicSetup.cxx.

847{ m_trigroads = RPC_trigroads; }

◆ setup()

bool SectorLogicSetup::setup ( MsgStream & log)

Definition at line 42 of file SectorLogicSetup.cxx.

42 {
43 using sIter = StationMap::const_iterator;
44
45 bool RPCsetup = true;
47 for (sIter it = m_stations.begin(); it != m_stations.end(); ++it) {
48 int key = (*it).second * 100;
49 RPCmap::iterator lower = m_RPCs.lower_bound(key);
50 RPCmap::iterator upper = m_RPCs.upper_bound(key + 99);
51 int size = distance(lower, upper);
52 if (size) {
53 for (RPCmap::iterator rpc = lower; rpc != upper; ++rpc) RPCsetup &= (*rpc).second.setup(*this);
54 } else {
55 log << MSG::ERROR << no_elements("RPC", (*it).second) << endmsg;
56 RPCsetup = false;
57 }
58 }
59 bool WORsetup = true;
61 for (sIter it = m_stations.begin(); it != m_stations.end(); ++it) {
62 int key = (*it).second * 100;
63 WORmap::iterator lower = m_WORs.lower_bound(key);
64 WORmap::iterator upper = m_WORs.upper_bound(key + 99);
65 int size = distance(lower, upper);
66 if (size) {
67 for (WORmap::iterator wor = lower; wor != upper; ++wor) WORsetup &= (*wor).second.setup(*this);
68 } else {
69 log << MSG::ERROR << no_elements("WOR", (*it).second) << endmsg;
70 WORsetup = false;
71 }
72 }
73
74 bool EtaCMAsetup = true;
75 bool EvenPhiCMAsetup = true;
76 bool OddPhiCMAsetup = true;
78 if (!m_etaCMAs.empty()) {
79 SectorLogicSetup::EtaCMAmap::iterator it;
80 for (it = m_etaCMAs.begin(); it != m_etaCMAs.end(); ++it) { EtaCMAsetup &= (*it).second.setup(*this, log); }
81
82 } else {
83 log << MSG::ERROR << no_elements("EtaCMA", 0) << endmsg;
84 EtaCMAsetup = false;
85 }
86
87 if (!m_evenphiCMAs.empty()) {
88 SectorLogicSetup::EvenPhiCMAmap::iterator it;
89 for (it = m_evenphiCMAs.begin(); it != m_evenphiCMAs.end(); ++it) EvenPhiCMAsetup &= (*it).second.setup(*this, log);
90 }
91
92 if (!m_oddphiCMAs.empty()) {
93 SectorLogicSetup::OddPhiCMAmap::iterator it;
94 for (it = m_oddphiCMAs.begin(); it != m_oddphiCMAs.end(); ++it) OddPhiCMAsetup &= (*it).second.setup(*this, log);
95 }
96
97 return RPCsetup & WORsetup & EtaCMAsetup & EvenPhiCMAsetup & OddPhiCMAsetup;
98}
size_t size() const
Number of registered mappings.
std::string no_elements(const std::string &, int)

◆ side()

HalfType SectorLogicSetup::side ( ) const

Definition at line 841 of file SectorLogicSetup.cxx.

841 {
842 if (!m_negative_sector.empty() && m_positive_sector.empty()) return Negative;
843 if (m_negative_sector.empty() && !m_positive_sector.empty()) return Positive;
844 return NoHalf;
845}
@ NoHalf
Definition RPCdef.h:9
@ Positive
Definition RPCdef.h:9
@ Negative
Definition RPCdef.h:9

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22{ return m_tag; }
ObjectType m_tag
Definition BaseObject.h:15

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const SectorLogicSetup & setup )
friend

Definition at line 717 of file SectorLogicSetup.cxx.

717 {
718 setup.PrintElement(stream, 0, setup.name(), 0, false);
719 return stream;
720}

Member Data Documentation

◆ m_cosmic

bool RPC_CondCabling::SectorLogicSetup::m_cosmic
private

Definition at line 55 of file SectorLogicSetup.h.

◆ m_etaCMAs

EtaCMAmap RPC_CondCabling::SectorLogicSetup::m_etaCMAs
private

Definition at line 49 of file SectorLogicSetup.h.

◆ m_evenphiCMAs

EvenPhiCMAmap RPC_CondCabling::SectorLogicSetup::m_evenphiCMAs
private

Definition at line 50 of file SectorLogicSetup.h.

◆ m_layout

std::string RPC_CondCabling::SectorLogicSetup::m_layout
private

Definition at line 54 of file SectorLogicSetup.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_negative_sector

std::string RPC_CondCabling::SectorLogicSetup::m_negative_sector
private

Definition at line 40 of file SectorLogicSetup.h.

◆ m_oddphiCMAs

OddPhiCMAmap RPC_CondCabling::SectorLogicSetup::m_oddphiCMAs
private

Definition at line 51 of file SectorLogicSetup.h.

◆ m_online_database

std::string RPC_CondCabling::SectorLogicSetup::m_online_database
private

Definition at line 53 of file SectorLogicSetup.h.

◆ m_positive_sector

std::string RPC_CondCabling::SectorLogicSetup::m_positive_sector
private

Definition at line 39 of file SectorLogicSetup.h.

◆ m_RPCs

RPCmap RPC_CondCabling::SectorLogicSetup::m_RPCs
private

Definition at line 47 of file SectorLogicSetup.h.

◆ m_sector_type

int RPC_CondCabling::SectorLogicSetup::m_sector_type
private

Definition at line 42 of file SectorLogicSetup.h.

◆ m_sectors

SECTORlist RPC_CondCabling::SectorLogicSetup::m_sectors
private

Definition at line 43 of file SectorLogicSetup.h.

◆ m_stations

StationMap RPC_CondCabling::SectorLogicSetup::m_stations
private

Definition at line 45 of file SectorLogicSetup.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.

◆ m_trigroads

const std::map<std::string, std::string, std::less<> >* RPC_CondCabling::SectorLogicSetup::m_trigroads = nullptr
private

Definition at line 68 of file SectorLogicSetup.h.

◆ m_WORs

WORmap RPC_CondCabling::SectorLogicSetup::m_WORs
private

Definition at line 48 of file SectorLogicSetup.h.


The documentation for this class was generated from the following files: