CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes
DTPosNeg Class Reference

#include <DTPosNeg.h>

Public Member Functions

 DTPosNeg ()
 
virtual ~DTPosNeg ()
 

Static Public Member Functions

static void dump ()
 dump map More...
 
static int getCT (const DTChamberId &cha)
 
static int getCT (int whe, int sec, int sta)
 
static int getPN (const DTChamberId &cha)
 
static int getPN (int whe, int sec, int sta)
 

Static Private Member Functions

static void decode (int code, int &p, int &t)
 
static void decode (int code, int &whe, int &sec, int &sta)
 
static void fillMap ()
 
static int getData (int whe, int sec, int sta)
 
static int idCode (int whe, int sec, int sta)
 
static int pnCode (int p, int t)
 

Static Private Attributes

static std::map< int, int > geomMap
 
static bool initRequest = true
 

Detailed Description

Description:

Date
2008-08-15 12:52:44
Revision
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 40 of file DTPosNeg.h.

Constructor & Destructor Documentation

◆ DTPosNeg()

DTPosNeg::DTPosNeg ( )

Constructor

Definition at line 34 of file DTPosNeg.cc.

34 {}

◆ ~DTPosNeg()

DTPosNeg::~DTPosNeg ( )
virtual

Destructor

Definition at line 39 of file DTPosNeg.cc.

39 {}

Member Function Documentation

◆ decode() [1/2]

void DTPosNeg::decode ( int  code,
int &  p,
int &  t 
)
staticprivate

Definition at line 371 of file DTPosNeg.cc.

371  {
372  p = code / 1000;
373  t = code % 1000;
374  return;
375 }

References AlCaHLTBitMon_ParallelJobs::p, and submitPVValidationJobs::t.

Referenced by ztail.Decoder::follow(), and ztail.Decoder::initial_synchronize().

◆ decode() [2/2]

void DTPosNeg::decode ( int  code,
int &  whe,
int &  sec,
int &  sta 
)
staticprivate

Definition at line 364 of file DTPosNeg.cc.

364  {
365  whe = (code / 1000) - 3;
366  sec = (code / 10) % 100;
367  sta = code % 10;
368  return;
369 }

References fileinputsource_cfi::sec.

Referenced by dump(), ztail.Decoder::follow(), getCT(), getPN(), and ztail.Decoder::initial_synchronize().

◆ dump()

void DTPosNeg::dump ( void  )
static

dump map

Operations

Definition at line 52 of file DTPosNeg.cc.

52  {
53  if (initRequest)
54  fillMap();
55  std::map<int, int>::const_iterator iter = geomMap.begin();
56  std::map<int, int>::const_iterator iend = geomMap.end();
57  while (iter != iend) {
58  const std::pair<int, int>& entry = *iter++;
59  int cha = entry.first;
60  int pnt = entry.second;
61  int whe;
62  int sec;
63  int sta;
64  decode(cha, whe, sec, sta);
65  int p_n;
66  int c_t;
67  decode(pnt, p_n, c_t);
68  if (whe >= 0)
69  std::cout << " ";
70  std::cout << whe << " ";
71  if (sec < 10)
72  std::cout << " ";
73  std::cout << sec << " " << sta << " " << p_n << " " << c_t << std::endl;
74  int pnc = getPN(whe, sec, sta);
75  int ctc = getCT(whe, sec, sta);
76  if ((pnc != p_n) || (ctc != c_t))
77  std::cout << "****************** " << pnc << " " << ctc << std::endl;
78  }
79  return;
80 }

References gather_cfg::cout, decode(), mps_splice::entry, fillMap(), geomMap, getCT(), getPN(), initRequest, and fileinputsource_cfi::sec.

◆ fillMap()

void DTPosNeg::fillMap ( )
staticprivate

Definition at line 100 of file DTPosNeg.cc.

