CMS 3D CMS Logo

LHCInfoPerLSWriter.cc
Go to the documentation of this file.
6 
9 
11 
14 
15 #include <memory>
16 #include <iostream>
17 
19 public:
21 
22 private:
23  void beginJob() override {}
24  void analyze(const edm::Event&, const edm::EventSetup&) override;
25  void endJob() override {}
26 };
27 
29  LHCInfoPerLS lhcInfoPerLS;
30  lhcInfoPerLS.setFillNumber(7066);
31  lhcInfoPerLS.setLumiSection(1);
32  lhcInfoPerLS.setCrossingAngleX(170);
33  lhcInfoPerLS.setCrossingAngleY(170);
34  lhcInfoPerLS.setBetaStarX(11);
35  lhcInfoPerLS.setBetaStarY(11);
36  lhcInfoPerLS.setRunNumber(301765);
37 
38  // store the info into a DB object
40  if (poolDbService.isAvailable())
41  poolDbService->writeOneIOV(lhcInfoPerLS, poolDbService->currentTime(), "LHCInfoPerLSRcd");
42  else
43  throw cms::Exception("LHCInfoPerLSWriter") << "PoolDBService required.";
44 }
45 
void setFillNumber(unsigned short const &lhcFill)
Definition: LHCInfoPerLS.cc:26
void setCrossingAngleY(float const &angle)
Definition: LHCInfoPerLS.cc:38
void setLumiSection(unsigned int const &lumiSection)
Definition: LHCInfoPerLS.cc:30
void endJob() override
void setBetaStarX(float const &betaStar)
Definition: LHCInfoPerLS.cc:42
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &, const edm::EventSetup &) override
void setBetaStarY(float const &betaStar)
Definition: LHCInfoPerLS.cc:46
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
LHCInfoPerLSWriter(const edm::ParameterSet &)
void setCrossingAngleX(float const &angle)
Definition: LHCInfoPerLS.cc:34
void beginJob() override
bool isAvailable() const
Definition: Service.h:40
void setRunNumber(cond::Time_t const &runNumber)
Definition: LHCInfoPerLS.cc:50