CondTools
CTPPS
plugins
RetrievePPSAlignmentConfig.cc
Go to the documentation of this file.
1
/****************************************************************************
2
* Author:
3
* Mateusz Kocot (mateuszkocot99@gmail.com)
4
****************************************************************************/
5
6
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
7
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
FWCore/Framework/interface/ESHandle.h
"
11
#include "
FWCore/Framework/interface/MakerMacros.h
"
12
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
17
#include "
CondFormats/PPSObjects/interface/PPSAlignmentConfig.h
"
18
#include "
CondFormats/DataRecord/interface/PPSAlignmentConfigRcd.h
"
19
20
#include <memory>
21
22
class
RetrievePPSAlignmentConfig
:
public
edm::one::EDAnalyzer
<> {
23
public
:
24
explicit
RetrievePPSAlignmentConfig
(
const
edm::ParameterSet
&);
25
26
private
:
27
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
28
29
edm::ESGetToken<PPSAlignmentConfig, PPSAlignmentConfigRcd>
esToken_
;
30
};
31
32
RetrievePPSAlignmentConfig::RetrievePPSAlignmentConfig
(
const
edm::ParameterSet
&iConfig) : esToken_(
esConsumes
()) {}
33
34
void
RetrievePPSAlignmentConfig::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
&iSetup) {
35
// get the data
36
const
auto
&ppsAlignmentConfig = iSetup.
getData
(
esToken_
);
37
38
edm::LogInfo
(
"PPS"
) << ppsAlignmentConfig;
39
}
40
41
//define this as a plug-in
42
DEFINE_FWK_MODULE
(
RetrievePPSAlignmentConfig
);
EDAnalyzer.h
MessageLogger.h
ESHandle.h
PPSAlignmentConfigRcd.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
RetrievePPSAlignmentConfig
Definition:
RetrievePPSAlignmentConfig.cc:21
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:58
edm::ESGetToken< PPSAlignmentConfig, PPSAlignmentConfigRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:127
RetrievePPSAlignmentConfig::esToken_
edm::ESGetToken< PPSAlignmentConfig, PPSAlignmentConfigRcd > esToken_
Definition:
RetrievePPSAlignmentConfig.cc:30
RetrievePPSAlignmentConfig::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
RetrievePPSAlignmentConfig.cc:33
Frameworkfwd.h
EventSetup.h
ParameterSet.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
edm::Event
Definition:
Event.h:73
PPSAlignmentConfig.h
RetrievePPSAlignmentConfig::RetrievePPSAlignmentConfig
RetrievePPSAlignmentConfig(const edm::ParameterSet &)
Definition:
RetrievePPSAlignmentConfig.cc:31
Generated for CMSSW Reference Manual by
1.8.16