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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 42 of file DTCCablingMapTestReader.cc.

Constructor & Destructor Documentation

◆ DTCCablingMapTestReader()

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

Definition at line 63 of file DTCCablingMapTestReader.cc.

63 {}

◆ ~DTCCablingMapTestReader()

DTCCablingMapTestReader::~DTCCablingMapTestReader ( )
override

Definition at line 65 of file DTCCablingMapTestReader.cc.

65 {}

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 67 of file DTCCablingMapTestReader.cc.

67  {
68  using namespace edm;
69  using namespace std;
70 
72  iSetup.get<TrackerDetToDTCELinkCablingMapRcd>().get(cablingMapHandle);
73  TrackerDetToDTCELinkCablingMap const* p_cablingMap = cablingMapHandle.product();
74 
75  {
76  ostringstream dump_DetToElink;
77 
78  dump_DetToElink << "Det To DTC ELink map elements dump (Python-style):" << endl;
79  std::vector<uint32_t> const knownDetIds = p_cablingMap->getKnownDetIds();
80 
81  dump_DetToElink << "{";
82  for (uint32_t detId : knownDetIds) {
83  dump_DetToElink << "(" << detId << " : [";
84  auto equal_range = p_cablingMap->detIdToDTCELinkId(detId);
85 
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()) << "), ";
89 
90  dump_DetToElink << "], ";
91  }
92  dump_DetToElink << "}" << endl;
93 
94  edm::LogInfo("DetToElinkCablingMapDump") << dump_DetToElink.str();
95  }
96 
97  {
98  ostringstream dump_ElinkToDet;
99 
100  dump_ElinkToDet << "DTC Elink To Det map elements dump (Python-style):" << endl;
101  std::vector<DTCELinkId> const knownDTCELinkIds = p_cablingMap->getKnownDTCELinkIds();
102 
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()) << ") "
107  << " : ";
108  auto detId_it = p_cablingMap->dtcELinkIdToDetId(currentELink);
109 
110  dump_ElinkToDet << detId_it->second << ", ";
111  }
112  dump_ElinkToDet << "}" << endl;
113 
114  edm::LogInfo("DetToElinkCablingMapDump") << dump_ElinkToDet.str();
115  }
116 }

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

◆ beginJob()

void DTCCablingMapTestReader::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 118 of file DTCCablingMapTestReader.cc.

118 {}

◆ endJob()

void DTCCablingMapTestReader::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 120 of file DTCCablingMapTestReader.cc.

120 {}

◆ fillDescriptions()

void DTCCablingMapTestReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 55 of file DTCCablingMapTestReader.cc.

55  {
56  //The following says we do not know what parameters are allowed so do no validation
57  // Please change this to state exactly what you do use, even if it is no parameters
59  desc.setUnknown();
60  descriptions.add("DTCCablingMapTestReader", desc);
61 }

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

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TrackerDetToDTCELinkCablingMap
Definition: TrackerDetToDTCELinkCablingMap.h:29
DTCELinkId
Definition: DTCELinkId.h:28
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackerDetToDTCELinkCablingMap::getKnownDTCELinkIds
std::vector< DTCELinkId > getKnownDTCELinkIds() const
Returns a vector containing all elink DTCELinkId nown to the map.
Definition: TrackerDetToDTCELinkCablingMap.cc:48
TrackerDetToDTCELinkCablingMap::detIdToDTCELinkId
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...
Definition: TrackerDetToDTCELinkCablingMap.cc:27
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ESHandle
Definition: DTSurvey.h:22
TrackerDetToDTCELinkCablingMap::getKnownDetIds
std::vector< uint32_t > getKnownDetIds() const
Returns a vector containing all detector DetId known to the map.
Definition: TrackerDetToDTCELinkCablingMap.cc:60
TrackerDetToDTCELinkCablingMap::dtcELinkIdToDetId
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.
Definition: TrackerDetToDTCELinkCablingMap.cc:12
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
get
#define get
std
Definition: JetResolutionObject.h:76
TrackerDetToDTCELinkCablingMapRcd
Definition: TrackerDetToDTCELinkCablingMapRcd.h:23