36 std::vector<const DccSpec*> dccs = pactCabling->
dccList();
37 for (
auto it1 : dccs) {
38 const std::vector<TriggerBoardSpec>& rmbs = it1->triggerBoards();
39 for (
auto const& it2 : rmbs) {
40 const std::vector<LinkConnSpec>&
links = it2.linkConns();
41 for (
auto const& it3 :
links) {
42 const std::vector<LinkBoardSpec>& lbs = it3.linkBoards();
43 for (std::vector<LinkBoardSpec>::const_iterator it4 = lbs.begin(); it4 != lbs.end(); ++it4) {
49 it1->id(), it2.
dccInputChannelNum(), it3.triggerBoardInputNumber(), it4->linkBoardNumInLink()};
50 for (
const auto& omtfEle : omtfEles)
51 omtf2rpc[omtfEle] = rpcEle;
56 LogTrace(
" ") <<
" SIZE OF OMTF to RPC map TRANSLATION is: " << omtf2rpc.size() << std::endl;
63 for (
const auto& omtf2rpc : omtf2rpcs) {
64 std::pair<EleIndex, EleIndex>& omtfs = pact2omtfs[omtf2rpc.second];
65 if (omtfs.first.fed() == 0)
66 omtfs.first = omtf2rpc.first;
67 else if (omtfs.second.fed() == 0)
68 omtfs.second = omtf2rpc.first;
70 edm::LogError(
" translatePact2Omtf ") <<
" PROBLEM LinkBoardElectronicIndex already USED!!!! ";
78 for (
const auto&
item : amcMap) {
80 unsigned int amcSlot =
item.first.getAMCNumber();
81 unsigned int link =
item.first.getAMCInput();
87 processorNameStr =
"OMTFn";
89 processorNameStr =
"OMTFp";
93 std::map<unsigned int, std::string>& li2lb =
link2lbName[processorName];
94 std::map<std::string, unsigned int>& lb2li =
lbName2link[processorName];
110 throw std::runtime_error(
"Unable to open OmtfRpcLinksMap file " +
fName);
115 line.erase(0,
line.find_first_not_of(
" \t\r\n"));
116 if (
line.empty() || !
line.compare(0, 2,
"--"))
118 std::stringstream
ss(
line);
120 unsigned int link, dbId;
122 std::map<unsigned int, std::string>& li2lb =
link2lbName[processorName];
123 std::map<std::string, unsigned int>& lb2li =
lbName2link[processorName];
std::vector< EleIndex > omtfEleIndex(const std::string &lbName) const
std::map< std::string, std::map< unsigned int, std::string > > link2lbName
std::map< std::string, std::vector< EleIndex > > lbName2OmtfIndex
MapLBIndex2EleIndex translatePact2Omtf(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
std::string to_string(const V &value)
std::map< LinkBoardElectronicIndex, std::pair< EleIndex, EleIndex >, lessLinkBoardElectronicIndex > MapLBIndex2EleIndex
std::map< EleIndex, LinkBoardElectronicIndex > MapEleIndex2LBIndex
std::map< std::string, std::map< std::string, unsigned int > > lbName2link
std::vector< const DccSpec * > dccList() const
all FEDs in map
std::map< RPCAMCLink, RPCLBLink > map_type
unsigned int link(const std::string &board, const std::string &lbName) const
bool operator()(const LinkBoardElectronicIndex &o1, const LinkBoardElectronicIndex &o2) const
MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
const std::string & lbName(const std::string &board, unsigned int link) const
void init(const RPCAMCLinkMap &es)