39 std::vector<const DccSpec*> dccs = pactCabling->
dccList();
40 for (
auto it1 : dccs) {
41 const std::vector<TriggerBoardSpec>& rmbs = it1->triggerBoards();
42 for (
auto const& it2 : rmbs) {
43 const std::vector<LinkConnSpec>&
links = it2.linkConns();
44 for (
auto const& it3 :
links) {
45 const std::vector<LinkBoardSpec>& lbs = it3.linkBoards();
46 for (std::vector<LinkBoardSpec>::const_iterator it4 = lbs.begin(); it4 != lbs.end(); ++it4) {
48 std::string lbName = lbNameCH.substr(0, lbNameCH.size() - 4);
49 std::vector<EleIndex> omtfEles = omtfLink2Ele.
omtfEleIndex(lbName);
52 it1->id(), it2.
dccInputChannelNum(), it3.triggerBoardInputNumber(), it4->linkBoardNumInLink()};
53 for (
const auto& omtfEle : omtfEles)
54 omtf2rpc[omtfEle] = rpcEle;
59 LogTrace(
" ") <<
" SIZE OF OMTF to RPC map TRANSLATION is: " << omtf2rpc.size() << std::endl;
66 for (
const auto& omtf2rpc : omtf2rpcs) {
67 std::pair<EleIndex, EleIndex>& omtfs = pact2omtfs[omtf2rpc.second];
68 if (omtfs.first.fed() == 0)
69 omtfs.first = omtf2rpc.first;
70 else if (omtfs.second.fed() == 0)
71 omtfs.second = omtf2rpc.first;
73 edm::LogError(
" translatePact2Omtf ") <<
" PROBLEM LinkBoardElectronicIndex already USED!!!! ";
83 for (
const auto&
item : amcMap) {
85 unsigned int amcSlot =
item.first.getAMCNumber();
86 unsigned int link =
item.first.getAMCInput();
92 processorNameStr =
"OMTFn";
94 processorNameStr =
"OMTFp";
95 processorNameStr += std::to_string(amcSlot / 2 + 1);
98 std::map<unsigned int, std::string>& li2lb =
link2lbName[processorName];
99 std::map<std::string, unsigned int>& lb2li =
lbName2link[processorName];
108 std::ifstream inFile;
115 throw std::runtime_error(
"Unable to open OmtfRpcLinksMap file " +
fName);
119 while (std::getline(inFile,
line)) {
120 line.erase(0,
line.find_first_not_of(
" \t\r\n"));
121 if (
line.empty() || !
line.compare(0, 2,
"--"))
123 std::stringstream
ss(
line);
125 unsigned int link, dbId;
127 std::map<unsigned int, std::string>& li2lb =
link2lbName[processorName];
128 std::map<std::string, unsigned int>& lb2li =
lbName2link[processorName];