CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
RPCBasicTrigConfig Class Reference

#include <RPCBasicTrigConfig.h>

Inheritance diagram for RPCBasicTrigConfig:
RPCTriggerConfiguration

Public Member Functions

virtual const RPCPacDatagetPac (const RPCConst::l1RpcConeCrdnts &coneCrdnts) const
 Returns pointer to m_PAC that should run given LogCone. The PACs are holded by L1PacManager. More...
 
virtual int getTBNum (const RPCConst::l1RpcConeCrdnts &coneCrdnts)
 Returns the index of TB (in TC) that should run given LogCone. More...
 
virtual int getTBsInTC ()
 returns number og Trigger Boards in one Trigger Crate. More...
 
virtual int getTCNum (const RPCConst::l1RpcConeCrdnts &coneCrdnts)
 Returns the index of TC that should run given LogCone. More...
 
virtual int getTCsCnt ()
 returns count of Trigger Crates in system. More...
 
virtual int getTowerNumOnTb (const RPCConst::l1RpcConeCrdnts &coneCrdnts)
 
virtual int getTowsCntOnTB (int tbNum)
 Returns the count of Towers (3 or 4), that are covered by given TB. More...
 
 RPCBasicTrigConfig (RPCPacManager< RPCPacData > *pacManager)
 Ctor. More...
 
 RPCBasicTrigConfig ()
 Ctor. More...
 
virtual int towAddr2TowNum (int towAddr)
 
virtual int towNum2TowNum2Comp (int towNum)
 
virtual ~RPCBasicTrigConfig ()
 
- Public Member Functions inherited from RPCTriggerConfiguration
int getDebugLevel () const
 
void setDebugLevel (int debgLevel)
 
virtual ~RPCTriggerConfiguration ()=default
 

Private Attributes

RPCPacManager< RPCPacData > * m_PacManager
 

Static Private Attributes

static const int m_TB_IN_TC_CNT = 9
 
static const int m_TB_NUM_FOR_TOWER [2 *RPCConst::ITOW_MAX+1]
 
static const int m_TOW_ADDR_2_TOW_NUM [36]
 
static const int m_TOWER_ON_TB [2 *RPCConst::ITOW_MAX+1+1]
 
static const int m_TOWERS_CNT_ON_TB [m_TB_IN_TC_CNT]
 
static const int m_TRIGGER_CRATES_CNT = 12
 

Detailed Description

Definition at line 14 of file RPCBasicTrigConfig.h.

Constructor & Destructor Documentation

RPCBasicTrigConfig::RPCBasicTrigConfig ( RPCPacManager< RPCPacData > *  pacManager)

Ctor.

Definition at line 5 of file RPCBasicTrigConfig.cc.

References m_PacManager.

5  {
6  m_PacManager = pacManager;
7 }
RPCPacManager< RPCPacData > * m_PacManager
RPCBasicTrigConfig::RPCBasicTrigConfig ( )

Ctor.

Definition at line 10 of file RPCBasicTrigConfig.cc.

References m_PacManager.

10  {
11  m_PacManager = 0;
12 }
RPCPacManager< RPCPacData > * m_PacManager
virtual RPCBasicTrigConfig::~RPCBasicTrigConfig ( )
inlinevirtual

Definition at line 51 of file RPCBasicTrigConfig.h.

51 {}

Member Function Documentation

const RPCPacData * RPCBasicTrigConfig::getPac ( const RPCConst::l1RpcConeCrdnts coneCrdnts) const
virtual

Returns pointer to m_PAC that should run given LogCone. The PACs are holded by L1PacManager.

Implements RPCTriggerConfiguration.

Definition at line 77 of file RPCBasicTrigConfig.cc.

References RPCPacManager< TPacType >::getPac(), RPCConst::l1RpcConeCrdnts::m_LogSector, RPCConst::l1RpcConeCrdnts::m_LogSegment, m_PacManager, and RPCConst::l1RpcConeCrdnts::m_Tower.

77  {
78  return m_PacManager->getPac(coneCrdnts.m_Tower, coneCrdnts.m_LogSector, coneCrdnts.m_LogSegment);
79 }
TPacType * getPac(int m_tower, int logSector, int logSegment) const
RPCPacManager< RPCPacData > * m_PacManager
int RPCBasicTrigConfig::getTBNum ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
virtual

Returns the index of TB (in TC) that should run given LogCone.

Implements RPCTriggerConfiguration.

Definition at line 81 of file RPCBasicTrigConfig.cc.

References RPCConst::ITOW_MAX, m_TB_IN_TC_CNT, m_TB_NUM_FOR_TOWER, m_TOW_ADDR_2_TOW_NUM, RPCConst::l1RpcConeCrdnts::m_Tower, m_TOWER_ON_TB, m_TOWERS_CNT_ON_TB, and m_TRIGGER_CRATES_CNT.

81  {
82  return m_TB_NUM_FOR_TOWER[RPCConst::ITOW_MAX + coneCrdnts.m_Tower];
83 }
static const int m_TB_NUM_FOR_TOWER[2 *RPCConst::ITOW_MAX+1]
Maximal number of abs(m_tower_number)
Definition: RPCConst.h:29
int RPCBasicTrigConfig::getTBsInTC ( )
virtual

returns number og Trigger Boards in one Trigger Crate.

returns number og Trigger Boards in one Trigger Crate.

Implements RPCTriggerConfiguration.

Definition at line 40 of file RPCBasicTrigConfig.cc.

References m_TB_IN_TC_CNT.

40 { return m_TB_IN_TC_CNT; }
static const int m_TB_IN_TC_CNT
int RPCBasicTrigConfig::getTCNum ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
virtual

Returns the index of TC that should run given LogCone.

