CMS 3D CMS Logo

OmtfLinkMappingRpc.h
Go to the documentation of this file.
1 #ifndef EventFilter_L1TRawToDigi_Omtf_LinkMappingRpc_H
2 #define EventFilter_L1TRawToDigi_Omtf_LinkMappingRpc_H
3 
4 #include <fstream>
5 #include <string>
6 #include <utility>
7 #include <vector>
8 #include <map>
9 
12 
13 class RPCReadOutMapping;
14 namespace edm {
15  class EventSetup;
16 }
17 
18 namespace omtf {
19 
20  class RpcLinkMap;
21 
22  typedef std::map<EleIndex, LinkBoardElectronicIndex> MapEleIndex2LBIndex;
23  MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap& omtfLnks, const RPCReadOutMapping* pactCabling);
24 
26  bool operator()(const LinkBoardElectronicIndex& o1, const LinkBoardElectronicIndex& o2) const;
27  };
28  typedef std::map<LinkBoardElectronicIndex, std::pair<EleIndex, EleIndex>, lessLinkBoardElectronicIndex>
30  MapLBIndex2EleIndex translatePact2Omtf(const RpcLinkMap& omtfLnks, const RPCReadOutMapping* pactCabling);
31 
32  class RpcLinkMap {
33  public:
35 
36  void init(const edm::EventSetup& es);
37 
38  void init(const std::string& fName);
39 
40  const std::string& lbName(const std::string& board, unsigned int link) const {
41  return link2lbName.at(board).at(link);
42  }
43 
44  unsigned int link(const std::string& board, const std::string& lbName) const {
45  return lbName2link.at(board).at(lbName);
46  }
47 
48  std::vector<EleIndex> omtfEleIndex(const std::string& lbName) const;
49 
50  private:
51  std::map<std::string, std::map<unsigned int, std::string> > link2lbName; //[processorName][rpcRxNum] - lbName
52  std::map<std::string, std::map<std::string, unsigned int> > lbName2link; //[processorName][lbName] - rpcRxNum
53  std::map<std::string, std::vector<EleIndex> > lbName2OmtfIndex; //[lbName] - vector of {board,rpcRxNum}
54  };
55 
56 } // namespace omtf
57 #endif
omtf::RpcLinkMap::lbName2link
std::map< std::string, std::map< std::string, unsigned int > > lbName2link
Definition: OmtfLinkMappingRpc.h:52
edm
HLT enums.
Definition: AlignableModifier.h:19
omtf::RpcLinkMap::lbName
const std::string & lbName(const std::string &board, unsigned int link) const
Definition: OmtfLinkMappingRpc.h:40
omtf::lessLinkBoardElectronicIndex
Definition: OmtfLinkMappingRpc.h:25
omtf::RpcLinkMap::init
void init(const edm::EventSetup &es)
Definition: OmtfLinkMappingRpc.cc:78
MainPageGenerator.fName
fName
Definition: MainPageGenerator.py:301
OmtfEleIndex.h
omtf::lessLinkBoardElectronicIndex::operator()
bool operator()(const LinkBoardElectronicIndex &o1, const LinkBoardElectronicIndex &o2) const
Definition: OmtfLinkMappingRpc.cc:23
omtf::RpcLinkMap::omtfEleIndex
std::vector< EleIndex > omtfEleIndex(const std::string &lbName) const
Definition: OmtfLinkMappingRpc.cc:138
CastorDigiReco.o1
o1
Definition: CastorDigiReco.py:84
omtf::RpcLinkMap::link2lbName
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
Definition: OmtfLinkMappingRpc.h:51
omtf::RpcLinkMap
Definition: OmtfLinkMappingRpc.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
omtf::RpcLinkMap::lbName2OmtfIndex
std::map< std::string, std::vector< EleIndex > > lbName2OmtfIndex
Definition: OmtfLinkMappingRpc.h:53
omtf::translateOmtf2Pact
MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
Definition: OmtfLinkMappingRpc.cc:36
RPCReadOutMapping
Definition: RPCReadOutMapping.h:22
edm::EventSetup
Definition: EventSetup.h:58
omtf::translatePact2Omtf
MapLBIndex2EleIndex translatePact2Omtf(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
Definition: OmtfLinkMappingRpc.cc:63
LinkBoardElectronicIndex.h
LinkBoardElectronicIndex
Definition: LinkBoardElectronicIndex.h:10
omtf::MapLBIndex2EleIndex
std::map< LinkBoardElectronicIndex, std::pair< EleIndex, EleIndex >, lessLinkBoardElectronicIndex > MapLBIndex2EleIndex
Definition: OmtfLinkMappingRpc.h:29
omtf::RpcLinkMap::RpcLinkMap
RpcLinkMap()
Definition: OmtfLinkMappingRpc.h:34
omtf::MapEleIndex2LBIndex
std::map< EleIndex, LinkBoardElectronicIndex > MapEleIndex2LBIndex
Definition: OmtfLinkMappingRpc.h:20
EventSetup
omtf
Definition: OmtfCscDataWord64.h:7
omtf::RpcLinkMap::link
unsigned int link(const std::string &board, const std::string &lbName) const
Definition: OmtfLinkMappingRpc.h:44