CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
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
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
 

Private Attributes

const edm::ESGetToken
< TrackerDetToDTCELinkCablingMap,
TrackerDetToDTCELinkCablingMapRcd
cablingMapToken_
 

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)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 41 of file DTCCablingMapTestReader.cc.

Constructor & Destructor Documentation

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

Definition at line 65 of file DTCCablingMapTestReader.cc.

const edm::ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > cablingMapToken_
DTCCablingMapTestReader::~DTCCablingMapTestReader ( )
override

Definition at line 67 of file DTCCablingMapTestReader.cc.

67 {}

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 69 of file DTCCablingMapTestReader.cc.

References cablingMapToken_, and edm::EventSetup::getData().

69  {
70  using namespace edm;
71  using namespace std;
72 
73  const auto p_cablingMap = &iSetup.getData(cablingMapToken_);
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 }
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Info, false > LogInfo
const edm::ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > cablingMapToken_
void DTCCablingMapTestReader::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 118 of file DTCCablingMapTestReader.cc.

118 {}
void DTCCablingMapTestReader::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 120 of file DTCCablingMapTestReader.cc.

120 {}
void DTCCablingMapTestReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 57 of file DTCCablingMapTestReader.cc.

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

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

Member Data Documentation

const edm::ESGetToken<TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd> DTCCablingMapTestReader::cablingMapToken_
private

Definition at line 54 of file DTCCablingMapTestReader.cc.

Referenced by analyze().