Returns the index of TC that should run given LogCone.

Implements RPCTriggerConfiguration.

Definition at line 48 of file RPCBasicTrigConfig.cc.

References RPCConst::l1RpcConeCrdnts::m_LogSector.

48  {
49  return coneCrdnts.m_LogSector;
50 }
int RPCBasicTrigConfig::getTCsCnt ( )
virtual

returns count of Trigger Crates in system.

returns count of Trigger Crates in system.

Implements RPCTriggerConfiguration.

Definition at line 33 of file RPCBasicTrigConfig.cc.

References m_TRIGGER_CRATES_CNT.

33 { return m_TRIGGER_CRATES_CNT; }
static const int m_TRIGGER_CRATES_CNT
int RPCBasicTrigConfig::getTowerNumOnTb ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
virtual

One TB covers 3 or 4 Towers. The function returns the index of m_tower on TB.

Implements RPCTriggerConfiguration.

Definition at line 73 of file RPCBasicTrigConfig.cc.

References RPCConst::ITOW_MAX, RPCConst::l1RpcConeCrdnts::m_Tower, and m_TOWER_ON_TB.

73  {
74  return m_TOWER_ON_TB[RPCConst::ITOW_MAX + coneCrdnts.m_Tower];
75 }
static const int m_TOWER_ON_TB[2 *RPCConst::ITOW_MAX+1+1]
Maximal number of abs(m_tower_number)
Definition: RPCConst.h:29
int RPCBasicTrigConfig::getTowsCntOnTB ( int  tbNum)
virtual

Returns the count of Towers (3 or 4), that are covered by given TB.

Returns the count of Towers (3 or 4), that are covered by given TB.

Implements RPCTriggerConfiguration.

Definition at line 56 of file RPCBasicTrigConfig.cc.

References m_TOWERS_CNT_ON_TB.

56  {
57  return m_TOWERS_CNT_ON_TB[tbNum];
58 }
static const int m_TOWERS_CNT_ON_TB[m_TB_IN_TC_CNT]
int RPCBasicTrigConfig::towAddr2TowNum ( int  towAddr)
virtual

Converts TC GB-Sorter input m_tower address <0...35> ("m_tower number natural") to m_tower number <-16...0...16> TC GB-Sorter input m_tower address is 8 bits: [7...2] TB num, [1...0] m_tower num on TB.

Implements RPCTriggerConfiguration.

Definition at line 62 of file RPCBasicTrigConfig.cc.

References m_TOW_ADDR_2_TOW_NUM.

62  {
63 
64  if (m_TOW_ADDR_2_TOW_NUM[towAddr] == -99 || towAddr < 0 || towAddr > 35){
65  throw RPCException("RPCBasicTrigConfig::towAddr2TowNum - wrong towAddr");
66  //edm::LogError("RPC")<< "RPCBasicTrigConfig::towAddr2TowNum - wrong towAddr";
67  }
68 
69 
70  return m_TOW_ADDR_2_TOW_NUM[towAddr];
71 }
static const int m_TOW_ADDR_2_TOW_NUM[36]
int RPCBasicTrigConfig::towNum2TowNum2Comp ( int  towNum)
virtual

Converts TC GB-Sorter output m_tower address <0...31> ("m_tower number continous") to m_tower number 2'complement

Implements RPCTriggerConfiguration.

Definition at line 16 of file RPCBasicTrigConfig.cc.

16  {
17  if(towNum >= 0)
18  return towNum;
19  else
20  return 0x3F + towNum + 1;
21 }

Member Data Documentation

RPCPacManager<RPCPacData>* RPCBasicTrigConfig::m_PacManager
private

Definition at line 66 of file RPCBasicTrigConfig.h.

Referenced by getPac(), and RPCBasicTrigConfig().

const int RPCBasicTrigConfig::m_TB_IN_TC_CNT = 9
staticprivate

Definition at line 56 of file RPCBasicTrigConfig.h.

Referenced by getTBNum(), and getTBsInTC().

const int RPCBasicTrigConfig::m_TB_NUM_FOR_TOWER
staticprivate
Initial value:
= {
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4,4,4,5,5,5,6,6,6,6,7, 7, 7, 7, 8, 8, 8, 8
}

Definition at line 62 of file RPCBasicTrigConfig.h.

Referenced by getTBNum().

const int RPCBasicTrigConfig::m_TOW_ADDR_2_TOW_NUM
staticprivate
Initial value:
= {
-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5, -4, -3, -2,-99, -1, 0,
1,-99, 2, 3, 4,-99, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
}

Definition at line 64 of file RPCBasicTrigConfig.h.

Referenced by getTBNum(), and towAddr2TowNum().

const int RPCBasicTrigConfig::m_TOWER_ON_TB
staticprivate
Initial value:
= {
0, 1, 2, 3,
0, 1, 2, 3,
0, 1, 2, 3,
0, 1, 2,
0, 1, 2,
0, 1, 2,
0, 1, 2, 3,
0, 1, 2, 3,
0, 1, 2, 3,
0
}

Definition at line 58 of file RPCBasicTrigConfig.h.

Referenced by getTBNum(), and getTowerNumOnTb().

const int RPCBasicTrigConfig::m_TOWERS_CNT_ON_TB
staticprivate
Initial value:
= {
4, 4, 4, 3, 3, 3, 4, 4, 4
}

Definition at line 60 of file RPCBasicTrigConfig.h.

Referenced by getTBNum(), and getTowsCntOnTB().

const int RPCBasicTrigConfig::m_TRIGGER_CRATES_CNT = 12
staticprivate

Definition at line 54 of file RPCBasicTrigConfig.h.

Referenced by getTBNum(), and getTCsCnt().