21 #include <unordered_map> 62 descriptions.
add(
"DTCCablingMapTestReader",
desc);
76 ostringstream dump_DetToElink;
78 dump_DetToElink <<
"Det To DTC ELink map elements dump (Python-style):" << endl;
79 std::vector<uint32_t>
const knownDetIds = p_cablingMap->getKnownDetIds();
81 dump_DetToElink <<
"{";
82 for (uint32_t detId : knownDetIds) {
83 dump_DetToElink <<
"(" << detId <<
" : [";
84 auto equal_range = p_cablingMap->detIdToDTCELinkId(detId);
86 for (
auto it = equal_range.first; it != equal_range.second; ++it)
87 dump_DetToElink <<
"(" << unsigned(it->second.dtc_id()) <<
", " <<
unsigned(it->second.gbtlink_id()) <<
", " 88 <<
unsigned(it->second.elink_id()) <<
"), ";
90 dump_DetToElink <<
"], ";
92 dump_DetToElink <<
"}" << endl;
94 edm::LogInfo(
"DetToElinkCablingMapDump") << dump_DetToElink.str();
98 ostringstream dump_ElinkToDet;
100 dump_ElinkToDet <<
"DTC Elink To Det map elements dump (Python-style):" << endl;
101 std::vector<DTCELinkId>
const knownDTCELinkIds = p_cablingMap->getKnownDTCELinkIds();
103 dump_ElinkToDet <<
"{";
104 for (
DTCELinkId const& currentELink : knownDTCELinkIds) {
105 dump_ElinkToDet <<
"(" << unsigned(currentELink.dtc_id()) <<
", " <<
unsigned(currentELink.gbtlink_id()) <<
", " 106 <<
unsigned(currentELink.elink_id()) <<
") " 108 auto detId_it = p_cablingMap->dtcELinkIdToDetId(currentELink);
110 dump_ElinkToDet << detId_it->second <<
", ";
112 dump_ElinkToDet <<
"}" << endl;
114 edm::LogInfo(
"DetToElinkCablingMapDump") << dump_ElinkToDet.str();
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
DTCCablingMapTestReader(const edm::ParameterSet &)
~DTCCablingMapTestReader() override
bool getData(T &iHolder) const
Log< level::Info, false > LogInfo
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > cablingMapToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)