CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPCTriggerCrate.cc
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
4 
5 //---------------------------------------------------------------------------
7  : m_TCGhostBusterSorter(triggerConfig) {
8  //m_TCGhostBusterSorter = tcGhostBusterSorter;
9  m_TriggerConfig = triggerConfig;
10  m_WasMuon = false;
11 
12  m_TCNumber = tcNum;
13 
14  for (int iTB = 0; iTB < triggerConfig->getTBsInTC(); iTB++)
15  m_TBsVec.push_back(RPCTriggerBoard(triggerConfig, iTB, tcNum));
16 }
17 //----------------------------------------
19  if (!m_WasMuon)
20  return L1RpcTBMuonsVec();
21 
22  L1RpcTBMuonsVec2 tbMuonsVec2;
23  for (unsigned int iTB = 0; iTB < m_TBsVec.size(); iTB++) {
24  tbMuonsVec2.push_back(m_TBsVec[iTB].runTBGB());
25  }
26 
27  m_WasMuon = false;
28 
29  if (m_TriggerConfig->getDebugLevel() != 0) {
30  for (unsigned int iTC = 0; iTC < tbMuonsVec2.size(); iTC++) {
31  for (unsigned int iTB = 0; iTB < tbMuonsVec2[iTC].size(); iTB++) {
32 #ifndef _STAND_ALONE
33  // LogDebug("RPCHwDebug") << "GB 1 " << iTB << " "
34  // <<tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel());
35  MuonsGrabber::Instance().addMuon(tbMuonsVec2[iTC][iTB], 1, -1, -1, iTB);
36 #else
37  std::cout << "GB 1 "
38  << "GB 1 " << iTB << " " << tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel())
39  << std::endl;
40 #endif //_STAND_ALONE
41  }
42  }
43  }
44 
45  return m_TCGhostBusterSorter.run(tbMuonsVec2);
46 }
47 
51  m_WasMuon = true;
52 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
virtual int getTBsInTC()=0
returns number og Trigger Boards in one Trigger Crate.
RPCTriggerCrate(RPCTriggerConfiguration *triggerConfig, int tcNum)
virtual int getTBNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)=0
Returns the index of TB (in TC) that should run given LogCone.
L1RpcTBMuonsVec run(L1RpcTBMuonsVec2 &tbMuonsVec)
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
RPCTCGhostBusterSorter m_TCGhostBusterSorter
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
RPCTriggerConfiguration * m_TriggerConfig
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
Definition: RPCTBMuon.h:219
L1RpcTBMuonsVec runTCGBSorter()
int m_TCNumber
The number of this TriggerCrate (0 - 11)
RPCConst::l1RpcConeCrdnts getConeCrdnts() const
Definition: RPCLogCone.cc:168
void runCone(const RPCLogCone &cone)
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
tuple cout
Definition: gather_cfg.py:144