File indexing completed on 2023-03-17 11:10:33
0001 #ifndef JetMETCorrections_Algorithms_JetCorrectorImplMakerBase_h
0002 #define JetMETCorrections_Algorithms_JetCorrectorImplMakerBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <string>
0023 #include <memory>
0024 #include <functional>
0025
0026
0027 #include "CondFormats/JetMETObjects/interface/FactorizedJetCorrectorCalculator.h"
0028 #include "FWCore/Framework/interface/ConsumesCollector.h"
0029 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0030
0031
0032 class JetCorrectorParametersCollection;
0033 class JetCorrectionsRecord;
0034
0035 class JetCorrectorImplMakerBase {
0036 public:
0037 JetCorrectorImplMakerBase(edm::ParameterSet const&, edm::ConsumesCollector iC);
0038 JetCorrectorImplMakerBase(const JetCorrectorImplMakerBase&) = delete;
0039 const JetCorrectorImplMakerBase& operator=(const JetCorrectorImplMakerBase&) = delete;
0040 virtual ~JetCorrectorImplMakerBase();
0041
0042
0043
0044
0045 static void addToDescription(edm::ParameterSetDescription& iDescription);
0046
0047
0048
0049 protected:
0050 std::shared_ptr<FactorizedJetCorrectorCalculator const> getCalculator(
0051 edm::EventSetup const&, std::function<void(std::string const&)> levelCheck);
0052
0053 private:
0054
0055 std::string level_;
0056 edm::ESGetToken<JetCorrectorParametersCollection, JetCorrectionsRecord> algoToken_;
0057 std::shared_ptr<FactorizedJetCorrectorCalculator const> corrector_;
0058 unsigned long long cacheId_;
0059 };
0060
0061 #endif