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 
31  : cpvToken_{setWhatProduced(this).consumes<DDCompactView>(edm::ESInputTag{})} {
32  name_ = iC.getUntrackedParameter<std::vector<std::string> >("Names");
33  type_ = iC.getUntrackedParameter<std::vector<int> >("Types");
34 #ifdef EDM_ML_DEBUG
35  edm::LogVerbatim("HGCalGeom") << "FastTimeParametersESModule for " << name_.size() << " types:";
36  for (unsigned int k = 0; k < name_.size(); ++k)
37  edm::LogVerbatim("HGCalGeom") << " [" << k << "] " << name_[k] << ":" << type_[k];
38 #endif
39 }
40 
42 
44  edm::LogVerbatim("HGCalGeom") << "FastTimeParametersESModule::produce(const IdealGeometryRecord& iRecord)";
46 
47  auto ptp = std::make_unique<FastTimeParameters>();
49  for (unsigned int k = 0; k < name_.size(); ++k)
50  builder.build(cpv.product(), *ptp, name_[k], type_[k]);
51 
52 #ifdef EDM_ML_DEBUG
53  edm::LogVerbatim("HGCalGeom") << "FastTimeParametersESModule:: Barrel Parameters: "
54  << " number of cells along z|phi = " << ptp->nZBarrel_ << "|" << ptp->nPhiBarrel_
55  << " Geometry parameters:";
56  for (unsigned k = 0; k < ptp->geomParBarrel_.size(); ++k)
57  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << ptp->geomParBarrel_[k];
58  edm::LogVerbatim("HGCalGeom") << "FastTimeParametersESModule:: Endcap Parameters: "
59  << " number of cells along eta|phi = " << ptp->nEtaEndcap_ << "|" << ptp->nPhiEndcap_
60  << " Geometry parameters:";
61  for (unsigned k = 0; k < ptp->geomParEndcap_.size(); ++k)
62  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << ptp->geomParEndcap_[k];
63 #endif
64  return ptp;
65 }
66 
67 // define this as a plug-in
edm::ESInputTag
Definition: ESInputTag.h:87
ESTransientHandle.h
MessageLogger.h
edm::ESTransientHandle::product
T const * product() const
Definition: ESTransientHandle.h:51
FastTimeParametersESModule::type_
std::vector< int > type_
Definition: FastTimeParametersESModule.cc:27
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESProducer.h
FastTimeParametersFromDD.h
FastTimeParametersESModule::name_
std::vector< std::string > name_
Definition: FastTimeParametersESModule.cc:26
FastTimeParametersFromDD::build
bool build(const DDCompactView *, FastTimeParameters &, const std::string &, const int)
Definition: FastTimeParametersFromDD.cc:11
FastTimeParametersESModule::ReturnType
std::unique_ptr< FastTimeParameters > ReturnType
Definition: FastTimeParametersESModule.cc:18
DDCompactView.h
FastTimeParametersESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: FastTimeParametersESModule.cc:20
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:92
dqmdumpme.k
k
Definition: dqmdumpme.py:60
FastTimeParametersESModule::~FastTimeParametersESModule
~FastTimeParametersESModule(void) override
Definition: FastTimeParametersESModule.cc:41
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
IdealGeometryRecord.h
FastTimeParametersESModule::FastTimeParametersESModule
FastTimeParametersESModule(const edm::ParameterSet &)
Definition: FastTimeParametersESModule.cc:30
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
FastTimeParametersESModule
Definition: FastTimeParametersESModule.cc:13
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
edm::ESProducer
Definition: ESProducer.h:104
ParameterSet.h
FastTimeParametersFromDD
Definition: FastTimeParametersFromDD.h:10
edm::Log
Definition: MessageLogger.h:70
FastTimeParametersESModule::produce
ReturnType produce(const IdealGeometryRecord &)
Definition: FastTimeParametersESModule.cc:43
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
FastTimeParameters.h
FastTimeParametersESModule::cpvToken_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
Definition: FastTimeParametersESModule.cc:25