Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:40

0001 #ifndef PhysicsTools_MVAComputer_MVAComputerESSourceImpl_h
0002 #define PhysicsTools_MVAComputer_MVAComputerESSourceImpl_h
0003 
0004 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 
0007 #include "PhysicsTools/MVAComputer/interface/Calibration.h"
0008 #include "PhysicsTools/MVAComputer/interface/MVAComputerESSourceBase.h"
0009 
0010 namespace PhysicsTools {
0011 
0012   template <class RecordType>
0013   class MVAComputerESSourceImpl : public MVAComputerESSourceBase, public edm::EventSetupRecordIntervalFinder {
0014   public:
0015     MVAComputerESSourceImpl(const edm::ParameterSet &params) : MVAComputerESSourceBase(params) {
0016       setWhatProduced(this);
0017       findingRecord<RecordType>();
0018     }
0019 
0020     ~MVAComputerESSourceImpl() override {}
0021 
0022     ReturnType produce(const RecordType &record) { return this->produce(); }
0023 
0024   protected:
0025     using MVAComputerESSourceBase::produce;
0026 
0027   private:
0028     void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &key,
0029                         const edm::IOVSyncValue &syncValue,
0030                         edm::ValidityInterval &oValidity) override {
0031       oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime());
0032     }
0033   };
0034 
0035 }  // namespace PhysicsTools
0036 
0037 #endif  // PhysicsTools_MVAComputer_MVAComputerESSourceImpl_h