Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:45

0001 #ifndef DTPosNeg_H
0002 #define DTPosNeg_H
0003 /** \class DTPosNeg
0004  *
0005  *  Description: 
0006  *
0007  *
0008  *  $Date: 2008-08-15 12:52:44 $
0009  *  $Revision: 1.1 $
0010  *  \author Paolo Ronchese INFN Padova
0011  *
0012  */
0013 
0014 //----------------------
0015 // Base Class Headers --
0016 //----------------------
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 class DTChamberId;
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 #include <map>
0027 
0028 //              ---------------------
0029 //              -- Class Interface --
0030 //              ---------------------
0031 
0032 /*
0033 class DTPosNegCompare {
0034  public:
0035   bool operator()( const DTCCBId& idl,
0036                    const DTCCBId& idr ) const;
0037 };
0038 */
0039 
0040 class DTPosNeg {
0041 public:
0042   /** Constructor
0043    */
0044   DTPosNeg();
0045 
0046   /** Destructor
0047    */
0048   virtual ~DTPosNeg();
0049 
0050   /** Operations
0051    */
0052   /// dump map
0053   static void dump();
0054   static int getPN(int whe, int sec, int sta);
0055   static int getPN(const DTChamberId& cha);
0056   static int getCT(int whe, int sec, int sta);
0057   static int getCT(const DTChamberId& cha);
0058 
0059 private:
0060   static bool initRequest;
0061   static std::map<int, int> geomMap;
0062   //  static std::map<DTCCBId,int,DTPosNegCompare> geomMap;
0063 
0064   static void fillMap();
0065   static int idCode(int whe, int sec, int sta);
0066   static int pnCode(int p, int t);
0067   static void decode(int code, int& whe, int& sec, int& sta);
0068   static void decode(int code, int& p, int& t);
0069   static int getData(int whe, int sec, int sta);
0070 };
0071 
0072 #endif  // DTPosNeg_H