CMS 3D CMS Logo

FastTimeParametersESModule.cc
Go to the documentation of this file.
10 
11 #include <memory>
12 
13 //#define EDM_ML_DEBUG
14 
16 public:
18  ~FastTimeParametersESModule(void) override;
19 
20  typedef std::shared_ptr<FastTimeParameters> ReturnType;
21 
23 
24  ReturnType produce(const IdealGeometryRecord&);
25 
26 private:
27  std::vector<std::string> name_;
28  std::vector<int> type_;
29 };
30 
32 
33  name_ = iC.getUntrackedParameter<std::vector<std::string> >("Names");
34  type_ = iC.getUntrackedParameter<std::vector<int> >("Types");
35  edm::LogInfo("HGCalGeom") << "FastTimeParametersESModule for "
36  << name_.size() << " types";
37 #ifdef EDM_ML_DEBUG
38  std::cout << "FastTimeParametersESModule for " << name_.size() << " types:";
39  for (unsigned int k=0; k<name_.size(); ++k)
40  std::cout << " [" << k << "] " << name_[k] << ":" << type_[k];
41  std::cout << std::endl;
42 #endif
43  setWhatProduced(this);
44 }
45 
47 
50  edm::LogInfo("HGCalGeom")
51  << "FastTimeParametersESModule::produce(const IdealGeometryRecord& iRecord)";
53  iRecord.get(cpv);
54 
57  for (unsigned int k=0; k<name_.size(); ++k)
58  builder.build(&(*cpv), *ptp, name_[k], type_[k]);
59 
60 #ifdef EDM_ML_DEBUG
61  std::cout << "FastTimeParametersESModule:: Barrel Parameters: "
62  << " number of cells along z|phi = " << ptp->nZBarrel_ << "|"
63  << ptp->nPhiBarrel_ << " Geometry parameters = ( ";
64  for (unsigned k=0; k<ptp->geomParBarrel_.size(); ++k)
65  std::cout << "[" << k << "] " << ptp->geomParBarrel_[k] << " ";
66  std::cout << ")" << std::endl;
67  std::cout << "FastTimeParametersESModule:: Endcap Parameters: "
68  << " number of cells along eta|phi = " << ptp->nEtaEndcap_ << "|"
69  << ptp->nPhiEndcap_ << " Geometry parameters = ( ";
70  for (unsigned k=0; k<ptp->geomParEndcap_.size(); ++k)
71  std::cout << "[" << k << "] " << ptp->geomParEndcap_[k] << " ";
72  std::cout << ")" << std::endl;
73 #endif
74  return ReturnType(ptp) ;
75 }
76 
77 //define this as a plug-in
T getUntrackedParameter(std::string const &, T const &) const
std::shared_ptr< FastTimeParameters > ReturnType
FastTimeParametersESModule(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< double > geomParEndcap_
void get(HolderT &iHolder) const
int k[5][pyjets_maxn]
std::vector< double > geomParBarrel_
bool build(const DDCompactView *, FastTimeParameters &, const std::string &, const int)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ReturnType produce(const IdealGeometryRecord &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::vector< std::string > name_