CMS 3D CMS Logo

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 
16 
19 
21 
24 
25 #include <memory>
26 
28 public:
30  : tokenCalibration_(esConsumes<PPSTimingCalibration, PPSTimingCalibrationRcd>()) {}
31 
32 private:
33  void beginJob() override {}
34  void analyze(const edm::Event&, const edm::EventSetup&) override;
35  void endJob() override {}
36 
38 
40 };
41 
43  // get timing calibration parameters
44  if (calibWatcher_.check(iSetup)) {
45  edm::LogInfo("PPSTimingCalibrationAnalyzer") << "Calibrations retrieved:\n" << iSetup.getData(tokenCalibration_);
46  }
47 }
48 
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
EDAnalyzer.h
edm::ESWatcher< PPSTimingCalibrationRcd >
ESHandle.h
PPSTimingCalibrationAnalyzer::beginJob
void beginJob() override
Definition: PPSTimingCalibrationAnalyzer.cc:37
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:39
MakerMacros.h
PoolDBOutputService.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
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:41
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
PPSTimingCalibration.h
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
PPSTimingCalibrationAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: PPSTimingCalibrationAnalyzer.cc:41
Frameworkfwd.h
ESWatcher.h
PPSTimingCalibrationRcd.h
EventSetup.h
ParameterSet.h
edm::Event
Definition: Event.h:73
PPSTimingCalibrationAnalyzer::tokenCalibration_
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > tokenCalibration_
Definition: PPSTimingCalibrationAnalyzer.cc:43