RPCReadOutMappingWithFastSearch

lessMap

Macros

Line Code
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
#ifndef RPCReadOutMappingWithFastSearch_H
#define RPCReadOutMappingWithFastSearch_H

#include "CondFormats/RPCObjects/interface/RPCReadOutMapping.h"
#include <string>
#include <map>

class RPCReadOutMappingWithFastSearch : public RPCReadOutMapping {
public:
  RPCReadOutMappingWithFastSearch();
  ~RPCReadOutMappingWithFastSearch() override {}

  /// takes ownership of map
  void init(const RPCReadOutMapping* arm);

  const LinkBoardSpec* location(const LinkBoardElectronicIndex& ele) const override;

  RPCReadOutMapping::StripInDetUnit detUnitFrame(const LinkBoardSpec& location,
                                                 const LinkBoardPackedStrip& lbstrip) const override;

private:
  std::string theVersion;
  const RPCReadOutMapping* theMapping;

  struct lessMap {
    bool operator()(const LinkBoardElectronicIndex& lb1, const LinkBoardElectronicIndex& lb2) const;
  };

  typedef std::map<LinkBoardElectronicIndex, const LinkBoardSpec*, lessMap> LBMap;
  LBMap theLBMap;
};
#endif