CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 // L1RPCHwConfig::L1RPCHwConfig(const L1RPCHwConfig& rhs)
34 // {
35 // // do actual copying here;
36 // }
37 
39 
40 void L1RPCHwConfig::enablePAC(int tower, int sector, int segment, bool enable) {
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 }
49 
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 }
57 
58 void L1RPCHwConfig::enableTowerInCrate(int tower, int crate, bool enable) {
59  for (int seg = 0; seg < 12; ++seg) {
60  enablePAC(tower, crate, seg, enable);
61  }
62 }
63 
64 void L1RPCHwConfig::enableCrate(int crate, bool enable) {
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 }
71 
73  for (int seg = 0; seg < 12; ++seg) {
74  // std::cout << seg << " ";
75  enableCrate(seg, enable);
76  // std::cout << std::endl;
77  }
78 }
void enableTower(int tower, bool enable)
void enableCrate(int logSector, bool enable)
virtual ~L1RPCHwConfig()
void enableAll(bool enable)
std::set< L1RPCDevCoords > m_disabledDevices
Definition: L1RPCHwConfig.h:93
void enablePAC(int tower, int sector, int segment, bool enable)
void enableTowerInCrate(int tower, int crate, bool enable)