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

const RPCPacDatagetPac (const RPCConst::l1RpcConeCrdnts &coneCrdnts) const override
 Returns pointer to m_PAC that should run given LogCone. The PACs are holded by L1PacManager. More...
 
int getTBNum (const RPCConst::l1RpcConeCrdnts &coneCrdnts) override
 Returns the index of TB (in TC) that should run given LogCone. More...
 
int getTBsInTC () override
 returns number og Trigger Boards in one Trigger Crate. More...
 
int getTCNum (const RPCConst::l1RpcConeCrdnts &coneCrdnts) override
 Returns the index of TC that should run given LogCone. More...
 
int getTCsCnt () override
 returns count of Trigger Crates in system. More...
 
int getTowerNumOnTb (const RPCConst::l1RpcConeCrdnts &coneCrdnts) override
 
int getTowsCntOnTB (int tbNum) override
 Returns the count of Towers (3 or 4), that are covered by given TB. More...
 
 RPCBasicTrigConfig ()
 Ctor. More...
 
 RPCBasicTrigConfig (RPCPacManager< RPCPacData > *pacManager)
 Ctor. More...
 
int towAddr2TowNum (int towAddr) override
 
int towNum2TowNum2Comp (int towNum) override
 
 ~RPCBasicTrigConfig () override
 
- 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] = {4, 4, 4, 3, 3, 3, 4, 4, 4}
 
static const int m_TRIGGER_CRATES_CNT = 12
 

Detailed Description

Definition at line 14 of file RPCBasicTrigConfig.h.

Constructor & Destructor Documentation

◆ RPCBasicTrigConfig() [1/2]

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

Ctor.

Definition at line 5 of file RPCBasicTrigConfig.cc.

5 { m_PacManager = pacManager; }

References m_PacManager.

◆ RPCBasicTrigConfig() [2/2]

RPCBasicTrigConfig::RPCBasicTrigConfig ( )

Ctor.

Definition at line 8 of file RPCBasicTrigConfig.cc.

8 { m_PacManager = nullptr; }

References m_PacManager.

◆ ~RPCBasicTrigConfig()

RPCBasicTrigConfig::~RPCBasicTrigConfig ( )
inlineoverride

Definition at line 51 of file RPCBasicTrigConfig.h.

51 {}

Member Function Documentation

◆ getPac()

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

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

Implements RPCTriggerConfiguration.

Definition at line 67 of file RPCBasicTrigConfig.cc.

67  {
68  return m_PacManager->getPac(coneCrdnts.m_Tower, coneCrdnts.m_LogSector, coneCrdnts.m_LogSegment);
69 }

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

◆ getTBNum()

int RPCBasicTrigConfig::getTBNum ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
overridevirtual

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

Implements RPCTriggerConfiguration.

Definition at line 71 of file RPCBasicTrigConfig.cc.

71  {
72  return m_TB_NUM_FOR_TOWER[RPCConst::ITOW_MAX + coneCrdnts.m_Tower];
73 }

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

Referenced by MuonsGrabber::writeDataForRelativeBX().

◆ getTBsInTC()

int RPCBasicTrigConfig::getTBsInTC ( )
overridevirtual

returns number og Trigger Boards in one Trigger Crate.

returns number og Trigger Boards in one Trigger Crate.

Implements RPCTriggerConfiguration.

Definition at line 36 of file RPCBasicTrigConfig.cc.

36 { return m_TB_IN_TC_CNT; }

References m_TB_IN_TC_CNT.

◆ getTCNum()

int RPCBasicTrigConfig::getTCNum ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
overridevirtual

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 44 of file RPCBasicTrigConfig.cc.

44 { return coneCrdnts.m_LogSector; }

References RPCConst::l1RpcConeCrdnts::m_LogSector.

Referenced by MuonsGrabber::writeDataForRelativeBX().

◆ getTCsCnt()

int RPCBasicTrigConfig::getTCsCnt ( )
overridevirtual

returns count of Trigger Crates in system.

returns count of Trigger Crates in system.

Implements RPCTriggerConfiguration.

Definition at line 29 of file RPCBasicTrigConfig.cc.

29 { return m_TRIGGER_CRATES_CNT; }

References m_TRIGGER_CRATES_CNT.

◆ getTowerNumOnTb()

int RPCBasicTrigConfig::getTowerNumOnTb ( const RPCConst::l1RpcConeCrdnts coneCrdnts)
overridevirtual

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

Implements RPCTriggerConfiguration.

Definition at line 63 of file RPCBasicTrigConfig.cc.

63  {
64  return m_TOWER_ON_TB[RPCConst::ITOW_MAX + coneCrdnts.m_Tower];
65 }

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

Referenced by MuonsGrabber::writeDataForRelativeBX().

◆ getTowsCntOnTB()

