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
13
// C++ standard
14
#include <string>
15
// CMS
16
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
17
#include "
RecoVertex/BeamSpotProducer/interface/BeamSpotFromDB.h
"
18
19
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
20
21
#include "
FWCore/Framework/interface/MakerMacros.h
"
22
#include "
FWCore/ServiceRegistry/interface/Service.h
"
23
24
#include "
FWCore/Framework/interface/ESHandle.h
"
25
#include "
FWCore/Framework/interface/EventSetup.h
"
26
#include "
FWCore/Framework/interface/IOVSyncValue.h
"
27
#include "
CondFormats/DataRecord/interface/BeamSpotObjectsRcd.h
"
28
#include "
CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h
"
29
30
31
BeamSpotFromDB::BeamSpotFromDB
(
const
edm::ParameterSet
& iConfig)
32
{
33
34
}
35
36
37
BeamSpotFromDB::~BeamSpotFromDB
()
38
{
39
40
}
41
42
43
void
44
BeamSpotFromDB::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
45
{
46
47
edm::ESHandle< BeamSpotObjects >
beamhandle;
48
iSetup.
get
<
BeamSpotObjectsRcd
>().
get
(beamhandle);
49
const
BeamSpotObjects
*mybeamspot = beamhandle.
product
();
50
51
std::cout
<<
" for runs: "
<< iEvent.
id
().
run
() <<
" - "
<< iEvent.
id
().
run
() << std::endl;
52
//std::cout << iEvent.getRun().beginTime().value() << std::endl;
53
//std::cout << iEvent.time().value() << std::endl;
54
std::cout
<< *mybeamspot << std::endl;
55
56
}
57
58
void
59
BeamSpotFromDB::beginJob
()
60
{
61
}
62
63
void
64
BeamSpotFromDB::endJob
() {
65
}
66
67
//define this as a plug-in
68
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:59
BeamSpotFromDB::BeamSpotFromDB
BeamSpotFromDB(const edm::ParameterSet &)
Definition:
BeamSpotFromDB.cc:31
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:64
BeamSpotObjectsRcd
Definition:
BeamSpotObjectsRcd.h:24
iEvent
int iEvent
Definition:
GenABIO.cc:230
edm::ESHandle
Definition:
DTSurvey.h:22
BeamSpotObjects
Definition:
BeamSpotObjects.h:20
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:44
BeamSpotFromDB::~BeamSpotFromDB
~BeamSpotFromDB()
Definition:
BeamSpotFromDB.cc:37
BeamSpotFromDB
Definition:
BeamSpotFromDB.h:25
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:44
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:62
Generated for CMSSW Reference Manual by
1.8.5