CondTools
CTPPS
plugins
PPSTimingCalibrationAnalyzer.cc
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* This is a part of TOTEM/PPS offline software.
4
* Author:
5
* Laurent Forthomme (laurent.forthomme@cern.ch)
6
*
7
****************************************************************************/
8
9
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
10
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
11
#include "
FWCore/Framework/interface/Event.h
"
12
#include "
FWCore/Framework/interface/EventSetup.h
"
13
#include "
FWCore/Framework/interface/ESHandle.h
"
14
#include "
FWCore/Framework/interface/ESWatcher.h
"
15
#include "
FWCore/Framework/interface/MakerMacros.h
"
16
17
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
18
#include "
FWCore/ServiceRegistry/interface/Service.h
"
19
20
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
21
22
#include "
CondFormats/PPSObjects/interface/PPSTimingCalibration.h
"
23
#include "
CondFormats/DataRecord/interface/PPSTimingCalibrationRcd.h
"
24
25
#include <memory>
26
27
class
PPSTimingCalibrationAnalyzer
:
public
edm::one::EDAnalyzer
<> {
28
public
:
29
explicit
PPSTimingCalibrationAnalyzer
(
const
edm::ParameterSet
&) {}
30
31
private
:
32
void
beginJob
()
override
{}
33
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
34
void
endJob
()
override
{}
35
36
edm::ESWatcher<PPSTimingCalibrationRcd>
calibWatcher_
;
37
};
38
39
void
PPSTimingCalibrationAnalyzer::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
40
// get timing calibration parameters
41
edm::ESHandle<PPSTimingCalibration>
hTimingCalib;
42
if
(
calibWatcher_
.
check
(iSetup)) {
43
iSetup.
get
<
PPSTimingCalibrationRcd
>().
get
(hTimingCalib);
44
45
edm::LogInfo
(
"PPSTimingCalibrationAnalyzer"
) <<
"Calibrations retrieved:\n"
<< *hTimingCalib;
46
}
47
}
48
49
DEFINE_FWK_MODULE
(
PPSTimingCalibrationAnalyzer
);
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition:
ESWatcher.h:52
EDAnalyzer.h
edm::ESWatcher< PPSTimingCalibrationRcd >
ESHandle.h
PPSTimingCalibrationAnalyzer::beginJob
void beginJob() override
Definition:
PPSTimingCalibrationAnalyzer.cc:36
PPSTimingCalibrationAnalyzer
Definition:
PPSTimingCalibrationAnalyzer.cc:26
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
PPSTimingCalibrationAnalyzer::endJob
void endJob() override
Definition:
PPSTimingCalibrationAnalyzer.cc:38
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
edm::ESHandle
Definition:
DTSurvey.h:22
PPSTimingCalibrationAnalyzer::PPSTimingCalibrationAnalyzer
PPSTimingCalibrationAnalyzer(const edm::ParameterSet &)
Definition:
PPSTimingCalibrationAnalyzer.cc:33
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
PPSTimingCalibrationAnalyzer::calibWatcher_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
Definition:
PPSTimingCalibrationAnalyzer.cc:40
iEvent
int iEvent
Definition:
GenABIO.cc:224
PPSTimingCalibrationRcd
EventSetup record for TOTEM/PPS timing calibration information.
Definition:
PPSTimingCalibrationRcd.h:14
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
PPSTimingCalibration.h
PPSTimingCalibrationAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
PPSTimingCalibrationAnalyzer.cc:38
Frameworkfwd.h
ESWatcher.h
PPSTimingCalibrationRcd.h
EventSetup.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16