Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:05

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