21 #include <unordered_map> 60 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 <<
" : [";
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;
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()) <<
") " 110 dump_ElinkToDet << detId_it->second <<
", ";
112 dump_ElinkToDet <<
"}" << endl;
114 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