CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
DTCCablingMapTestReader Class Reference

#include <CondTools/SiPhase2Tracker/plugins/DTCCablingMapTestReader.cc>

Inheritance diagram for DTCCablingMapTestReader:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DTCCablingMapTestReader (const edm::ParameterSet &)
 
 ~DTCCablingMapTestReader () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 43 of file DTCCablingMapTestReader.cc.

Constructor & Destructor Documentation

DTCCablingMapTestReader::DTCCablingMapTestReader ( const edm::ParameterSet iConfig)
explicit

Definition at line 70 of file DTCCablingMapTestReader.cc.

71 {
72 
73 }
DTCCablingMapTestReader::~DTCCablingMapTestReader ( )
override

Definition at line 76 of file DTCCablingMapTestReader.cc.

77 {
78 
79 }

Member Function Documentation

void DTCCablingMapTestReader::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 82 of file DTCCablingMapTestReader.cc.

References TrackerDetToDTCELinkCablingMap::detIdToDTCELinkId(), TrackerDetToDTCELinkCablingMap::dtcELinkIdToDetId(), edm::EventSetup::get(), TrackerDetToDTCELinkCablingMap::getKnownDetIds(), TrackerDetToDTCELinkCablingMap::getKnownDTCELinkIds(), and edm::ESHandle< T >::product().

83 {
84  using namespace edm;
85  using namespace std;
86 
88  iSetup.get<TrackerDetToDTCELinkCablingMapRcd>().get( cablingMapHandle );
89  TrackerDetToDTCELinkCablingMap const* p_cablingMap = cablingMapHandle.product();
90 
91  {
92  ostringstream dump_DetToElink;
93 
94  dump_DetToElink << "Det To DTC ELink map elements dump (Python-style):" << endl;
95  std::vector<uint32_t> const knownDetIds = p_cablingMap->getKnownDetIds();
96 
97  dump_DetToElink << "{";
98  for (uint32_t detId : knownDetIds)
99  {
100 
101  dump_DetToElink << "(" << detId << " : [";
102  auto equal_range = p_cablingMap->detIdToDTCELinkId(detId);
103 
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()) << "), ";
106 
107  dump_DetToElink << "], ";
108  }
109  dump_DetToElink << "}" << endl;
110 
111  edm::LogInfo("DetToElinkCablingMapDump") << dump_DetToElink.str();
112  }
113 
114  {
115  ostringstream dump_ElinkToDet;
116 
117  dump_ElinkToDet << "DTC Elink To Det map elements dump (Python-style):" << endl;
118  std::vector<DTCELinkId> const knownDTCELinkIds = p_cablingMap->getKnownDTCELinkIds();
119 
120  dump_ElinkToDet << "{";
121  for (DTCELinkId const& currentELink : knownDTCELinkIds)
122  {
123  dump_ElinkToDet << "(" << unsigned(currentELink.dtc_id()) << ", " << unsigned(currentELink.gbtlink_id()) << ", " << unsigned(currentELink.elink_id()) << ") " << " : ";
124  auto detId_it = p_cablingMap->dtcELinkIdToDetId(currentELink);
125 
126  dump_ElinkToDet << detId_it->second << ", ";
127  }
128  dump_ElinkToDet << "}" << endl;
129 
130  edm::LogInfo("DetToElinkCablingMapDump") << dump_ElinkToDet.str();
131  }
132 }
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.
std::vector< uint32_t > getKnownDetIds() const
Returns a vector containing all detector DetId known to the map.
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...
HLT enums.
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
void DTCCablingMapTestReader::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 135 of file DTCCablingMapTestReader.cc.

136 {
137 
138 }
void DTCCablingMapTestReader::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 141 of file DTCCablingMapTestReader.cc.

References DEFINE_FWK_MODULE.

142 {
143 
144 }
void DTCCablingMapTestReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 60 of file DTCCablingMapTestReader.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::setUnknown().

61 {
62  //The following says we do not know what parameters are allowed so do no validation
63  // Please change this to state exactly what you do use, even if it is no parameters
65  desc.setUnknown();
66  descriptions.add("DTCCablingMapTestReader", desc);
67 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)