CMS 3D CMS Logo

FastTimeParametersESModule.cc
Go to the documentation of this file.
10 
11 //#define EDM_ML_DEBUG
12 
14  public:
16  ~FastTimeParametersESModule(void) override;
17 
18  using ReturnType = std::unique_ptr<FastTimeParameters>;
19 
21 
23 
24  private:
26  std::vector<std::string> name_;
27  std::vector<int> type_;
28 };
29 
32 {
33  name_ = iC.getUntrackedParameter<std::vector<std::string> >("Names");
34  type_ = iC.getUntrackedParameter<std::vector<int> >("Types");
35 #ifdef EDM_ML_DEBUG
36  edm::LogVerbatim("HGCalGeom")
37  << "FastTimeParametersESModule for " << name_.size() << " types:";
38  for (unsigned int k = 0; k < name_.size(); ++k)
39  edm::LogVerbatim("HGCalGeom")
40  << " [" << k << "] " << name_[k] << ":" << type_[k];
41 #endif
42 }
43 
45 
47  const IdealGeometryRecord& iRecord) {
48  edm::LogVerbatim("HGCalGeom")
49  << "FastTimeParametersESModule::produce(const IdealGeometryRecord& iRecord)";
51 
52  auto ptp = std::make_unique<FastTimeParameters>();
54  for (unsigned int k = 0; k < name_.size(); ++k)
55  builder.build(cpv.product(), *ptp, name_[k], type_[k]);
56 
57 #ifdef EDM_ML_DEBUG
58  edm::LogVerbatim("HGCalGeom")
59  << "FastTimeParametersESModule:: Barrel Parameters: "
60  << " number of cells along z|phi = " << ptp->nZBarrel_ << "|"
61  << ptp->nPhiBarrel_ << " Geometry parameters:";
62  for (unsigned k = 0; k < ptp->geomParBarrel_.size(); ++k)
63  edm::LogVerbatim("HGCalGeom")
64  << "[" << k << "] " << ptp->geomParBarrel_[k];
65  edm::LogVerbatim("HGCalGeom")
66  << "FastTimeParametersESModule:: Endcap Parameters: "
67  << " number of cells along eta|phi = " << ptp->nEtaEndcap_ << "|"
68  << ptp->nPhiEndcap_ << " Geometry parameters:";
69  for (unsigned k = 0; k < ptp->geomParEndcap_.size(); ++k)
70  edm::LogVerbatim("HGCalGeom")
71  << "[" << k << "] " << ptp->geomParEndcap_[k];
72 #endif
73  return ptp;
74 }
75 
76 // define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
FastTimeParametersESModule(const edm::ParameterSet &)
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
int k[5][pyjets_maxn]
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
bool build(const DDCompactView *, FastTimeParameters &, const std::string &, const int)
std::unique_ptr< FastTimeParameters > ReturnType
T const * product() const
ReturnType produce(const IdealGeometryRecord &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::vector< std::string > name_