CMS 3D CMS Logo

PPSTimingCalibrationLUTWriter.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  * Christopher Misan
7  *
8  ****************************************************************************/
9 
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
41  const auto& hTimingCalib = iSetup.getData(tokenCalibration_);
42  // store the calibration into a DB object
44  if (poolDbService.isAvailable())
45  poolDbService->writeOneIOV(hTimingCalib, poolDbService->currentTime(), "PPSTimingCalibrationLUTRcd");
46  else
47  throw cms::Exception("PPSTimingCalibrationLUTWriter") << "PoolDBService required.";
48 }
49 
PPSTimingCalibrationLUTWriter(const edm::ParameterSet &)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void analyze(const edm::Event &, const edm::EventSetup &) override
int iEvent
Definition: GenABIO.cc:224
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd > tokenCalibration_
bool isAvailable() const
Definition: Service.h:40