CMS 3D CMS Logo

PTrackerParametersDBBuilder.cc
Go to the documentation of this file.
12 
13 class PTrackerParametersDBBuilder : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
14 public:
16 
17  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
18  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
19  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
20 
21 private:
23 };
24 
26  fromDD4hep_ = iConfig.getParameter<bool>("fromDD4hep");
27 }
28 
32  if (!mydbservice.isAvailable()) {
33  edm::LogError("PTrackerParametersDBBuilder") << "PoolDBOutputService unavailable";
34  return;
35  }
36 
38 
39  if (!fromDD4hep_) {
41  es.get<IdealGeometryRecord>().get(cpv);
42  builder.build(&(*cpv), *ptp);
43  } else {
45  es.get<IdealGeometryRecord>().get(cpv);
46  builder.build(&(*cpv), *ptp);
47  }
48 
49  if (mydbservice->isNewTagRequest("PTrackerParametersRcd")) {
50  mydbservice->createNewIOV<PTrackerParameters>(
51  ptp, mydbservice->beginOfTime(), mydbservice->endOfTime(), "PTrackerParametersRcd");
52  } else {
53  edm::LogError("PTrackerParametersDBBuilder") << "PTrackerParameters and PTrackerParametersRcd Tag already present";
54  }
55 }
56 
TrackerParametersFromDD.h
PTrackerParametersDBBuilder::PTrackerParametersDBBuilder
PTrackerParametersDBBuilder(const edm::ParameterSet &)
Definition: PTrackerParametersDBBuilder.cc:25
EDAnalyzer.h
ESTransientHandle.h
MessageLogger.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:187
PTrackerParameters
Definition: PTrackerParameters.h:6
edm::Run
Definition: Run.h:45
PTrackerParameters.h
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
DDCompactView.h
PTrackerParametersDBBuilder::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PTrackerParametersDBBuilder.cc:19
PTrackerParametersDBBuilder::fromDD4hep_
bool fromDD4hep_
Definition: PTrackerParametersDBBuilder.cc:22
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:110
Service.h
DDCompactView.h
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
PTrackerParametersDBBuilder::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: PTrackerParametersDBBuilder.cc:18
PTrackerParametersDBBuilder
Definition: PTrackerParametersDBBuilder.cc:13
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:185
TrackerParametersFromDD::build
bool build(const DDCompactView *, PTrackerParameters &)
Definition: TrackerParametersFromDD.cc:8
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:100
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrackerParametersFromDD
Definition: TrackerParametersFromDD.h:14
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
PTrackerParametersDBBuilder::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PTrackerParametersDBBuilder.cc:29