CMS 3D CMS Logo

L1RPCHwConfig Class Reference

Description: Contains multiple BX triggering info. More...

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

List of all members.

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)
int getFirstBX () const
int getLastBX () const
bool isActive (int tower, int PAC) const
bool isActive (int tower, int sector, int segment) const
 L1RPCHwConfig ()
void setFirstBX (int bx)
void setLastBX (int bx)
int size () const
virtual ~L1RPCHwConfig ()

Private Attributes

std::set< L1RPCDevCoordsm_disabledDevices
int m_firstBX
int m_lastBX


Detailed Description

Description: Contains multiple BX triggering info.

Also info about disabled devices

Usage: <usage>

Definition at line 66 of file L1RPCHwConfig.h.


Constructor & Destructor Documentation

L1RPCHwConfig::L1RPCHwConfig (  ) 

Definition at line 31 of file L1RPCHwConfig.cc.

00032 {
00033 }

L1RPCHwConfig::~L1RPCHwConfig (  )  [virtual]

Definition at line 40 of file L1RPCHwConfig.cc.

00041 {
00042 }


Member Function Documentation

void L1RPCHwConfig::dump ( void   )  const [inline]

Definition at line 96 of file L1RPCHwConfig.h.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), it, and m_disabledDevices.

00096                         {
00097          for(std::set<L1RPCDevCoords>::const_iterator it=m_disabledDevices.begin(); it!=m_disabledDevices.end();++it){
00098            std::cout << it->toString() << std::endl;
00099          }
00100       };

void L1RPCHwConfig::enableAll ( bool  enable  ) 

Definition at line 91 of file L1RPCHwConfig.cc.

References enableCrate(), and seg.

00091                                         {
00092 
00093    for (int seg = 0; seg<12; ++seg ) {
00094   //     std::cout <<  seg << " ";
00095        enableCrate(seg,enable);
00096   //     std::cout << std::endl; 
00097    }
00098 
00099 
00100 }

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

Definition at line 79 of file L1RPCHwConfig.cc.

References enablePAC(), and seg.

Referenced by enableAll().

00079                                                       {
00080 
00081   for (int tower = -16; tower < 17; ++tower){
00082      for (int seg = 0; seg<12; ++seg ) {
00083          enablePAC(tower, crate, seg, enable);
00084      }
00085   }
00086 
00087 
00088 }

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(), popcon::L1RPCHwConfigSourceHandler::readHwConfig0(), and popcon::L1RPCHwConfigSourceHandler::readHwConfig1().

00046 {
00047 
00048  if (enable){
00049 //  std::cout << "+";
00050   m_disabledDevices.erase(L1RPCDevCoords(tower, sector, segment)) ; 
00051  }
00052  else{
00053  // std::cout << "-";
00054   m_disabledDevices.insert(L1RPCDevCoords(tower, sector, segment)) ; 
00055  }
00056 
00057 }

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

Definition at line 59 of file L1RPCHwConfig.cc.

References enablePAC(), and seg.

00059                                                       {
00060 
00061 
00062   for (int sec = 0; sec <12 ; ++sec  ){
00063     for (int seg = 0; seg<12; ++seg ) {
00064      enablePAC(tower,sec,seg,enable);
00065 
00066     }
00067 
00068   }
00069 
00070 
00071 }

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

Definition at line 73 of file L1RPCHwConfig.cc.

References enablePAC(), and seg.

00073                                                                        {
00074     for (int seg = 0; seg<12; ++seg ) {
00075       enablePAC(tower,crate,seg,enable);
00076     }
00077 }

int L1RPCHwConfig::getFirstBX (  )  const [inline]

Definition at line 102 of file L1RPCHwConfig.h.

References m_firstBX.

00102 {return m_firstBX;};

int L1RPCHwConfig::getLastBX (  )  const [inline]

Definition at line 103 of file L1RPCHwConfig.h.

References m_lastBX.

00103 {return m_lastBX;};

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

Definition at line 80 of file L1RPCHwConfig.h.

References m_disabledDevices.

00081            {
00082              return m_disabledDevices.end()==m_disabledDevices.find( L1RPCDevCoords(tower, PAC/12, PAC%12) ); 
00083            };

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

Definition at line 75 of file L1RPCHwConfig.h.

References m_disabledDevices.

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

00076            {
00077              return m_disabledDevices.find( L1RPCDevCoords(tower, sector, segment) )==m_disabledDevices.end(); 
00078            };

void L1RPCHwConfig::setFirstBX ( int  bx  )  [inline]

Definition at line 105 of file L1RPCHwConfig.h.

References m_firstBX.

00105 { m_firstBX = bx;};

void L1RPCHwConfig::setLastBX ( int  bx  )  [inline]

Definition at line 106 of file L1RPCHwConfig.h.

References m_lastBX.

00106 {  m_lastBX = bx;};

int L1RPCHwConfig::size ( void   )  const [inline]

Definition at line 95 of file L1RPCHwConfig.h.

References m_disabledDevices.

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

00095 {return m_disabledDevices.size(); } ;


Member Data Documentation

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

Definition at line 118 of file L1RPCHwConfig.h.

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

int L1RPCHwConfig::m_firstBX [private]

Definition at line 106 of file L1RPCHwConfig.h.

Referenced by getFirstBX(), and setFirstBX().

int L1RPCHwConfig::m_lastBX [private]

Definition at line 117 of file L1RPCHwConfig.h.

Referenced by getLastBX(), and setLastBX().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:59 2009 for CMSSW by  doxygen 1.5.4