RecoVertex
BeamSpotProducer
plugins
BeamSpotFromDB.cc
Go to the documentation of this file.
1
12
// C++ standard
13
#include <string>
14
// CMS
15
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
16
#include "
RecoVertex/BeamSpotProducer/interface/BeamSpotFromDB.h
"
17
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
20
#include "
FWCore/Framework/interface/MakerMacros.h
"
21
#include "
FWCore/ServiceRegistry/interface/Service.h
"
22
23
#include "
FWCore/Framework/interface/ESHandle.h
"
24
#include "
FWCore/Framework/interface/EventSetup.h
"
25
#include "
FWCore/Framework/interface/IOVSyncValue.h
"
26
#include "
CondFormats/DataRecord/interface/BeamSpotObjectsRcd.h
"
27
#include "
CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h
"
28
29
BeamSpotFromDB::BeamSpotFromDB
(
const
edm::ParameterSet
& iConfig) {}
30
31
BeamSpotFromDB::~BeamSpotFromDB
() {}
32
33
void
BeamSpotFromDB::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
34
edm::ESHandle<BeamSpotObjects>
beamhandle;
35
iSetup.
get
<
BeamSpotObjectsRcd
>().
get
(beamhandle);
36
const
BeamSpotObjects
* mybeamspot = beamhandle.
product
();
37
38
std::cout
<<
" for runs: "
<<
iEvent
.id().run() <<
" - "
<<
iEvent
.id().run() << std::endl;
39
//std::cout << iEvent.getRun().beginTime().value() << std::endl;
40
//std::cout << iEvent.time().value() << std::endl;
41
std::cout
<< *mybeamspot << std::endl;
42
}
43
44
void
BeamSpotFromDB::beginJob
() {}
45
46
void
BeamSpotFromDB::endJob
() {}
47
48
//define this as a plug-in
49
DEFINE_FWK_MODULE
(
BeamSpotFromDB
);
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
MessageLogger.h
ESHandle.h
BeamSpotFromDB.h
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
BeamSpotFromDB
Definition:
BeamSpotFromDB.h:23
BeamSpotFromDB::BeamSpotFromDB
BeamSpotFromDB(const edm::ParameterSet &)
Definition:
BeamSpotFromDB.cc:29
MakerMacros.h
BeamSpotObjects.h
BeamSpotObjectsRcd.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
BeamSpot.h
BeamSpotFromDB::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
BeamSpotFromDB.cc:33
Service.h
edm::ESHandle
Definition:
DTSurvey.h:22
edm::ParameterSet
Definition:
ParameterSet.h:36
BeamSpotFromDB::endJob
void endJob() override
Definition:
BeamSpotFromDB.cc:46
iEvent
int iEvent
Definition:
GenABIO.cc:224
BeamSpotObjectsRcd
Definition:
BeamSpotObjectsRcd.h:24
BeamSpotObjects
Definition:
BeamSpotObjects.h:20
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
BeamSpotFromDB::beginJob
void beginJob() override
Definition:
BeamSpotFromDB.cc:44
BeamSpotFromDB::~BeamSpotFromDB
~BeamSpotFromDB() override
Definition:
BeamSpotFromDB.cc:31
EventSetup.h
edm::Event
Definition:
Event.h:73
IOVSyncValue.h
Generated for CMSSW Reference Manual by
1.8.16