ATLAS Offline Software
TGCTimingManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TrigT1TGC/TGCSector.h"
16 
17 #include "GaudiKernel/ISvcLocator.h"
18 #include "GaudiKernel/Bootstrap.h"
19 #include "GaudiKernel/MsgStream.h"
20 #include "GaudiKernel/IMessageSvc.h"
21 
22 #include <iostream>
23 
24 namespace LVL1TGCTrigger {
25 
26 
28  : m_bunchCounter(0),
29  m_readCondKey (readCondKey)
30 {
31 }
32 
34 {
35 #ifdef TGCDEBUG
36  std::cout << " Start PatchPanel "
37  << "or sector# " << sector->getSideId() << ":"
38  << sector->getOctantId() << ":"
39  << sector->getModuleId()
40  << std::endl;
41 #endif
42 
43  // start BID by first clockIn, start OrLogic by second clockIn.
44  for( int iClk=0; iClk<2; iClk+=1) {
45  for(int j=0; j<TGCSector::NumberOfPatchPanelType; j+=1) {
46  for (unsigned int i=0; i<sector->getNumberOfPP(j); i+=1) {
47  TGCPatchPanel *pp = sector->getPP(j,i);
48  if(pp) pp->clockIn(m_bunchCounter, db);
49  }
50  }
51  }
52 }
53 
55 {
56 #ifdef TGCDEBUG
57  std::cout << " Start SlaveBoard "
58  << "for sector# " << sector->getSideId() << ":"
59  << sector->getOctantId() << ":"
60  << sector->getModuleId()
61  << std::endl;
62 #endif
63 
64  for(int j=0; j<NumberOfSlaveBoardType; j+=1){
65  for(unsigned int i=0; i<sector->getNumberOfSB(j); i+=1){
66  TGCSlaveBoard* sb = sector->getSB(j,i);
67  if(sb)sb->clockIn(m_bunchCounter);
68  }
69  }
70 }
71 
73 {
74  if(sector->hasHit() == false) return;
75 
76  // collect input signals by 1st clockIn,
77  // perform coincidence by 2nd clockIn.
78  for(int iClk=0; iClk<2; iClk+=1) {
79  for(int j=0; j<TGCSector::NumberOfHighPtBoardType; j+=1) {
80  for(unsigned int i=0; i<sector->getNumberOfHPB(j); i+=1) {
81  sector->getHPB(j,i)->clockIn(m_bunchCounter);
82  }
83  }
84  }
85 }
86 
88 {
89  TGCSectorLogic* sl= sector->getSL();
90 
91  if(sl!=0) sl->clockIn(m_readCondKey, m_bunchCounter, sector->hasHit());
92 }
93 
94 } //end of namespace bracket
LVL1TGCTrigger::TGCSector
Definition: TGCSector.h:32
LVL1TGCTrigger::TGCTimingManager::m_readCondKey
const SG::ReadCondHandleKey< TGCTriggerData > & m_readCondKey
Definition: TGCTimingManager.h:33
TGCStripHighPtBoard.h
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCSector::getNumberOfHPB
unsigned int getNumberOfHPB(int type) const
Definition: TGCSector.h:165
LVL1TGCTrigger::TGCTimingManager::startSectorLogic
void startSectorLogic(TGCSector *sector)
Definition: TGCTimingManager.cxx:87
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
LVL1TGCTrigger::TGCSector::getModuleId
int getModuleId() const
Definition: TGCSector.h:78
TGCSector.h
LVL1TGCTrigger::TGCTimingManager::startSlaveBoard
void startSlaveBoard(TGCSector *sector)
Definition: TGCTimingManager.cxx:54
LVL1TGCTrigger::TGCTimingManager::m_bunchCounter
int m_bunchCounter
Definition: TGCTimingManager.h:29
LVL1TGCTrigger::TGCSector::getSB
TGCSlaveBoard * getSB(int type, int index) const
Definition: TGCSector.h:142
TGCDatabaseManager.h
TGCSlaveBoard.h
LVL1TGCTrigger::TGCTimingManager::startHighPtBoard
void startHighPtBoard(TGCSector *sector)
Definition: TGCTimingManager.cxx:72
LVL1TGCTrigger::TGCSlaveBoard
Definition: TGCSlaveBoard.h:22
LVL1TGCTrigger::TGCSector::getSideId
LVL1TGC::TGCSide getSideId() const
Definition: TGCSector.h:76
LVL1TGCTrigger::TGCSector::getSL
TGCSectorLogic * getSL()
Definition: TGCSector.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
TGCWireHighPtBoard.h
TGCDoubletSB.h
LVL1TGCTrigger::TGCSector::getNumberOfPP
unsigned int getNumberOfPP(int type) const
Definition: TGCSector.h:154
LVL1TGCTrigger::TGCSector::getPP
TGCPatchPanel * getPP(int type, int index) const
Definition: TGCSector.h:136
TGCWireTripletSB.h
TGCStripTripletSB.h
TGCSectorLogic.h
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCTimingManager::startPatchPanel
void startPatchPanel(TGCSector *sector, TGCDatabaseManager *db=0)
Definition: TGCTimingManager.cxx:33
LVL1TGCTrigger::TGCHighPtBoard::clockIn
void clockIn(int bidIn)
Definition: TGCHighPtBoard.cxx:77
LVL1TGCTrigger::TGCDatabaseManager
Definition: TGCDatabaseManager.h:39
keylayer_zslicemap.sb
sb
Definition: keylayer_zslicemap.py:192
LVL1TGCTrigger::TGCSectorLogic::clockIn
void clockIn(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey, int bidIn, bool process=true)
Definition: TGCSectorLogic.cxx:132
LVL1TGCTrigger::TGCPatchPanel::clockIn
void clockIn(int bunch, TGCDatabaseManager *db=0)
Definition: TGCPatchPanel.cxx:179
LVL1TGCTrigger::TGCPatchPanel
Definition: TGCPatchPanel.h:38
LVL1TGCTrigger::TGCSectorLogic
Definition: TGCSectorLogic.h:42
SG::ReadCondHandleKey< TGCTriggerData >
LVL1TGCTrigger::TGCTimingManager::TGCTimingManager
TGCTimingManager(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey)
Definition: TGCTimingManager.cxx:27
LVL1TGCTrigger::TGCSector::getOctantId
int getOctantId() const
Definition: TGCSector.h:77
LVL1TGCTrigger::TGCSector::hasHit
bool hasHit() const
Definition: TGCSector.h:128
LVL1TGCTrigger::TGCSector::getNumberOfSB
unsigned int getNumberOfSB(int type) const
Definition: TGCSector.h:160
LVL1TGCTrigger::TGCSector::NumberOfHighPtBoardType
@ NumberOfHighPtBoardType
Definition: TGCSector.h:34
TGCPatchPanel.h
TGCHighPtBoard.h
LVL1TGCTrigger::TGCSector::getHPB
TGCHighPtBoard * getHPB(int type, int index) const
Definition: TGCSector.h:148
LVL1TGCTrigger::TGCSector::NumberOfPatchPanelType
@ NumberOfPatchPanelType
Definition: TGCSector.h:37