1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#ifndef DTPosNeg_H
#define DTPosNeg_H
/** \class DTPosNeg
*
* Description:
*
*
* $Date: 2008-08-15 12:52:44 $
* $Revision: 1.1 $
* \author Paolo Ronchese INFN Padova
*
*/
//----------------------
// Base Class Headers --
//----------------------
//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
class DTChamberId;
//---------------
// C++ Headers --
//---------------
#include <map>
// ---------------------
// -- Class Interface --
// ---------------------
/*
class DTPosNegCompare {
public:
bool operator()( const DTCCBId& idl,
const DTCCBId& idr ) const;
};
*/
class DTPosNeg {
public:
/** Constructor
*/
DTPosNeg();
/** Destructor
*/
virtual ~DTPosNeg();
/** Operations
*/
/// dump map
static void dump();
static int getPN(int whe, int sec, int sta);
static int getPN(const DTChamberId& cha);
static int getCT(int whe, int sec, int sta);
static int getCT(const DTChamberId& cha);
private:
static bool initRequest;
static std::map<int, int> geomMap;
// static std::map<DTCCBId,int,DTPosNegCompare> geomMap;
static void fillMap();
static int idCode(int whe, int sec, int sta);
static int pnCode(int p, int t);
static void decode(int code, int& whe, int& sec, int& sta);
static void decode(int code, int& p, int& t);
static int getData(int whe, int sec, int sta);
};
#endif // DTPosNeg_H
|