ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
24namespace LVL1TGCTrigger {
25
26
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
void clockIn(int bunch, TGCDatabaseManager *db=0)
void clockIn(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey, int bidIn, bool process=true)
unsigned int getNumberOfSB(int type) const
Definition TGCSector.h:159
TGCHighPtBoard * getHPB(int type, int index) const
Definition TGCSector.h:147
TGCSectorLogic * getSL()
Definition TGCSector.h:65
unsigned int getNumberOfHPB(int type) const
Definition TGCSector.h:164
TGCSlaveBoard * getSB(int type, int index) const
Definition TGCSector.h:141
TGCPatchPanel * getPP(int type, int index) const
Definition TGCSector.h:135
LVL1TGC::TGCSide getSideId() const
Definition TGCSector.h:75
unsigned int getNumberOfPP(int type) const
Definition TGCSector.h:153
void startPatchPanel(TGCSector *sector, TGCDatabaseManager *db=0)
TGCTimingManager(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey)
void startHighPtBoard(TGCSector *sector)
const SG::ReadCondHandleKey< TGCTriggerData > & m_readCondKey
void startSectorLogic(TGCSector *sector)
void startSlaveBoard(TGCSector *sector)