RecoVertex
BeamSpotProducer
plugins
OnlineBeamSpotFromDB.cc
Go to the documentation of this file.
1
12
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include "
FWCore/Framework/interface/MakerMacros.h
"
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
#include "
FWCore/Framework/interface/ESHandle.h
"
17
#include "
FWCore/Framework/interface/EventSetup.h
"
18
#include "
FWCore/Framework/interface/IOVSyncValue.h
"
19
#include "
CondFormats/DataRecord/interface/BeamSpotTransientObjectsRcd.h
"
20
#include "
CondFormats/BeamSpotObjects/interface/BeamSpotOnlineObjects.h
"
21
#include "
CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h
"
22
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
23
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
24
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
25
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
26
#include "
FWCore/Framework/interface/Event.h
"
27
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
28
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
29
#include <string>
30
31
class
OnlineBeamSpotFromDB
:
public
edm::one::EDAnalyzer
<> {
32
public
:
33
explicit
OnlineBeamSpotFromDB
(
const
edm::ParameterSet
& iConfig);
34
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
);
35
edm::ESGetToken<BeamSpotObjects, BeamSpotTransientObjectsRcd>
bsToken_
;
36
37
private
:
38
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
39
};
40
41
OnlineBeamSpotFromDB::OnlineBeamSpotFromDB
(
const
edm::ParameterSet
& iConfig)
42
: bsToken_(
esConsumes
<
BeamSpotObjects
,
BeamSpotTransientObjectsRcd
>()) {}
43
44
void
OnlineBeamSpotFromDB::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
45
auto
const
& mybeamspot = iSetup.
getData
(
bsToken_
);
46
47
edm::LogInfo
(
"Run numver: "
) <<
iEvent
.id().run();
48
edm::LogInfo
(
"beamspot from HLT "
) << mybeamspot;
49
}
50
void
OnlineBeamSpotFromDB::fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
) {
51
edm::ParameterSetDescription
dsc;
52
desc
.addWithDefaultLabel(dsc);
53
}
54
55
//define this as a plug-in
56
DEFINE_FWK_MODULE
(
OnlineBeamSpotFromDB
);
ConfigurationDescriptions.h
OnlineBeamSpotFromDB::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &desc)
Definition:
OnlineBeamSpotFromDB.cc:50
OnlineBeamSpotFromDB::bsToken_
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd > bsToken_
Definition:
OnlineBeamSpotFromDB.cc:35
EDAnalyzer.h
MessageLogger.h
ESHandle.h
BeamSpotTransientObjectsRcd
Definition:
BeamSpotTransientObjectsRcd.h:27
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
OnlineBeamSpotFromDB
Definition:
OnlineBeamSpotFromDB.cc:31
OnlineBeamSpotFromDB::OnlineBeamSpotFromDB
OnlineBeamSpotFromDB(const edm::ParameterSet &iConfig)
Definition:
OnlineBeamSpotFromDB.cc:41
MakerMacros.h
BeamSpotObjects.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
BeamSpot.h
Service.h
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
BeamSpotTransientObjectsRcd.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
BeamSpotObjects
Definition:
BeamSpotObjects.h:20
edm::EventSetup
Definition:
EventSetup.h:58
OnlineBeamSpotFromDB::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
OnlineBeamSpotFromDB.cc:44
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:127
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
Frameworkfwd.h
EventSetup.h
BeamSpotOnlineObjects.h
ConsumesCollector.h
ParameterSet.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
edm::Event
Definition:
Event.h:73
IOVSyncValue.h
Generated for CMSSW Reference Manual by
1.8.16