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 (int whe, int sec, int sta)
 
static int getCT (const DTChamberId &cha)
 
static int getPN (int whe, int sec, int sta)
 
static int getPN (const DTChamberId &cha)
 

Static Private Member Functions

static void decode (int code, int &whe, int &sec, int &sta)
 
static void decode (int code, int &p, int &t)
 
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 41 of file DTPosNeg.h.

Constructor & Destructor Documentation

DTPosNeg::DTPosNeg ( )

Constructor

Definition at line 34 of file DTPosNeg.cc.

34  {
35 }
DTPosNeg::~DTPosNeg ( )
virtual

Destructor

Definition at line 40 of file DTPosNeg.cc.

40  {
41 }

Member Function Documentation

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

Definition at line 391 of file DTPosNeg.cc.

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

391  {
392  whe = ( code / 1000 ) - 3;
393  sec = ( code / 10 ) % 100;
394  sta = code % 10;
395  return;
396 }
void DTPosNeg::decode ( int  code,
int &  p,
int &  t 
)
staticprivate

Definition at line 399 of file DTPosNeg.cc.

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

399  {
400  p = code / 1000;
401  t = code % 1000;
402  return;
403 }
void DTPosNeg::dump ( void  )
static

dump map

Operations

Definition at line 54 of file DTPosNeg.cc.

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

54  {
55 
56  if ( initRequest ) fillMap();
57  std::map<int,int>::const_iterator iter = geomMap.begin();
58  std::map<int,int>::const_iterator iend = geomMap.end();
59  while ( iter != iend ) {
60  const std::pair<int,int>& entry = *iter++;
61  int cha = entry.first;
62  int pnt = entry.second;
63  int whe;
64  int sec;
65  int sta;
66  decode( cha, whe, sec, sta );
67  int p_n;
68  int c_t;
69  decode( pnt, p_n, c_t );
70  if ( whe >= 0 ) std::cout << " ";
71  std::cout << whe << " ";
72  if ( sec < 10 ) std::cout << " ";
73  std::cout << sec << " "
74  << sta << " "
75  << p_n << " "
76  << c_t << std::endl;
77  int pnc = getPN( whe, sec, sta );
78  int ctc = getCT( whe, sec, sta );
79  if ( ( pnc != p_n ) ||
80  ( ctc != c_t ) ) std::cout << "****************** "
81  << pnc << " " << ctc << std::endl;
82  }
83  return;
84 
85 }
static int getPN(int whe, int sec, int sta)
Definition: DTPosNeg.cc:88
static void decode(int code, int &whe, int &sec, int &sta)
Definition: DTPosNeg.cc:391
static void fillMap()
Definition: DTPosNeg.cc:118
static int getCT(int whe, int sec, int sta)
Definition: DTPosNeg.cc:103
static bool initRequest
Definition: DTPosNeg.h:64
static std::map< int, int > geomMap
Definition: DTPosNeg.h:65
void DTPosNeg::fillMap ( )
staticprivate

Definition at line 118 of file DTPosNeg.cc.

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

Referenced by dump(), and getData().

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

Definition at line 103 of file DTPosNeg.cc.

References decode(), and getData().

Referenced by dump(), and getCT().

103  {
104  int p_n;
105  int c_t;
106  decode( getData( whe, sec, sta ), p_n, c_t );
107  return c_t;
108 }
static void decode(int code, int &whe, int &sec, int &sta)
Definition: DTPosNeg.cc:391
static int getData(int whe, int sec, int sta)
Definition: DTPosNeg.cc:405
int DTPosNeg::getCT ( const DTChamberId cha)
static

Definition at line 111 of file DTPosNeg.cc.

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

111  {
112  return getCT( cha.wheel(),
113  cha.sector(),
114  cha.station() );
115 }
static int getCT(int whe, int sec, int sta)
Definition: DTPosNeg.cc:103
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
int DTPosNeg::getData ( int  whe,
int  sec,
int  sta 
)
staticprivate

Definition at line 405 of file DTPosNeg.cc.

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

Referenced by getCT(), and getPN().

405  {
406  if ( initRequest ) fillMap();
407  std::map<int,int>::const_iterator iter = geomMap.find( idCode( whe, sec, sta ) );
408  std::map<int,int>::const_iterator iend = geomMap.end();
409  if ( iter == iend ) return 999999;
410  return iter->second;
411 }
static void fillMap()
Definition: DTPosNeg.cc:118
static int idCode(int whe, int sec, int sta)
Definition: DTPosNeg.cc:381
static bool initRequest
Definition: DTPosNeg.h:64
static std::map< int, int > geomMap
Definition: DTPosNeg.h:65
int DTPosNeg::getPN ( int  whe,
int  sec,
int  sta 
)
static

Definition at line 88 of file DTPosNeg.cc.

References decode(), and getData().

Referenced by dump(), and getPN().

88  {
89  int p_n;
90  int c_t;
91  decode( getData( whe, sec, sta ), p_n, c_t );
92  return p_n;
93 }
static void decode(int code, int &whe, int &sec, int &sta)
Definition: DTPosNeg.cc:391
static int getData(int whe, int sec, int sta)
Definition: DTPosNeg.cc:405
int DTPosNeg::getPN ( const DTChamberId cha)
static

Definition at line 96 of file DTPosNeg.cc.

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

96  {
97  return getPN( cha.wheel(),
98  cha.sector(),
99  cha.station() );
100 }
static int getPN(int whe, int sec, int sta)
Definition: DTPosNeg.cc:88
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
int DTPosNeg::idCode ( int  whe,
int  sec,
int  sta 
)
staticprivate

Definition at line 381 of file DTPosNeg.cc.

Referenced by fillMap(), and getData().

381  {
382  return ( ( ( ( whe + 3 ) * 100 ) + sec ) * 10 ) + sta;
383 }
int DTPosNeg::pnCode ( int  p,
int  t 
)
staticprivate

Definition at line 386 of file DTPosNeg.cc.

References protons_cff::t.

Referenced by fillMap().

386  {
387  return ( p * 1000 ) + t;
388 }

Member Data Documentation

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

Definition at line 65 of file DTPosNeg.h.

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

bool DTPosNeg::initRequest = true
staticprivate

Definition at line 64 of file DTPosNeg.h.

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