100  {
101  //std::cout << "DTPosNeg::fillMap()" << std::endl;
102  geomMap.clear();
103  // DTChamberId().rawId() ,
104 
105  // ---
106  geomMap.insert(std::pair<int, int>(idCode(-2, 1, 1), pnCode(1, 1)));
107  geomMap.insert(std::pair<int, int>(idCode(-2, 1, 2), pnCode(2, 2)));
108  geomMap.insert(std::pair<int, int>(idCode(-2, 1, 3), pnCode(0, 3)));
109  geomMap.insert(std::pair<int, int>(idCode(-2, 1, 4), pnCode(2, 4)));
110  geomMap.insert(std::pair<int, int>(idCode(-2, 2, 1), pnCode(1, 1)));
111  geomMap.insert(std::pair<int, int>(idCode(-2, 2, 2), pnCode(2, 2)));
112  geomMap.insert(std::pair<int, int>(idCode(-2, 2, 3), pnCode(0, 3)));
113  geomMap.insert(std::pair<int, int>(idCode(-2, 2, 4), pnCode(2, 4)));
114  geomMap.insert(std::pair<int, int>(idCode(-2, 3, 1), pnCode(1, 1)));
115  geomMap.insert(std::pair<int, int>(idCode(-2, 3, 2), pnCode(2, 2)));
116  geomMap.insert(std::pair<int, int>(idCode(-2, 3, 3), pnCode(0, 3)));
117  geomMap.insert(std::pair<int, int>(idCode(-2, 3, 4), pnCode(2, 4)));
118  geomMap.insert(std::pair<int, int>(idCode(-2, 4, 1), pnCode(1, 1)));
119  geomMap.insert(std::pair<int, int>(idCode(-2, 4, 2), pnCode(2, 2)));
120  geomMap.insert(std::pair<int, int>(idCode(-2, 4, 3), pnCode(0, 3)));
121  geomMap.insert(std::pair<int, int>(idCode(-2, 4, 4), pnCode(0, 6)));
122  geomMap.insert(std::pair<int, int>(idCode(-2, 5, 1), pnCode(1, 1)));
123  geomMap.insert(std::pair<int, int>(idCode(-2, 5, 2), pnCode(2, 2)));
124  geomMap.insert(std::pair<int, int>(idCode(-2, 5, 3), pnCode(0, 3)));
125  geomMap.insert(std::pair<int, int>(idCode(-2, 5, 4), pnCode(1, 4)));
126  geomMap.insert(std::pair<int, int>(idCode(-2, 6, 1), pnCode(1, 1)));
127  geomMap.insert(std::pair<int, int>(idCode(-2, 6, 2), pnCode(2, 2)));
128  geomMap.insert(std::pair<int, int>(idCode(-2, 6, 3), pnCode(0, 3)));
129  geomMap.insert(std::pair<int, int>(idCode(-2, 6, 4), pnCode(1, 4)));
130  geomMap.insert(std::pair<int, int>(idCode(-2, 7, 1), pnCode(1, 1)));
131  geomMap.insert(std::pair<int, int>(idCode(-2, 7, 2), pnCode(2, 2)));
132  geomMap.insert(std::pair<int, int>(idCode(-2, 7, 3), pnCode(0, 3)));
133  geomMap.insert(std::pair<int, int>(idCode(-2, 7, 4), pnCode(1, 4)));
134  geomMap.insert(std::pair<int, int>(idCode(-2, 8, 1), pnCode(1, 1)));
135  geomMap.insert(std::pair<int, int>(idCode(-2, 8, 2), pnCode(2, 2)));
136  geomMap.insert(std::pair<int, int>(idCode(-2, 8, 3), pnCode(0, 3)));
137  geomMap.insert(std::pair<int, int>(idCode(-2, 8, 4), pnCode(1, 4)));
138  geomMap.insert(std::pair<int, int>(idCode(-2, 9, 1), pnCode(1, 1)));
139  geomMap.insert(std::pair<int, int>(idCode(-2, 9, 2), pnCode(2, 2)));
140  geomMap.insert(std::pair<int, int>(idCode(-2, 9, 3), pnCode(0, 3)));
141  geomMap.insert(std::pair<int, int>(idCode(-2, 9, 4), pnCode(0, 5)));
142  geomMap.insert(std::pair<int, int>(idCode(-2, 10, 1), pnCode(1, 1)));
143  geomMap.insert(std::pair<int, int>(idCode(-2, 10, 2), pnCode(2, 2)));
144  geomMap.insert(std::pair<int, int>(idCode(-2, 10, 3), pnCode(0, 3)));
145  geomMap.insert(std::pair<int, int>(idCode(-2, 10, 4), pnCode(2, 7)));
146  geomMap.insert(std::pair<int, int>(idCode(-2, 11, 1), pnCode(1, 1)));
147  geomMap.insert(std::pair<int, int>(idCode(-2, 11, 2), pnCode(2, 2)));
148  geomMap.insert(std::pair<int, int>(idCode(-2, 11, 3), pnCode(0, 3)));
149  geomMap.insert(std::pair<int, int>(idCode(-2, 11, 4), pnCode(0, 5)));
150  geomMap.insert(std::pair<int, int>(idCode(-2, 12, 1), pnCode(1, 1)));
151  geomMap.insert(std::pair<int, int>(idCode(-2, 12, 2), pnCode(2, 2)));
152  geomMap.insert(std::pair<int, int>(idCode(-2, 12, 3), pnCode(0, 3)));
153  geomMap.insert(std::pair<int, int>(idCode(-2, 12, 4), pnCode(2, 4)));
154  geomMap.insert(std::pair<int, int>(idCode(-2, 13, 4), pnCode(0, 6)));
155  geomMap.insert(std::pair<int, int>(idCode(-2, 14, 4), pnCode(1, 7)));
156  geomMap.insert(std::pair<int, int>(idCode(-1, 1, 1), pnCode(1, 1)));
157  geomMap.insert(std::pair<int, int>(idCode(-1, 1, 2), pnCode(2, 2)));
158  geomMap.insert(std::pair<int, int>(idCode(-1, 1, 3), pnCode(0, 3)));
159  geomMap.insert(std::pair<int, int>(idCode(-1, 1, 4), pnCode(2, 4)));
160  geomMap.insert(std::pair<int, int>(idCode(-1, 2, 1), pnCode(1, 1)));
161  geomMap.insert(std::pair<int, int>(idCode(-1, 2, 2), pnCode(2, 2)));
162  geomMap.insert(std::pair<int, int>(idCode(-1, 2, 3), pnCode(0, 3)));
163  geomMap.insert(std::pair<int, int>(idCode(-1, 2, 4), pnCode(2, 4)));
164  geomMap.insert(std::pair<int, int>(idCode(-1, 3, 1), pnCode(1, 1)));
165  geomMap.insert(std::pair<int, int>(idCode(-1, 3, 2), pnCode(2, 2)));
166  geomMap.insert(std::pair<int, int>(idCode(-1, 3, 3), pnCode(0, 3)));
167  geomMap.insert(std::pair<int, int>(idCode(-1, 3, 4), pnCode(2, 4)));
168  geomMap.insert(std::pair<int, int>(idCode(-1, 4, 1), pnCode(1, 1)));
169  geomMap.insert(std::pair<int, int>(idCode(-1, 4, 2), pnCode(2, 2)));
170  geomMap.insert(std::pair<int, int>(idCode(-1, 4, 3), pnCode(0, 3)));
171  geomMap.insert(std::pair<int, int>(idCode(-1, 4, 4), pnCode(0, 6)));
172  geomMap.insert(std::pair<int, int>(idCode(-1, 5, 1), pnCode(1, 1)));
173  geomMap.insert(std::pair<int, int>(idCode(-1, 5, 2), pnCode(2, 2)));
174  geomMap.insert(std::pair<int, int>(idCode(-1, 5, 3), pnCode(0, 3)));
175  geomMap.insert(std::pair<int, int>(idCode(-1, 5, 4), pnCode(1, 4)));
176  geomMap.insert(std::pair<int, int>(idCode(-1, 6, 1), pnCode(1, 1)));
177  geomMap.insert(std::pair<int, int>(idCode(-1, 6, 2), pnCode(2, 2)));
178  geomMap.insert(std::pair<int, int>(idCode(-1, 6, 3), pnCode(0, 3)));
179  geomMap.insert(std::pair<int, int>(idCode(-1, 6, 4), pnCode(1, 4)));
180  geomMap.insert(std::pair<int, int>(idCode(-1, 7, 1), pnCode(1, 1)));
181  geomMap.insert(std::pair<int, int>(idCode(-1, 7, 2), pnCode(2, 2)));
182  geomMap.insert(std::pair<int, int>(idCode(-1, 7, 3), pnCode(0, 3)));
183  geomMap.insert(std::pair<int, int>(idCode(-1, 7, 4), pnCode(1, 4)));
184  geomMap.insert(std::pair<int, int>(idCode(-1, 8, 1), pnCode(1, 1)));
185  geomMap.insert(std::pair<int, int>(idCode(-1, 8, 2), pnCode(2, 2)));
186  geomMap.insert(std::pair<int, int>(idCode(-1, 8, 3), pnCode(0, 3)));
187  geomMap.insert(std::pair<int, int>(idCode(-1, 8, 4), pnCode(1, 4)));
188  geomMap.insert(std::pair<int, int>(idCode(-1, 9, 1), pnCode(1, 1)));
189  geomMap.insert(std::pair<int, int>(idCode(-1, 9, 2), pnCode(2, 2)));
190  geomMap.insert(std::pair<int, int>(idCode(-1, 9, 3), pnCode(0, 3)));
191  geomMap.insert(std::pair<int, int>(idCode(-1, 9, 4), pnCode(0, 5)));
192  geomMap.insert(std::pair<int, int>(idCode(-1, 10, 1), pnCode(1, 1)));
193  geomMap.insert(std::pair<int, int>(idCode(-1, 10, 2), pnCode(2, 2)));
194  geomMap.insert(std::pair<int, int>(idCode(-1, 10, 3), pnCode(0, 3)));
195  geomMap.insert(std::pair<int, int>(idCode(-1, 10, 4), pnCode(2, 7)));
196  geomMap.insert(std::pair<int, int>(idCode(-1, 11, 1), pnCode(1, 1)));
197  geomMap.insert(std::pair<int, int>(idCode(-1, 11, 2), pnCode(2, 2)));
198  geomMap.insert(std::pair<int, int>(idCode(-1, 11, 3), pnCode(0, 3)));
199  geomMap.insert(std::pair<int, int>(idCode(-1, 11, 4), pnCode(0, 5)));
200  geomMap.insert(std::pair<int, int>(idCode(-1, 12, 1), pnCode(1, 1)));
201  geomMap.insert(std::pair<int, int>(idCode(-1, 12, 2), pnCode(2, 2)));
202  geomMap.insert(std::pair<int, int>(idCode(-1, 12, 3), pnCode(0, 3)));
203  geomMap.insert(std::pair<int, int>(idCode(-1, 12, 4), pnCode(2, 4)));
204  geomMap.insert(std::pair<int, int>(idCode(-1, 13, 4), pnCode(0, 6)));
205  geomMap.insert(std::pair<int, int>(idCode(-1, 14, 4), pnCode(1, 7)));
206  geomMap.insert(std::pair<int, int>(idCode(0, 1, 1), pnCode(1, 1)));
207  geomMap.insert(std::pair<int, int>(idCode(0, 1, 2), pnCode(2, 2)));
208  geomMap.insert(std::pair<int, int>(idCode(0, 1, 3), pnCode(0, 3)));
209  geomMap.insert(std::pair<int, int>(idCode(0, 1, 4), pnCode(2, 4)));
210  geomMap.insert(std::pair<int, int>(idCode(0, 2, 1), pnCode(2, 1)));
211  geomMap.insert(std::pair<int, int>(idCode(0, 2, 2), pnCode(1, 2)));
212  geomMap.insert(std::pair<int, int>(idCode(0, 2, 3), pnCode(0, 3)));
213  geomMap.insert(std::pair<int, int>(idCode(0, 2, 4), pnCode(1, 4)));
214  geomMap.insert(std::pair<int, int>(idCode(0, 3, 1), pnCode(2, 1)));
215  geomMap.insert(std::pair<int, int>(idCode(0, 3, 2), pnCode(1, 2)));
216  geomMap.insert(std::pair<int, int>(idCode(0, 3, 3), pnCode(0, 3)));
217  geomMap.insert(std::pair<int, int>(idCode(0, 3, 4), pnCode(1, 4)));
218  geomMap.insert(std::pair<int, int>(idCode(0, 4, 1), pnCode(1, 1)));
219  geomMap.insert(std::pair<int, int>(idCode(0, 4, 2), pnCode(2, 2)));
220  geomMap.insert(std::pair<int, int>(idCode(0, 4, 3), pnCode(0, 3)));
221  geomMap.insert(std::pair<int, int>(idCode(0, 4, 4), pnCode(0, 6)));
222  geomMap.insert(std::pair<int, int>(idCode(0, 5, 1), pnCode(1, 1)));
223  geomMap.insert(std::pair<int, int>(idCode(0, 5, 2), pnCode(2, 2)));
224  geomMap.insert(std::pair<int, int>(idCode(0, 5, 3), pnCode(0, 3)));
225  geomMap.insert(std::pair<int, int>(idCode(0, 5, 4), pnCode(1, 4)));
226  geomMap.insert(std::pair<int, int>(idCode(0, 6, 1), pnCode(2, 1)));
227  geomMap.insert(std::pair<int, int>(idCode(0, 6, 2), pnCode(1, 2)));
228  geomMap.insert(std::pair<int, int>(idCode(0, 6, 3), pnCode(0, 3)));
229  geomMap.insert(std::pair<int, int>(idCode(0, 6, 4), pnCode(2, 4)));
230  geomMap.insert(std::pair<int, int>(idCode(0, 7, 1), pnCode(2, 1)));
231  geomMap.insert(std::pair<int, int>(idCode(0, 7, 2), pnCode(1, 2)));
232  geomMap.insert(std::pair<int, int>(idCode(0, 7, 3), pnCode(0, 3)));
233  geomMap.insert(std::pair<int, int>(idCode(0, 7, 4), pnCode(2, 4)));
234  geomMap.insert(std::pair<int, int>(idCode(0, 8, 1), pnCode(1, 1)));
235  geomMap.insert(std::pair<int, int>(idCode(0, 8, 2), pnCode(2, 2)));
236  geomMap.insert(std::pair<int, int>(idCode(0, 8, 3), pnCode(0, 3)));
237  geomMap.insert(std::pair<int, int>(idCode(0, 8, 4), pnCode(1, 4)));
238  geomMap.insert(std::pair<int, int>(idCode(0, 9, 1), pnCode(1, 1)));
239  geomMap.insert(std::pair<int, int>(idCode(0, 9, 2), pnCode(2, 2)));
240  geomMap.insert(std::pair<int, int>(idCode(0, 9, 3), pnCode(0, 3)));
241  geomMap.insert(std::pair<int, int>(idCode(0, 9, 4), pnCode(0, 5)));
242  geomMap.insert(std::pair<int, int>(idCode(0, 10, 1), pnCode(2, 1)));
243  geomMap.insert(std::pair<int, int>(idCode(0, 10, 2), pnCode(1, 2)));
244  geomMap.insert(std::pair<int, int>(idCode(0, 10, 3), pnCode(0, 3)));
245  geomMap.insert(std::pair<int, int>(idCode(0, 10, 4), pnCode(2, 7)));
246  geomMap.insert(std::pair<int, int>(idCode(0, 11, 1), pnCode(2, 1)));
247  geomMap.insert(std::pair<int, int>(idCode(0, 11, 2), pnCode(1, 2)));
248  geomMap.insert(std::pair<int, int>(idCode(0, 11, 3), pnCode(0, 3)));
249  geomMap.insert(std::pair<int, int>(idCode(0, 11, 4), pnCode(0, 5)));
250  geomMap.insert(std::pair<int, int>(idCode(0, 12, 1), pnCode(1, 1)));
251  geomMap.insert(std::pair<int, int>(idCode(0, 12, 2), pnCode(2, 2)));
252  geomMap.insert(std::pair<int, int>(idCode(0, 12, 3), pnCode(0, 3)));
253  geomMap.insert(std::pair<int, int>(idCode(0, 12, 4), pnCode(2, 4)));
254  geomMap.insert(std::pair<int, int>(idCode(0, 13, 4), pnCode(0, 6)));
255  geomMap.insert(std::pair<int, int>(idCode(0, 14, 4), pnCode(1, 7)));
256  geomMap.insert(std::pair<int, int>(idCode(1, 1, 1), pnCode(2, 1)));
257  geomMap.insert(std::pair<int, int>(idCode(1, 1, 2), pnCode(1, 2)));
258  geomMap.insert(std::pair<int, int>(idCode(1, 1, 3), pnCode(0, 3)));
259  geomMap.insert(std::pair<int, int>(idCode(1, 1, 4), pnCode(1, 4)));
260  geomMap.insert(std::pair<int, int>(idCode(1, 2, 1), pnCode(2, 1)));
261  geomMap.insert(std::pair<int, int>(idCode(1, 2, 2), pnCode(1, 2)));
262  geomMap.insert(std::pair<int, int>(idCode(1, 2, 3), pnCode(0, 3)));
263  geomMap.insert(std::pair<int, int>(idCode(1, 2, 4), pnCode(1, 4)));
264  geomMap.insert(std::pair<int, int>(idCode(1, 3, 1), pnCode(2, 1)));
265  geomMap.insert(std::pair<int, int>(idCode(1, 3, 2), pnCode(1, 2)));
266  geomMap.insert(std::pair<int, int>(idCode(1, 3, 3), pnCode(0, 3)));
267  geomMap.insert(std::pair<int, int>(idCode(1, 3, 4), pnCode(1, 4)));
268  geomMap.insert(std::pair<int, int>(idCode(1, 4, 1), pnCode(2, 1)));
269  geomMap.insert(std::pair<int, int>(idCode(1, 4, 2), pnCode(1, 2)));
270  geomMap.insert(std::pair<int, int>(idCode(1, 4, 3), pnCode(0, 3)));
271  geomMap.insert(std::pair<int, int>(idCode(1, 4, 4), pnCode(0, 6)));
272  geomMap.insert(std::pair<int, int>(idCode(1, 5, 1), pnCode(2, 1)));
273  geomMap.insert(std::pair<int, int>(idCode(1, 5, 2), pnCode(1, 2)));
274  geomMap.insert(std::pair<int, int>(idCode(1, 5, 3), pnCode(0, 3)));
275  geomMap.insert(std::pair<int, int>(idCode(1, 5, 4), pnCode(2, 4)));
276  geomMap.insert(std::pair<int, int>(idCode(1, 6, 1), pnCode(2, 1)));
277  geomMap.insert(std::pair<int, int>(idCode(1, 6, 2), pnCode(1, 2)));
278  geomMap.insert(std::pair<int, int>(idCode(1, 6, 3), pnCode(0, 3)));
279  geomMap.insert(std::pair<int, int>(idCode(1, 6, 4), pnCode(2, 4)));
280  geomMap.insert(std::pair<int, int>(idCode(1, 7, 1), pnCode(2, 1)));
281  geomMap.insert(std::pair<int, int>(idCode(1, 7, 2), pnCode(1, 2)));
282  geomMap.insert(std::pair<int, int>(idCode(1, 7, 3), pnCode(0, 3)));
283  geomMap.insert(std::pair<int, int>(idCode(1, 7, 4), pnCode(2, 4)));
284  geomMap.insert(std::pair<int, int>(idCode(1, 8, 1), pnCode(2, 1)));
285  geomMap.insert(std::pair<int, int>(idCode(1, 8, 2), pnCode(1, 2)));
286  geomMap.insert(std::pair<int, int>(idCode(1, 8, 3), pnCode(0, 3)));
287  geomMap.insert(std::pair<int, int>(idCode(1, 8, 4), pnCode(1, 4)));
288  geomMap.insert(std::pair<int, int>(idCode(1, 9, 1), pnCode(2, 1)));
289  geomMap.insert(std::pair<int, int>(idCode(1, 9, 2), pnCode(1, 2)));
290  geomMap.insert(std::pair<int, int>(idCode(1, 9, 3), pnCode(0, 3)));
291  geomMap.insert(std::pair<int, int>(idCode(1, 9, 4), pnCode(0, 5)));
292  geomMap.insert(std::pair<int, int>(idCode(1, 10, 1), pnCode(2, 1)));
293  geomMap.insert(std::pair<int, int>(idCode(1, 10, 2), pnCode(1, 2)));
294  geomMap.insert(std::pair<int, int>(idCode(1, 10, 3), pnCode(0, 3)));
295  geomMap.insert(std::pair<int, int>(idCode(1, 10, 4), pnCode(2, 7)));
296  geomMap.insert(std::pair<int, int>(idCode(1, 11, 1), pnCode(2, 1)));
297  geomMap.insert(std::pair<int, int>(idCode(1, 11, 2), pnCode(1, 2)));
298  geomMap.insert(std::pair<int, int>(idCode(1, 11, 3), pnCode(0, 3)));
299  geomMap.insert(std::pair<int, int>(idCode(1, 11, 4), pnCode(0, 5)));
300  geomMap.insert(std::pair<int, int>(idCode(1, 12, 1), pnCode(2, 1)));
301  geomMap.insert(std::pair<int, int>(idCode(1, 12, 2), pnCode(1, 2)));
302  geomMap.insert(std::pair<int, int>(idCode(1, 12, 3), pnCode(0, 3)));
303  geomMap.insert(std::pair<int, int>(idCode(1, 12, 4), pnCode(2, 4)));
304  geomMap.insert(std::pair<int, int>(idCode(1, 13, 4), pnCode(0, 6)));
305  geomMap.insert(std::pair<int, int>(idCode(1, 14, 4), pnCode(1, 7)));
306  geomMap.insert(std::pair<int, int>(idCode(2, 1, 1), pnCode(2, 1)));
307  geomMap.insert(std::pair<int, int>(idCode(2, 1, 2), pnCode(1, 2)));
308  geomMap.insert(std::pair<int, int>(idCode(2, 1, 3), pnCode(0, 3)));
309  geomMap.insert(std::pair<int, int>(idCode(2, 1, 4), pnCode(1, 4)));
310  geomMap.insert(std::pair<int, int>(idCode(2, 2, 1), pnCode(2, 1)));
311  geomMap.insert(std::pair<int, int>(idCode(2, 2, 2), pnCode(1, 2)));
312  geomMap.insert(std::pair<int, int>(idCode(2, 2, 3), pnCode(0, 3)));
313  geomMap.insert(std::pair<int, int>(idCode(2, 2, 4), pnCode(1, 4)));
314  geomMap.insert(std::pair<int, int>(idCode(2, 3, 1), pnCode(2, 1)));
315  geomMap.insert(std::pair<int, int>(idCode(2, 3, 2), pnCode(1, 2)));
316  geomMap.insert(std::pair<int, int>(idCode(2, 3, 3), pnCode(0, 3)));
317  geomMap.insert(std::pair<int, int>(idCode(2, 3, 4), pnCode(1, 4)));
318  geomMap.insert(std::pair<int, int>(idCode(2, 4, 1), pnCode(2, 1)));
319  geomMap.insert(std::pair<int, int>(idCode(2, 4, 2), pnCode(1, 2)));
320  geomMap.insert(std::pair<int, int>(idCode(2, 4, 3), pnCode(0, 3)));
321  geomMap.insert(std::pair<int, int>(idCode(2, 4, 4), pnCode(0, 6)));
322  geomMap.insert(std::pair<int, int>(idCode(2, 5, 1), pnCode(2, 1)));
323  geomMap.insert(std::pair<int, int>(idCode(2, 5, 2), pnCode(1, 2)));
324  geomMap.insert(std::pair<int, int>(idCode(2, 5, 3), pnCode(0, 3)));
325  geomMap.insert(std::pair<int, int>(idCode(2, 5, 4), pnCode(2, 4)));
326  geomMap.insert(std::pair<int, int>(idCode(2, 6, 1), pnCode(2, 1)));
327  geomMap.insert(std::pair<int, int>(idCode(2, 6, 2), pnCode(1, 2)));
328  geomMap.insert(std::pair<int, int>(idCode(2, 6, 3), pnCode(0, 3)));
329  geomMap.insert(std::pair<int, int>(idCode(2, 6, 4), pnCode(2, 4)));
330  geomMap.insert(std::pair<int, int>(idCode(2, 7, 1), pnCode(2, 1)));
331  geomMap.insert(std::pair<int, int>(idCode(2, 7, 2), pnCode(1, 2)));
332  geomMap.insert(std::pair<int, int>(idCode(2, 7, 3), pnCode(0, 3)));
333  geomMap.insert(std::pair<int, int>(idCode(2, 7, 4), pnCode(2, 4)));
334  geomMap.insert(std::pair<int, int>(idCode(2, 8, 1), pnCode(2, 1)));
335  geomMap.insert(std::pair<int, int>(idCode(2, 8, 2), pnCode(1, 2)));
336  geomMap.insert(std::pair<int, int>(idCode(2, 8, 3), pnCode(0, 3)));
337  geomMap.insert(std::pair<int, int>(idCode(2, 8, 4), pnCode(2, 4)));
338  geomMap.insert(std::pair<int, int>(idCode(2, 9, 1), pnCode(2, 1)));
339  geomMap.insert(std::pair<int, int>(idCode(2, 9, 2), pnCode(1, 2)));
340  geomMap.insert(std::pair<int, int>(idCode(2, 9, 3), pnCode(0, 3)));
341  geomMap.insert(std::pair<int, int>(idCode(2, 9, 4), pnCode(0, 5)));
342  geomMap.insert(std::pair<int, int>(idCode(2, 10, 1), pnCode(2, 1)));
343  geomMap.insert(std::pair<int, int>(idCode(2, 10, 2), pnCode(1, 2)));
344  geomMap.insert(std::pair<int, int>(idCode(2, 10, 3), pnCode(0, 3)));
345  geomMap.insert(std::pair<int, int>(idCode(2, 10, 4), pnCode(2, 7)));
346  geomMap.insert(std::pair<int, int>(idCode(2, 11, 1), pnCode(2, 1)));
347  geomMap.insert(std::pair<int, int>(idCode(2, 11, 2), pnCode(1, 2)));
348  geomMap.insert(std::pair<int, int>(idCode(2, 11, 3), pnCode(0, 3)));
349  geomMap.insert(std::pair<int, int>(idCode(2, 11, 4), pnCode(0, 5)));
350  geomMap.insert(std::pair<int, int>(idCode(2, 12, 1), pnCode(2, 1)));
351  geomMap.insert(std::pair<int, int>(idCode(2, 12, 2), pnCode(1, 2)));
352  geomMap.insert(std::pair<int, int>(idCode(2, 12, 3), pnCode(0, 3)));
353  geomMap.insert(std::pair<int, int>(idCode(2, 12, 4), pnCode(1, 4)));
354  geomMap.insert(std::pair<int, int>(idCode(2, 13, 4), pnCode(0, 6)));
355  geomMap.insert(std::pair<int, int>(idCode(2, 14, 4), pnCode(1, 7)));
356  //
357  initRequest = false;
358 }

