CMS 3D CMS Logo

MkFitIterationConfigESProducer.cc
Go to the documentation of this file.
3 
5 
7 
8 // mkFit includes
9 #include "mkFit/IterationConfig.h"
10 
12 public:
14 
15  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
16 
17  std::unique_ptr<mkfit::IterationConfig> produce(const TrackerRecoGeometryRecord& iRecord);
18 
19 private:
22 };
23 
25  : geomToken_{setWhatProduced(this, iConfig.getParameter<std::string>("ComponentName")).consumes()},
26  configFile_{iConfig.getParameter<edm::FileInPath>("config").fullPath()} {}
27 
30  desc.add<std::string>("ComponentName")->setComment("Product label");
31  desc.add<edm::FileInPath>("config")->setComment("Path to the JSON file for the mkFit configuration parameters");
32  descriptions.addWithDefaultLabel(desc);
33 }
34 
35 std::unique_ptr<mkfit::IterationConfig> MkFitIterationConfigESProducer::produce(
36  const TrackerRecoGeometryRecord& iRecord) {
37  return mkfit::ConfigJson_Load_File(iRecord.get(geomToken_).iterationsInfo(), configFile_);
38 }
39 
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
TrackerRecoGeometryRecord.h
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
MkFitIterationConfigESProducer::geomToken_
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > geomToken_
Definition: MkFitIterationConfigESProducer.cc:20
edm::FileInPath
Definition: FileInPath.h:61
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
MkFitIterationConfigESProducer::produce
std::unique_ptr< mkfit::IterationConfig > produce(const TrackerRecoGeometryRecord &iRecord)
Definition: MkFitIterationConfigESProducer.cc:35
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MkFitIterationConfigESProducer::configFile_
const std::string configFile_
Definition: MkFitIterationConfigESProducer.cc:21
edm::ESProducer
Definition: ESProducer.h:104
MkFitIterationConfigESProducer::MkFitIterationConfigESProducer
MkFitIterationConfigESProducer(const edm::ParameterSet &iConfig)
Definition: MkFitIterationConfigESProducer.cc:24
MkFitIterationConfigESProducer
Definition: MkFitIterationConfigESProducer.cc:11
MkFitIterationConfigESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: MkFitIterationConfigESProducer.cc:28
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87
MkFitGeometry.h