CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
L1RPCHwConfig Class Reference

#include <CondFormats/RPCObjects/interface/L1RPCHwConfig.h>

Public Member Functions

void dump () const
 
void enableAll (bool enable)
 
void enableCrate (int logSector, bool enable)
 
void enablePAC (int tower, int sector, int segment, bool enable)
 
void enableTower (int tower, bool enable)
 
void enableTowerInCrate (int tower, int crate, bool enable)
 
bool isActive (int tower, int sector, int segment) const
 
bool isActive (int tower, int PAC) const
 
 L1RPCHwConfig ()
 
int size () const
 
virtual ~L1RPCHwConfig ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::set< L1RPCDevCoordsm_disabledDevices
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Contains multiple BX triggering info. Also info about disabled devices

Usage: <usage>

Definition at line 65 of file L1RPCHwConfig.h.

Constructor & Destructor Documentation

◆ L1RPCHwConfig()

L1RPCHwConfig::L1RPCHwConfig ( )

Definition at line 31 of file L1RPCHwConfig.cc.

31 {}

◆ ~L1RPCHwConfig()

L1RPCHwConfig::~L1RPCHwConfig ( )
virtual

Definition at line 38 of file L1RPCHwConfig.cc.

38 {}

Member Function Documentation

◆ dump()

void L1RPCHwConfig::dump ( void  ) const
inline

Definition at line 89 of file L1RPCHwConfig.h.

References gather_cfg::cout, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_disabledDevices.

89  {
90  for (std::set<L1RPCDevCoords>::const_iterator it = m_disabledDevices.begin(); it != m_disabledDevices.end(); ++it) {
91  std::cout << it->toString() << std::endl;
92  }
93  };
std::set< L1RPCDevCoords > m_disabledDevices
Definition: L1RPCHwConfig.h:93

◆ enableAll()

void L1RPCHwConfig::enableAll ( bool  enable)

Definition at line 72 of file L1RPCHwConfig.cc.

References DiMuonV_cfg::enable, and enableCrate().

72  {
73  for (int seg = 0; seg < 12; ++seg) {
74  // std::cout << seg << " ";
75  enableCrate(seg, enable);
76  // std::cout << std::endl;
77  }
78 }
void enableCrate(int logSector, bool enable)
enable
Messages.
Definition: DiMuonV_cfg.py:93

◆ enableCrate()

void L1RPCHwConfig::enableCrate ( int  logSector,
bool  enable 
)

Definition at line 64 of file L1RPCHwConfig.cc.

References FCDTask_cfi::crate, DiMuonV_cfg::enable, enablePAC(), and l1tHGCalTowerProducer_cfi::tower.

Referenced by enableAll().

64  {
65  for (int tower = -16; tower < 17; ++tower) {
66  for (int seg = 0; seg < 12; ++seg) {
67  enablePAC(tower, crate, seg, enable);
68  }
69  }
70 }
enable
Messages.
Definition: DiMuonV_cfg.py:93
void enablePAC(int tower, int sector, int segment, bool enable)

◆ enablePAC()

void L1RPCHwConfig::enablePAC ( int  tower,
int  sector,
int  segment,
bool  enable 
)

Definition at line 40 of file L1RPCHwConfig.cc.

References DiMuonV_cfg::enable, m_disabledDevices, nano_mu_digi_cff::sector, and l1tHGCalTowerProducer_cfi::tower.

Referenced by enableCrate(), enableTower(), and enableTowerInCrate().

40  {
41  if (enable) {
42  // std::cout << "+";
43  m_disabledDevices.erase(L1RPCDevCoords(tower, sector, segment));
44  } else {
45  // std::cout << "-";
46  m_disabledDevices.insert(L1RPCDevCoords(tower, sector, segment));
47  }
48 }
enable
Messages.
Definition: DiMuonV_cfg.py:93
std::set< L1RPCDevCoords > m_disabledDevices
Definition: L1RPCHwConfig.h:93

◆ enableTower()

void L1RPCHwConfig::enableTower ( int  tower,
bool  enable 
)

Definition at line 50 of file L1RPCHwConfig.cc.

References DiMuonV_cfg::enable, enablePAC(), fileinputsource_cfi::sec, and l1tHGCalTowerProducer_cfi::tower.

50  {
51  for (int sec = 0; sec < 12; ++sec) {
52  for (int seg = 0; seg < 12; ++seg) {
53  enablePAC(tower, sec, seg, enable);
54  }
55  }
56 }
enable
Messages.
Definition: DiMuonV_cfg.py:93
void enablePAC(int tower, int sector, int segment, bool enable)

◆ enableTowerInCrate()

void L1RPCHwConfig::enableTowerInCrate ( int  tower,
int  crate,
bool  enable 
)

Definition at line 58 of file L1RPCHwConfig.cc.

References FCDTask_cfi::crate, DiMuonV_cfg::enable, enablePAC(), and l1tHGCalTowerProducer_cfi::tower.

58  {
59  for (int seg = 0; seg < 12; ++seg) {
60  enablePAC(tower, crate, seg, enable);
61  }
62 }
enable
Messages.
Definition: DiMuonV_cfg.py:93
void enablePAC(int tower, int sector, int segment, bool enable)

◆ isActive() [1/2]

bool L1RPCHwConfig::isActive ( int  tower,
int  sector,
int  segment 
) const
inline

◆ isActive() [2/2]

bool L1RPCHwConfig::isActive ( int  tower,
int  PAC 
) const
inline

Definition at line 74 of file L1RPCHwConfig.h.

References m_disabledDevices, and l1tHGCalTowerProducer_cfi::tower.

74  {
75  return m_disabledDevices.end() == m_disabledDevices.find(L1RPCDevCoords(tower, PAC / 12, PAC % 12));
76  };
std::set< L1RPCDevCoords > m_disabledDevices
Definition: L1RPCHwConfig.h:93

◆ serialize()

template<class Archive >
void L1RPCHwConfig::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ size()

int L1RPCHwConfig::size ( void  ) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 106 of file L1RPCHwConfig.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 106 of file L1RPCHwConfig.h.

Member Data Documentation

◆ m_disabledDevices

std::set<L1RPCDevCoords> L1RPCHwConfig::m_disabledDevices
private

Definition at line 93 of file L1RPCHwConfig.h.

Referenced by dump(), enablePAC(), isActive(), and size().