References geomMap, idCode(), initRequest, and pnCode().

Referenced by dump(), and getData().

◆ getCT() [1/2]

int DTPosNeg::getCT ( const DTChamberId cha)
static

Definition at line 98 of file DTPosNeg.cc.

98 { return getCT(cha.wheel(), cha.sector(), cha.station()); }

References getCT(), DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

◆ getCT() [2/2]

int DTPosNeg::getCT ( int  whe,
int  sec,
int  sta 
)
static

Definition at line 91 of file DTPosNeg.cc.

91  {
92  int p_n;
93  int c_t;
94  decode(getData(whe, sec, sta), p_n, c_t);
95  return c_t;
96 }

References decode(), getData(), and fileinputsource_cfi::sec.

Referenced by dump(), and getCT().

◆ getData()

int DTPosNeg::getData ( int  whe,
int  sec,
int  sta 
)
staticprivate

Definition at line 377 of file DTPosNeg.cc.

377  {
378  if (initRequest)
379  fillMap();
380  std::map<int, int>::const_iterator iter = geomMap.find(idCode(whe, sec, sta));
381  std::map<int, int>::const_iterator iend = geomMap.end();
382  if (iter == iend)
383  return 999999;
384  return iter->second;
385 }

References fillMap(), geomMap, idCode(), initRequest, and fileinputsource_cfi::sec.

