21 #include <unordered_map> 66 descriptions.
add(
"DTCCablingMapTestReader", desc);
92 ostringstream dump_DetToElink;
94 dump_DetToElink <<
"Det To DTC ELink map elements dump (Python-style):" << endl;
95 std::vector<uint32_t>
const knownDetIds = p_cablingMap->
getKnownDetIds();
97 dump_DetToElink <<
"{";
98 for (uint32_t detId : knownDetIds)
101 dump_DetToElink <<
"(" << detId <<
" : [";
104 for (
auto it = equal_range.first; it != equal_range.second; ++it)
105 dump_DetToElink <<
"(" << unsigned(it->second.dtc_id()) <<
", " <<
unsigned(it->second.gbtlink_id()) <<
", " <<
unsigned(it->second.elink_id()) <<
"), ";
107 dump_DetToElink <<
"], ";
109 dump_DetToElink <<
"}" << endl;
111 edm::LogInfo(
"DetToElinkCablingMapDump") << dump_DetToElink.str();
115 ostringstream dump_ElinkToDet;
117 dump_ElinkToDet <<
"DTC Elink To Det map elements dump (Python-style):" << endl;
120 dump_ElinkToDet <<
"{";
121 for (
DTCELinkId const& currentELink : knownDTCELinkIds)
123 dump_ElinkToDet <<
"(" << unsigned(currentELink.dtc_id()) <<
", " <<
unsigned(currentELink.gbtlink_id()) <<
", " <<
unsigned(currentELink.elink_id()) <<
") " <<
" : ";
126 dump_ElinkToDet << detId_it->second <<
", ";
128 dump_ElinkToDet <<
"}" << endl;
130 edm::LogInfo(
"DetToElinkCablingMapDump") << dump_ElinkToDet.str();
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unordered_map< DTCELinkId, uint32_t >::const_iterator dtcELinkIdToDetId(DTCELinkId const &) const
Resolves the raw DetId of the detector connected to the eLink identified by a DTCELinkId.
std::vector< DTCELinkId > getKnownDTCELinkIds() const
Returns a vector containing all elink DTCELinkId nown to the map.
DTCCablingMapTestReader(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
~DTCCablingMapTestReader() override
std::vector< uint32_t > getKnownDetIds() const
Returns a vector containing all detector DetId known to the map.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::pair< std::unordered_multimap< uint32_t, DTCELinkId >::const_iterator, std::unordered_multimap< uint32_t, DTCELinkId >::const_iterator > detIdToDTCELinkId(uint32_t const) const
Resolves one or more DTCELinkId of eLinks which are connected to the detector identified by the given...
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const