Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:58

0001 #ifndef RPCReadOutMappingWithFastSearch_H
0002 #define RPCReadOutMappingWithFastSearch_H
0003 
0004 #include "CondFormats/RPCObjects/interface/RPCReadOutMapping.h"
0005 #include <string>
0006 #include <map>
0007 
0008 class RPCReadOutMappingWithFastSearch : public RPCReadOutMapping {
0009 public:
0010   RPCReadOutMappingWithFastSearch();
0011   ~RPCReadOutMappingWithFastSearch() override {}
0012 
0013   /// takes ownership of map
0014   void init(const RPCReadOutMapping* arm);
0015 
0016   const LinkBoardSpec* location(const LinkBoardElectronicIndex& ele) const override;
0017 
0018   RPCReadOutMapping::StripInDetUnit detUnitFrame(const LinkBoardSpec& location,
0019                                                  const LinkBoardPackedStrip& lbstrip) const override;
0020 
0021 private:
0022   std::string theVersion;
0023   const RPCReadOutMapping* theMapping;
0024 
0025   struct lessMap {
0026     bool operator()(const LinkBoardElectronicIndex& lb1, const LinkBoardElectronicIndex& lb2) const;
0027   };
0028 
0029   typedef std::map<LinkBoardElectronicIndex, const LinkBoardSpec*, lessMap> LBMap;
0030   LBMap theLBMap;
0031 };
0032 #endif