int RPCBasicTrigConfig::getTowsCntOnTB ( int  tbNum)
overridevirtual

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 50 of file RPCBasicTrigConfig.cc.

50 { return m_TOWERS_CNT_ON_TB[tbNum]; }

References m_TOWERS_CNT_ON_TB.

◆ towAddr2TowNum()

int RPCBasicTrigConfig::towAddr2TowNum ( int  towAddr)
overridevirtual

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 54 of file RPCBasicTrigConfig.cc.

54  {
55  if (m_TOW_ADDR_2_TOW_NUM[towAddr] == -99 || towAddr < 0 || towAddr > 35) {
56  throw RPCException("RPCBasicTrigConfig::towAddr2TowNum - wrong towAddr");
57  //edm::LogError("RPC")<< "RPCBasicTrigConfig::towAddr2TowNum - wrong towAddr";
58  }
59 
60  return m_TOW_ADDR_2_TOW_NUM[towAddr];
61 }

References m_TOW_ADDR_2_TOW_NUM.

◆ towNum2TowNum2Comp()

int RPCBasicTrigConfig::towNum2TowNum2Comp ( int  towNum)
overridevirtual

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 12 of file RPCBasicTrigConfig.cc.

12  {
13  if (towNum >= 0)
14  return towNum;
15  else
16  return 0x3F + towNum + 1;
17 }

Member Data Documentation

◆ m_PacManager

RPCPacManager<RPCPacData>* RPCBasicTrigConfig::m_PacManager
private

Definition at line 66 of file RPCBasicTrigConfig.h.

Referenced by getPac(), and RPCBasicTrigConfig().

◆ m_TB_IN_TC_CNT

const int RPCBasicTrigConfig::m_TB_IN_TC_CNT = 9
staticprivate

Definition at line 56 of file RPCBasicTrigConfig.h.

Referenced by getTBsInTC().

◆ m_TB_NUM_FOR_TOWER

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().

◆ m_TOW_ADDR_2_TOW_NUM

const int RPCBasicTrigConfig::m_TOW_ADDR_2_TOW_NUM
staticprivate

Definition at line 64 of file RPCBasicTrigConfig.h.

Referenced by towAddr2TowNum().

◆ m_TOWER_ON_TB

const int RPCBasicTrigConfig::m_TOWER_ON_TB
staticprivate

Definition at line 58 of file RPCBasicTrigConfig.h.

Referenced by getTowerNumOnTb().

◆ m_TOWERS_CNT_ON_TB

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

Definition at line 60 of file RPCBasicTrigConfig.h.

Referenced by getTowsCntOnTB().

◆ m_TRIGGER_CRATES_CNT

const int RPCBasicTrigConfig::m_TRIGGER_CRATES_CNT = 12
staticprivate

Definition at line 54 of file RPCBasicTrigConfig.h.

Referenced by getTCsCnt().

RPCConst::ITOW_MAX
Maximal number of abs(m_tower_number)
Definition: RPCConst.h:27
RPCPacManager::getPac
TPacType * getPac(int m_tower, int logSector, int logSegment) const
Definition: RPCPacManager.h:161
RPCConst::l1RpcConeCrdnts::m_Tower
int m_Tower
Definition: RPCConst.h:119
RPCBasicTrigConfig::m_TOWERS_CNT_ON_TB
static const int m_TOWERS_CNT_ON_TB[m_TB_IN_TC_CNT]
Definition: RPCBasicTrigConfig.h:60
RPCBasicTrigConfig::m_TB_NUM_FOR_TOWER
static const int m_TB_NUM_FOR_TOWER[2 *RPCConst::ITOW_MAX+1]
Definition: RPCBasicTrigConfig.h:62
RPCBasicTrigConfig::m_TRIGGER_CRATES_CNT
static const int m_TRIGGER_CRATES_CNT
Definition: RPCBasicTrigConfig.h:54
RPCBasicTrigConfig::m_TOW_ADDR_2_TOW_NUM
static const int m_TOW_ADDR_2_TOW_NUM[36]
Definition: RPCBasicTrigConfig.h:64
RPCConst::l1RpcConeCrdnts::m_LogSegment
int m_LogSegment
Definition: RPCConst.h:121
RPCBasicTrigConfig::m_TB_IN_TC_CNT
static const int m_TB_IN_TC_CNT
Definition: RPCBasicTrigConfig.h:56
RPCException
Definition: RPCException.h:21
RPCBasicTrigConfig::m_TOWER_ON_TB
static const int m_TOWER_ON_TB[2 *RPCConst::ITOW_MAX+1+1]
Definition: RPCBasicTrigConfig.h:58
RPCBasicTrigConfig::m_PacManager
RPCPacManager< RPCPacData > * m_PacManager
Definition: RPCBasicTrigConfig.h:66
RPCConst::l1RpcConeCrdnts::m_LogSector
int m_LogSector
Definition: RPCConst.h:120