Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:55

0001 #ifndef CSCChamberMap_h
0002 #define CSCChamberMap_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include "CondFormats/CSCObjects/interface/CSCMapItem.h"
0007 #include <map>
0008 
0009 class CSCDetId;
0010 
0011 class CSCChamberMap {
0012 public:
0013   CSCChamberMap();
0014   ~CSCChamberMap();
0015 
0016   /// Accessor for item according to key
0017   const CSCMapItem::MapItem& item(int key) const;
0018 
0019   /// Interface required use in digi-to-raw
0020 
0021   /// vme crate id for given DetId
0022   int crate(const CSCDetId&) const;
0023 
0024   /// dmb id for given DetId
0025   int dmb(const CSCDetId&) const;
0026 
0027   /// ddu id for given DetId
0028   int ddu(const CSCDetId&) const;
0029 
0030   /// slink id for given DetId
0031   int slink(const CSCDetId&) const;
0032 
0033   /// ddu slot for given DetId
0034   int dduSlot(const CSCDetId&) const;
0035 
0036   /// ddu input for given DetId
0037   int dduInput(const CSCDetId&) const;
0038 
0039   /// Data are public. @@Should be private?
0040   typedef std::map<int, CSCMapItem::MapItem> CSCMap;
0041   CSCMap ch_map;
0042 
0043 private:
0044   /**
0045    * Decimal-encoded index (as used inside db - the 'Igor' index)
0046    *
0047    * This is the decimal integer ie*100000 + is*10000 + ir*1000 + ic*10 + il <br>
0048    * (ie=1-2, is=1-4, ir=1-4, ic=1-36, il=1-6) <br>
0049    * But in this case il=0 labels entire chamber.
0050    */
0051   int dbIndex(const CSCDetId&) const;
0052 
0053   COND_SERIALIZABLE;
0054 };
0055 
0056 #endif