CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
RPCTriggerCrate Class Reference

#include <RPCTriggerCrate.h>

Public Member Functions

 RPCTriggerCrate (RPCTriggerConfiguration *triggerConfig, int tcNum)
 
void runCone (const RPCLogCone &cone)
 
L1RpcTBMuonsVec runTCGBSorter ()
 

Private Attributes

std::vector< RPCTriggerBoardm_TBsVec
 Here TB belonging to thie TC are stored. More...
 
RPCTCGhostBusterSorter m_TCGhostBusterSorter
 
int m_TCNumber
 The number of this TriggerCrate (0 - 11) More...
 
RPCTriggerConfigurationm_TriggerConfig
 
bool m_WasMuon
 

Detailed Description

Class describing the Trigger Crate. In one Trigger Crate thera are Trigger Boards fro one sector.

Author
Karol Bunkowski (Warsaw)

Definition at line 21 of file RPCTriggerCrate.h.

Constructor & Destructor Documentation

RPCTriggerCrate::RPCTriggerCrate ( RPCTriggerConfiguration triggerConfig,
int  tcNum 
)

Definition at line 6 of file RPCTriggerCrate.cc.

References RPCTriggerConfiguration::getTBsInTC(), m_TBsVec, m_TCNumber, m_TriggerConfig, and m_WasMuon.

6  :
7  m_TCGhostBusterSorter(triggerConfig)
8 {
9  //m_TCGhostBusterSorter = tcGhostBusterSorter;
10  m_TriggerConfig = triggerConfig;
11  m_WasMuon = false;
12 
13  m_TCNumber = tcNum;
14 
15  for(int iTB = 0; iTB < triggerConfig->getTBsInTC(); iTB++)
16  m_TBsVec.push_back(RPCTriggerBoard(triggerConfig, iTB, tcNum));
17 }
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.
RPCTCGhostBusterSorter m_TCGhostBusterSorter
RPCTriggerConfiguration * m_TriggerConfig
int m_TCNumber
The number of this TriggerCrate (0 - 11)

Member Function Documentation

void RPCTriggerCrate::runCone ( const RPCLogCone cone)

Runs RPCTriggerBoard::runCone() for every TB. Cheks, if any non empty muons were found

Definition at line 53 of file RPCTriggerCrate.cc.

References RPCLogCone::getConeCrdnts(), RPCTriggerConfiguration::getTBNum(), m_TBsVec, m_TriggerConfig, and m_WasMuon.

53  {
55  m_WasMuon = true;
56 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
virtual int getTBNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)=0
Returns the index of TB (in TC) that should run given LogCone.
RPCTriggerConfiguration * m_TriggerConfig
RPCConst::l1RpcConeCrdnts getConeCrdnts() const
Definition: RPCLogCone.cc:194
void runCone(const RPCLogCone &cone)
L1RpcTBMuonsVec RPCTriggerCrate::runTCGBSorter ( )

If in runCone() any muons were found, runs RPCTriggerBoard::runTBGB() for every TB. Then runs RPCTCGhostBusterSorter::run().

Definition at line 19 of file RPCTriggerCrate.cc.

References MuonsGrabber::addMuon(), gather_cfg::cout, RPCTriggerConfiguration::getDebugLevel(), MuonsGrabber::Instance(), m_TBsVec, m_TCGhostBusterSorter, m_TriggerConfig, m_WasMuon, and RPCTCGhostBusterSorter::run().

19  {
20  if(!m_WasMuon)
21  return L1RpcTBMuonsVec();
22 
23  L1RpcTBMuonsVec2 tbMuonsVec2;
24  for(unsigned int iTB = 0; iTB < m_TBsVec.size(); iTB++) {
25  tbMuonsVec2.push_back(m_TBsVec[iTB].runTBGB());
26  }
27 
28  m_WasMuon = false;
29 
30  if ( m_TriggerConfig->getDebugLevel()!=0){
31 
32  for (unsigned int iTC = 0; iTC < tbMuonsVec2.size(); iTC++){
33  for (unsigned int iTB = 0; iTB < tbMuonsVec2[iTC].size(); iTB++){
34 #ifndef _STAND_ALONE
35  // LogDebug("RPCHwDebug") << "GB 1 " << iTB << " "
36  // <<tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel());
37  MuonsGrabber::Instance().addMuon(tbMuonsVec2[iTC][iTB], 1, -1, -1, iTB);
38 #else
39  std::cout << "GB 1 " << "GB 1 " << iTB << " "
40  <<tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel())
41  << std::endl;
42 #endif //_STAND_ALONE
43  }
44  }
45 
46  }
47 
48  return m_TCGhostBusterSorter.run(tbMuonsVec2);
49 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
L1RpcTBMuonsVec run(L1RpcTBMuonsVec2 &tbMuonsVec)
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:59
RPCTCGhostBusterSorter m_TCGhostBusterSorter
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:206
RPCTriggerConfiguration * m_TriggerConfig
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
Definition: RPCTBMuon.h:207
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
tuple cout
Definition: gather_cfg.py:41

Member Data Documentation

std::vector<RPCTriggerBoard> RPCTriggerCrate::m_TBsVec
private

Here TB belonging to thie TC are stored.

Definition at line 38 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().

RPCTCGhostBusterSorter RPCTriggerCrate::m_TCGhostBusterSorter
private

Definition at line 40 of file RPCTriggerCrate.h.

Referenced by runTCGBSorter().

int RPCTriggerCrate::m_TCNumber
private

The number of this TriggerCrate (0 - 11)

Definition at line 34 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate().

RPCTriggerConfiguration* RPCTriggerCrate::m_TriggerConfig
private

Definition at line 36 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().

bool RPCTriggerCrate::m_WasMuon
private

Definition at line 42 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().