CMS 3D CMS Logo

MTDTopologyEP.cc
Go to the documentation of this file.
11 
12 #include <memory>
13 //#define EDM_ML_DEBUG
14 
16 public:
18 
19  using ReturnType = std::unique_ptr<MTDTopology>;
20 
21  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
22 
24 
25 private:
26  void fillParameters(const PMTDParameters&, int& mtdTopologyMode);
27 
29 };
30 
32  : token_{setWhatProduced(this).consumesFrom<PMTDParameters, PMTDParametersRcd>(edm::ESInputTag())} {}
33 
36  descriptions.add("mtdTopology", ttc);
37 }
38 
40  int mtdTopologyMode;
41 
42  fillParameters(iRecord.get(token_), mtdTopologyMode);
43 
44  return std::make_unique<MTDTopology>(mtdTopologyMode);
45 }
46 
47 void MTDTopologyEP::fillParameters(const PMTDParameters& ptp, int& mtdTopologyMode) {
48  mtdTopologyMode = ptp.topologyMode_;
49 
50 #ifdef EDM_ML_DEBUG
51 
52  edm::LogInfo("MTDTopologyEP") << "Topology mode = " << mtdTopologyMode;
53 
54 #endif
55 }
56 
ConfigurationDescriptions.h
PMTDParameters
Definition: PMTDParameters.h:6
MTDTopologyEP::produce
ReturnType produce(const MTDTopologyRcd &)
Definition: MTDTopologyEP.cc:39
MTDTopologyEP::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: MTDTopologyEP.cc:34
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
MTDTopologyEP::token_
const edm::ESGetToken< PMTDParameters, PMTDParametersRcd > token_
Definition: MTDTopologyEP.cc:28
ESHandle.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
MTDTopologyEP::ReturnType
std::unique_ptr< MTDTopology > ReturnType
Definition: MTDTopologyEP.cc:19
MTDTopologyEP::fillParameters
void fillParameters(const PMTDParameters &, int &mtdTopologyMode)
Definition: MTDTopologyEP.cc:47
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
MTDTopologyEP::MTDTopologyEP
MTDTopologyEP(const edm::ParameterSet &)
Definition: MTDTopologyEP.cc:31
PMTDParametersRcd.h
edm::ParameterSet
Definition: ParameterSet.h:47
MTDTopologyRcd
Definition: MTDTopologyRcd.h:10
PMTDParametersRcd
Definition: PMTDParametersRcd.h:9
PMTDParameters::topologyMode_
int topologyMode_
Definition: PMTDParameters.h:20
edm::ESGetToken< PMTDParameters, PMTDParametersRcd >
ModuleFactory.h
MTDTopologyRcd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
PMTDParameters.h
edm::ESProducer
Definition: ESProducer.h:104
MTDTopologyEP
Definition: MTDTopologyEP.cc:15
MTDTopology.h