#include <OmtfLinkMappingRpc.h>
Definition at line 28 of file OmtfLinkMappingRpc.h.
omtf::RpcLinkMap::RpcLinkMap |
( |
| ) |
|
|
inline |
Definition at line 69 of file OmtfLinkMappingRpc.cc.
References l1t::stage2::layer2::fedId, edm::EventSetup::get(), RPCAMCLinkMap::getMap(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by omtf::RpcPacker::init(), and omtf::RpcUnpacker::init().
75 for (
const auto & item : amcMap ) {
76 unsigned int fedId = item.first.getFED();
77 unsigned int amcSlot = item.first.getAMCNumber();
78 unsigned int link = item.first.getAMCInput();
82 if (fedId==1380) processorNameStr =
"OMTFn";
else processorNameStr =
"OMTFp";
83 processorNameStr += std::to_string(amcSlot/2+1);
86 std::map< unsigned int, std::string > & li2lb =
link2lbName[processorName];
87 std::map< std::string, unsigned int > & lb2li =
lbName2link[processorName];
90 EleIndex ele(processorName, link);
unsigned int link(const std::string &board, const std::string &lbName) const
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
std::map< std::string, std::vector< EleIndex > > lbName2OmtfIndex
std::map< std::string, std::map< std::string, unsigned int > > lbName2link
std::map< RPCAMCLink, RPCLBLink > map_type
const std::string & lbName(const std::string &board, unsigned int link) const
void omtf::RpcLinkMap::init |
( |
const std::string & |
fName | ) |
|
Definition at line 95 of file OmtfLinkMappingRpc.cc.
References mps_splice::line, LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.
99 LogTrace(
"")<<
" reading OmtfRpcLinksMap from: "<<fName;
101 LogTrace(
"")<<
" Unable to open file "<<fName;
103 throw std::runtime_error(
"Unable to open OmtfRpcLinksMap file " + fName);
107 while (std::getline(inFile, line)) {
108 line.erase(0, line.find_first_not_of(
" \t\r\n"));
109 if (line.empty() || !line.compare(0,2,
"--"))
continue;
110 std::stringstream ss(line);
112 unsigned int link, dbId;
113 if (ss >> processorName >> link >> lbName >> dbId) {
114 std::map< unsigned int, std::string > & li2lb =
link2lbName[processorName];
115 std::map< std::string, unsigned int > & lb2li =
lbName2link[processorName];
118 EleIndex ele(processorName, link);
unsigned int link(const std::string &board, const std::string &lbName) const
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
std::map< std::string, std::vector< EleIndex > > lbName2OmtfIndex
std::map< std::string, std::map< std::string, unsigned int > > lbName2link
const std::string & lbName(const std::string &board, unsigned int link) const
const std::string& omtf::RpcLinkMap::lbName |
( |
const std::string & |
board, |
|
|
unsigned int |
link |
|
) |
| const |
|
inline |
Definition at line 36 of file OmtfLinkMappingRpc.h.
unsigned int link(const std::string &board, const std::string &lbName) const
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
unsigned int omtf::RpcLinkMap::link |
( |
const std::string & |
board, |
|
|
const std::string & |
lbName |
|
) |
| const |
|
inline |
std::vector< EleIndex > omtf::RpcLinkMap::omtfEleIndex |
( |
const std::string & |
lbName | ) |
const |
std::map<std::string, std::map<std::string, unsigned int> > omtf::RpcLinkMap::lbName2link |
|
private |
std::map<std::string, std::vector<EleIndex> > omtf::RpcLinkMap::lbName2OmtfIndex |
|
private |
std::map<std::string, std::map<unsigned int, std::string> > omtf::RpcLinkMap::link2lbName |
|
private |