Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:27

0001 #ifndef ProducePFCalibrationObject_H
0002 #define ProducePFCalibrationObject_H
0003 
0004 /** \class ProducePFCalibrationObject
0005  *  
0006  *  
0007  *  This is used by ProducePFCalibration.py config to 
0008  *  generate payload for offline and HLT PF hadron calibration.
0009  *  
0010  *  \Original author G. Cerminara - CERN
0011  */
0012 
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "CondFormats/PhysicsToolsObjects/interface/PerformancePayloadFromTFormula.h"
0016 #include "CondFormats/DataRecord/interface/PFCalibrationRcd.h"
0017 
0018 #include <vector>
0019 #include <string>
0020 
0021 class ProducePFCalibrationObject : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0022 public:
0023   /// Constructor
0024   ProducePFCalibrationObject(const edm::ParameterSet&);
0025 
0026   /// Destructor
0027   ~ProducePFCalibrationObject() override;
0028 
0029   // Operations
0030   void beginRun(const edm::Run& run, const edm::EventSetup& eSetup) override;
0031   void endRun(const edm::Run& run, const edm::EventSetup& eSetup) override {}
0032 
0033   void analyze(const edm::Event&, const edm::EventSetup&) override {}
0034 
0035 protected:
0036 private:
0037   bool read;
0038   bool write;
0039 
0040   std::vector<edm::ParameterSet> fToWrite;
0041   std::vector<std::string> fToRead;
0042 
0043   const edm::ESGetToken<PerformancePayload, PFCalibrationRcd> perfToken;
0044 };
0045 #endif