CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PPSTimingCalibrationWriter.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 
15 
18 
20 
23 
24 #include <memory>
25 
27 public:
30 
31 private:
32  void beginJob() override {}
33  void analyze(const edm::Event&, const edm::EventSetup&) override;
34  void endJob() override {}
35 
37 };
38 
40  // get timing calibration parameters
42 
43  // store the calibration into a DB object
45  if (poolDbService.isAvailable())
46  poolDbService->writeOneIOV(*hTimingCalib.product(), poolDbService->currentTime(), "PPSTimingCalibrationRcd");
47  else
48  throw cms::Exception("PPSTimingCalibrationWriter") << "PoolDBService required.";
49 }
50 
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
EventSetup record for TOTEM/PPS timing calibration information.
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > tokenCalibration_
int iEvent
Definition: GenABIO.cc:224
bool isAvailable() const
Definition: Service.h:40
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
PPSTimingCalibrationWriter(const edm::ParameterSet &)
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157