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 
13 
14 class RPCReadOutMapping;
15 
16 namespace omtf {
17 
18  class RpcLinkMap;
19 
20  typedef std::map<EleIndex, LinkBoardElectronicIndex> MapEleIndex2LBIndex;
21  MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap& omtfLnks, const RPCReadOutMapping* pactCabling);
22 
24  bool operator()(const LinkBoardElectronicIndex& o1, const LinkBoardElectronicIndex& o2) const;
25  };
26  typedef std::map<LinkBoardElectronicIndex, std::pair<EleIndex, EleIndex>, lessLinkBoardElectronicIndex>
28  MapLBIndex2EleIndex translatePact2Omtf(const RpcLinkMap& omtfLnks, const RPCReadOutMapping* pactCabling);
29 
30  class RpcLinkMap {
31  public:
33 
34  void init(const RPCAMCLinkMap& es);
35 
36  void init(const std::string& fName);
37 
38  const std::string& lbName(const std::string& board, unsigned int link) const {
39  return link2lbName.at(board).at(link);
40  }
41 
42  unsigned int link(const std::string& board, const std::string& lbName) const {
43  return lbName2link.at(board).at(lbName);
44  }
45 
46  std::vector<EleIndex> omtfEleIndex(const std::string& lbName) const;
47 
48  private:
49  std::map<std::string, std::map<unsigned int, std::string> > link2lbName; //[processorName][rpcRxNum] - lbName
50  std::map<std::string, std::map<std::string, unsigned int> > lbName2link; //[processorName][lbName] - rpcRxNum
51  std::map<std::string, std::vector<EleIndex> > lbName2OmtfIndex; //[lbName] - vector of {board,rpcRxNum}
52  };
53 
54 } // namespace omtf
55 #endif
omtf::RpcLinkMap::lbName2link
std::map< std::string, std::map< std::string, unsigned int > > lbName2link
Definition: OmtfLinkMappingRpc.h:50
omtf::RpcLinkMap::lbName
const std::string & lbName(const std::string &board, unsigned int link) const
Definition: OmtfLinkMappingRpc.h:38
omtf::lessLinkBoardElectronicIndex
Definition: OmtfLinkMappingRpc.h:23
RPCAMCLinkMap
Definition: RPCAMCLinkMap.h:11
omtf::RpcLinkMap::init
void init(const RPCAMCLinkMap &es)
Definition: OmtfLinkMappingRpc.cc:75
MainPageGenerator.fName
fName
Definition: MainPageGenerator.py:301
RPCAMCLinkMap.h
OmtfEleIndex.h
omtf::lessLinkBoardElectronicIndex::operator()
bool operator()(const LinkBoardElectronicIndex &o1, const LinkBoardElectronicIndex &o2) const
Definition: OmtfLinkMappingRpc.cc:20
omtf::RpcLinkMap::omtfEleIndex
std::vector< EleIndex > omtfEleIndex(const std::string &lbName) const
Definition: OmtfLinkMappingRpc.cc:133
CastorDigiReco.o1
o1
Definition: CastorDigiReco.py:84
omtf::RpcLinkMap::link2lbName
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
Definition: OmtfLinkMappingRpc.h:49
omtf::RpcLinkMap
Definition: OmtfLinkMappingRpc.h:30
omtf::RpcLinkMap::lbName2OmtfIndex
std::map< std::string, std::vector< EleIndex > > lbName2OmtfIndex
Definition: OmtfLinkMappingRpc.h:51
omtf::translateOmtf2Pact
MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
Definition: OmtfLinkMappingRpc.cc:33
RPCReadOutMapping
Definition: RPCReadOutMapping.h:22
omtf::translatePact2Omtf
MapLBIndex2EleIndex translatePact2Omtf(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
Definition: OmtfLinkMappingRpc.cc:60
LinkBoardElectronicIndex.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LinkBoardElectronicIndex
Definition: LinkBoardElectronicIndex.h:10
omtf::MapLBIndex2EleIndex
std::map< LinkBoardElectronicIndex, std::pair< EleIndex, EleIndex >, lessLinkBoardElectronicIndex > MapLBIndex2EleIndex
Definition: OmtfLinkMappingRpc.h:27
omtf::RpcLinkMap::RpcLinkMap
RpcLinkMap()
Definition: OmtfLinkMappingRpc.h:32
omtf::MapEleIndex2LBIndex
std::map< EleIndex, LinkBoardElectronicIndex > MapEleIndex2LBIndex
Definition: OmtfLinkMappingRpc.h:18
omtf
Definition: OmtfCscDataWord64.h:7
omtf::RpcLinkMap::link
unsigned int link(const std::string &board, const std::string &lbName) const
Definition: OmtfLinkMappingRpc.h:42