Referenced by getCT(), and getPN().

◆ getPN() [1/2]

int DTPosNeg::getPN ( const DTChamberId cha)
static

Definition at line 89 of file DTPosNeg.cc.

89 { return getPN(cha.wheel(), cha.sector(), cha.station()); }

References getPN(), DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

◆ getPN() [2/2]

int DTPosNeg::getPN ( int  whe,
int  sec,
int  sta 
)
static

Definition at line 82 of file DTPosNeg.cc.

82  {
83  int p_n;
84  int c_t;
85  decode(getData(whe, sec, sta), p_n, c_t);
86  return p_n;
87 }

References decode(), getData(), and fileinputsource_cfi::sec.

Referenced by dump(), and getPN().

◆ idCode()

int DTPosNeg::idCode ( int  whe,
int  sec,
int  sta 
)
staticprivate

Definition at line 360 of file DTPosNeg.cc.

360 { return ((((whe + 3) * 100) + sec) * 10) + sta; }

References fileinputsource_cfi::sec.

Referenced by fillMap(), and getData().

◆ pnCode()

int DTPosNeg::pnCode ( int  p,
int  t 
)
staticprivate

Definition at line 362 of file DTPosNeg.cc.

362 { return (p * 1000) + t; }

References AlCaHLTBitMon_ParallelJobs::p, and submitPVValidationJobs::t.

