Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoVertex
BeamSpotProducer
plugins
BeamSpotFromDB.cc
Go to the documentation of this file.
1
14
// C++ standard
15
#include <string>
16
// CMS
17
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
18
#include "
RecoVertex/BeamSpotProducer/interface/BeamSpotFromDB.h
"
19
20
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
21
22
#include "
FWCore/Framework/interface/MakerMacros.h
"
23
#include "
FWCore/ServiceRegistry/interface/Service.h
"
24
25
#include "
FWCore/Framework/interface/ESHandle.h
"
26
#include "
FWCore/Framework/interface/EventSetup.h
"
27
#include "
FWCore/Framework/interface/IOVSyncValue.h
"
28
#include "
CondFormats/DataRecord/interface/BeamSpotObjectsRcd.h
"
29
#include "
CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h
"
30
31
32
BeamSpotFromDB::BeamSpotFromDB
(
const
edm::ParameterSet
& iConfig)
33
{
34
35
}
36
37
38
BeamSpotFromDB::~BeamSpotFromDB
()
39
{
40
41
}
42
43
44
void
45
BeamSpotFromDB::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
46
{
47
48
edm::ESHandle< BeamSpotObjects >
beamhandle;
49
iSetup.
get
<
BeamSpotObjectsRcd
>().
get
(beamhandle);
50
const
BeamSpotObjects
*mybeamspot = beamhandle.
product
();
51
52
std::cout
<<
" for runs: "
<< iEvent.
id
().
run
() <<
" - "
<< iEvent.
id
().
run
() << std::endl;
53
//std::cout << iEvent.getRun().beginTime().value() << std::endl;
54
//std::cout << iEvent.time().value() << std::endl;
55
std::cout
<< *mybeamspot << std::endl;
56
57
}
58
59
void
60
BeamSpotFromDB::beginJob
()
61
{
62
}
63
64
void
65
BeamSpotFromDB::endJob
() {
66
}
67
68
//define this as a plug-in
69
DEFINE_FWK_MODULE
(
BeamSpotFromDB
);
edm::EventID::run
RunNumber_t run() const
Definition:
EventID.h:42
BeamSpotFromDB.h
BeamSpotObjectsRcd.h
MessageLogger.h
BeamSpotFromDB::beginJob
virtual void beginJob()
Definition:
BeamSpotFromDB.cc:60
BeamSpotFromDB::BeamSpotFromDB
BeamSpotFromDB(const edm::ParameterSet &)
Definition:
BeamSpotFromDB.cc:32
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
IOVSyncValue.h
MakerMacros.h
EventSetup.h
BeamSpotFromDB::endJob
virtual void endJob()
Definition:
BeamSpotFromDB.cc:65
BeamSpotObjectsRcd
Definition:
BeamSpotObjectsRcd.h:24
iEvent
int iEvent
Definition:
GenABIO.cc:243
edm::ESHandle
Definition:
DTSurvey.h:22
BeamSpotObjects
Definition:
BeamSpotObjects.h:18
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:44
BeamSpotFromDB::~BeamSpotFromDB
~BeamSpotFromDB()
Definition:
BeamSpotFromDB.cc:38
BeamSpotFromDB
Definition:
BeamSpotFromDB.h:26
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:62
BeamSpotFromDB::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
BeamSpotFromDB.cc:45
edm::EventBase::id
edm::EventID id() const
Definition:
EventBase.h:56
BeamSpotObjects.h
BeamSpot.h
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
edm::Event
Definition:
Event.h:56
Generated for CMSSW Reference Manual by
1.8.5