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 70 of file L1RPCHwConfig.h.

Constructor & Destructor Documentation

L1RPCHwConfig::L1RPCHwConfig ( )

Definition at line 31 of file L1RPCHwConfig.cc.

32 {
33 }
L1RPCHwConfig::~L1RPCHwConfig ( )
virtual

Definition at line 40 of file L1RPCHwConfig.cc.

41 {
42 }

Member Function Documentation

void L1RPCHwConfig::dump ( void  ) const
inline

Definition at line 100 of file L1RPCHwConfig.h.

References gather_cfg::cout.

100  {
101  for(std::set<L1RPCDevCoords>::const_iterator it=m_disabledDevices.begin(); it!=m_disabledDevices.end();++it){
102  std::cout << it->toString() << std::endl;
103  }
104  };
std::set< L1RPCDevCoords > m_disabledDevices
void L1RPCHwConfig::enableAll ( bool  enable)

Definition at line 91 of file L1RPCHwConfig.cc.

References enableCrate().

91  {
92 
93  for (int seg = 0; seg<12; ++seg ) {
94  // std::cout << seg << " ";
95  enableCrate(seg,enable);
96  // std::cout << std::endl;
97  }
98 
99 
100 }
void enableCrate(int logSector, bool enable)
void L1RPCHwConfig::enableCrate ( int  logSector,
bool  enable 
)

Definition at line 79 of file L1RPCHwConfig.cc.

References enablePAC().

Referenced by enableAll(), and popcon::L1RPCHwConfigSourceHandler::getNewObjects().

79  {
80 
81  for (int tower = -16; tower < 17; ++tower){
82  for (int seg = 0; seg<12; ++seg ) {
83  enablePAC(tower, crate, seg, enable);
84  }
85  }
86 
87 
88 }
void enablePAC(int tower, int sector, int segment, bool enable)
void L1RPCHwConfig::enablePAC ( int  tower,
int  sector,
int  segment,
bool  enable 
)

Definition at line 45 of file L1RPCHwConfig.cc.

References m_disabledDevices.

Referenced by enableCrate(), enableTower(), enableTowerInCrate(), and popcon::L1RPCHwConfigSourceHandler::readHwConfig1().

46 {
47 
48  if (enable){
49 // std::cout << "+";
50  m_disabledDevices.erase(L1RPCDevCoords(tower, sector, segment)) ;
51  }
52  else{
53  // std::cout << "-";
54  m_disabledDevices.insert(L1RPCDevCoords(tower, sector, segment)) ;
55  }
56 
57 }
std::set< L1RPCDevCoords > m_disabledDevices
void L1RPCHwConfig::enableTower ( int  tower,
bool  enable 
)

Definition at line 59 of file L1RPCHwConfig.cc.

References enablePAC().

Referenced by popcon::L1RPCHwConfigSourceHandler::getNewObjects().

59  {
60 
61 
62  for (int sec = 0; sec <12 ; ++sec ){
63  for (int seg = 0; seg<12; ++seg ) {
64  enablePAC(tower,sec,seg,enable);
65 
66  }
67 
68  }
69 
70 
71 }
void enablePAC(int tower, int sector, int segment, bool enable)
void L1RPCHwConfig::enableTowerInCrate ( int  tower,
int  crate,
bool  enable 
)

Definition at line 73 of file L1RPCHwConfig.cc.

References enablePAC().

73  {
74  for (int seg = 0; seg<12; ++seg ) {
75  enablePAC(tower,crate,seg,enable);
76  }
77 }
void enablePAC(int tower, int sector, int segment, bool enable)
bool L1RPCHwConfig::isActive ( int  tower,
int  sector,
int  segment 
) const
inline

Definition at line 79 of file L1RPCHwConfig.h.

References L1RPCDevCoords::L1RPCDevCoords().

Referenced by popcon::L1RPCHwConfigSourceHandler::Compare2Configs(), and RPCConeBuilderFromES::getConesFromES().

80  {
81  return m_disabledDevices.find( L1RPCDevCoords(tower, sector, segment) )==m_disabledDevices.end();
82  };
std::set< L1RPCDevCoords > m_disabledDevices
bool L1RPCHwConfig::isActive ( int  tower,
int  PAC 
) const
inline

Definition at line 84 of file L1RPCHwConfig.h.

References Reconstruction_hiPF_cff::enable, and L1RPCDevCoords::L1RPCDevCoords().

85  {
86  return m_disabledDevices.end()==m_disabledDevices.find( L1RPCDevCoords(tower, PAC/12, PAC%12) );
87  };
std::set< L1RPCDevCoords > m_disabledDevices
template<class Archive >
void L1RPCHwConfig::serialize ( Archive &  ar,
const unsigned int  version 
)
private
int L1RPCHwConfig::size ( void  ) const
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 120 of file L1RPCHwConfig.h.

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

Definition at line 120 of file L1RPCHwConfig.h.

Member Data Documentation

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

Definition at line 104 of file L1RPCHwConfig.h.

Referenced by enablePAC().