Referenced by fillMap().

Member Data Documentation

◆ geomMap

std::map< int, int > DTPosNeg::geomMap
staticprivate

Definition at line 61 of file DTPosNeg.h.

Referenced by dump(), fillMap(), and getData().

◆ initRequest

bool DTPosNeg::initRequest = true
staticprivate

Definition at line 60 of file DTPosNeg.h.

Referenced by dump(), fillMap(), and getData().

DTPosNeg::idCode
static int idCode(int whe, int sec, int sta)
Definition: DTPosNeg.cc:360
DTPosNeg::getPN
static int getPN(int whe, int sec, int sta)
Definition: DTPosNeg.cc:82
mps_splice.entry
entry
Definition: mps_splice.py:68
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTPosNeg::fillMap
static void fillMap()
Definition: DTPosNeg.cc:100
DTPosNeg::geomMap
static std::map< int, int > geomMap
Definition: DTPosNeg.h:61
DTPosNeg::initRequest
static bool initRequest
Definition: DTPosNeg.h:60
DTPosNeg::getCT
static int getCT(int whe, int sec, int sta)
Definition: DTPosNeg.cc:91
DTPosNeg::getData
static int getData(int whe, int sec, int sta)
Definition: DTPosNeg.cc:377
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:94
DTPosNeg::decode
static void decode(int code, int &whe, int &sec, int &sta)
Definition: DTPosNeg.cc:364
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
DTPosNeg::pnCode
static int pnCode(int p, int t)
Definition: DTPosNeg.cc:362
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42