CMS 3D CMS Logo

L1RPCHwConfig.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RPCObjects
4 // Class : L1RPCHwConfig
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Wed Apr 9 13:48:10 CEST 2008
11 // $Id$
12 //
13 
14 // system include files
15 
16 // user include files
18 
19 #include <iostream>
20 //
21 // constants, enums and typedefs
22 //
23 
24 //
25 // static data member definitions
26 //
27 
28 //
29 // constructors and destructor
30 //
32 {
33 }
34 
35 // L1RPCHwConfig::L1RPCHwConfig(const L1RPCHwConfig& rhs)
36 // {
37 // // do actual copying here;
38 // }
39 
41 {
42 }
43 
44 
45 void L1RPCHwConfig::enablePAC(int tower, int sector, int segment, bool enable)
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 }
58 
59 void L1RPCHwConfig::enableTower(int tower, bool enable) {
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 }
72 
73 void L1RPCHwConfig::enableTowerInCrate(int tower, int crate, bool enable){
74  for (int seg = 0; seg<12; ++seg ) {
75  enablePAC(tower,crate,seg,enable);
76  }
77 }
78 
79 void L1RPCHwConfig::enableCrate(int crate, bool enable) {
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 }
89 
90 
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 enableTower(int tower, bool enable)
void enableCrate(int logSector, bool enable)
virtual ~L1RPCHwConfig()
void enableAll(bool enable)
std::set< L1RPCDevCoords > m_disabledDevices
void enablePAC(int tower, int sector, int segment, bool enable)
void enableTowerInCrate(int tower, int crate, bool enable)