CMS 3D CMS Logo

BeamProfile2DB.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: BeamProfile2DB
4 // Class: BeamProfile2DB
5 //
13 //
14 // Original Author: Jean-Roch Vlimant,40 3-A28,+41227671209,
15 // Created: Fri Jan 6 14:49:42 CET 2012
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
25 
28 
30 
34 
35 //
36 // class declaration
37 //
38 
40 public:
41  explicit BeamProfile2DB(const edm::ParameterSet&);
42  ~BeamProfile2DB() override;
43 
44  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
45 
46 private:
47  void beginJob() override;
48  void analyze(const edm::Event&, const edm::EventSetup&) override;
49  void endJob() override;
50 
51  // ----------member data ---------------------------
53 };
54 
55 //
56 // constants, enums and typedefs
57 //
58 
59 //
60 // static data member definitions
61 //
62 
63 //
64 // constructors and destructor
65 //
67 
68 {
69  config_ = iConfig;
70 }
71 
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75 }
76 
77 //
78 // member functions
79 //
80 
81 // ------------ method called for each event ------------
83 
84 // ------------ method called once each job just before starting event loop ------------
86 
87 // ------------ method called once each job just after ending the event loop ------------
91 
92  beam->read(config_);
93 
94  poolDbService->createNewIOV<SimBeamSpotObjects>(
95  beam, poolDbService->beginOfTime(), poolDbService->endOfTime(), "SimBeamSpotObjectsRcd");
96 }
97 
98 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
100  //The following says we do not know what parameters are allowed so do no validation
101  // Please change this to state exactly what you do use, even if it is no parameters
103  desc.setUnknown();
104  descriptions.addDefault(desc);
105 }
106 
107 //define this as a plug-in
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
BeamProfile2DB::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: BeamProfile2DB.cc:82
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SimBeamSpotObjects.h
EDAnalyzer.h
BeamProfile2DB
Definition: BeamProfile2DB.cc:39
SimBeamSpotObjects
Definition: SimBeamSpotObjects.h:18
BeamProfile2DB::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: BeamProfile2DB.cc:99
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
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:107
BeamProfile2DB::BeamProfile2DB
BeamProfile2DB(const edm::ParameterSet &)
Definition: BeamProfile2DB.cc:66
Service.h
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
BeamProfile2DB::beginJob
void beginJob() override
Definition: BeamProfile2DB.cc:85
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
BeamProfile2DB::~BeamProfile2DB
~BeamProfile2DB() override
Definition: BeamProfile2DB.cc:72
BeamProfile2DB::config_
edm::ParameterSet config_
Definition: BeamProfile2DB.cc:52
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
edm::EventSetup
Definition: EventSetup.h:57
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
Frameworkfwd.h
BeamProfile2DB::endJob
void endJob() override
Definition: BeamProfile2DB.cc:88
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99