CMS 3D CMS Logo

PTrackerAdditionalParametersPerDetDBBuilder.cc
Go to the documentation of this file.
10 
12 public:
14 
15  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
16  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
17  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
18 
19 private:
21 };
22 
24  const edm::ParameterSet& iConfig)
25  : geomDetToken_(esConsumes<edm::Transition::BeginRun>()) {}
26 
30  if (!mydbservice.isAvailable()) {
31  edm::LogError("PTrackerAdditionalParametersPerDetDBBuilder") << "PoolDBOutputService unavailable";
32  return;
33  }
34 
35  const GeometricDet* gd = &es.getData(geomDetToken_);
36 
37  std::vector<const GeometricDet*> comp;
38  gd->deepComponents(comp);
39 
40  for (auto& i : comp) {
41  ptitp->setGeographicalId(i->geographicalId());
42  ptitp->setBricked(i->isBricked());
43  }
44 
45  if (mydbservice->isNewTagRequest("PTrackerAdditionalParametersPerDetRcd")) {
47  ptitp, mydbservice->beginOfTime(), mydbservice->endOfTime(), "PTrackerAdditionalParametersPerDetRcd");
48  } else {
49  edm::LogError("PTrackerAdditionalParametersPerDetDBBuilder")
50  << "PTrackerAdditionalParametersPerDet and PTrackerAdditionalParametersPerDetRcd Tag already present";
51  }
52 }
53 
AlCaHLTBitMon_QueryRunRegistry.comp
string comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
PTrackerAdditionalParametersPerDetDBBuilder::PTrackerAdditionalParametersPerDetDBBuilder
PTrackerAdditionalParametersPerDetDBBuilder(const edm::ParameterSet &)
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:23
ESTransientHandle.h
MessageLogger.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
PTrackerAdditionalParametersPerDet
Definition: PTrackerAdditionalParametersPerDet.h:9
PTrackerAdditionalParametersPerDet::setGeographicalId
void setGeographicalId(int geographicalId)
Definition: PTrackerAdditionalParametersPerDet.cc:46
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
MakerMacros.h
PoolDBOutputService.h
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:116
PTrackerAdditionalParametersPerDetDBBuilder::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:16
Service.h
GeometricDet
Definition: GeometricDet.h:31
edm::ParameterSet
Definition: ParameterSet.h:47
PTrackerAdditionalParametersPerDetDBBuilder::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:27
edm::Transition
Transition
Definition: Transition.h:12
PTrackerAdditionalParametersPerDetDBBuilder
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:11
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
PTrackerAdditionalParametersPerDetDBBuilder::geomDetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:20
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GeometricDet::deepComponents
ConstGeometricDetContainer deepComponents() const
Definition: GeometricDet.cc:252
GeometricDet.h
edm::ESGetToken< GeometricDet, IdealGeometryRecord >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:213
PTrackerAdditionalParametersPerDet::setBricked
void setBricked(bool isBricked)
Definition: PTrackerAdditionalParametersPerDet.cc:50
PTrackerAdditionalParametersPerDet.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
PTrackerAdditionalParametersPerDetDBBuilder::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PTrackerAdditionalParametersPerDetDBBuilder.cc:17