Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:54

0001 #ifndef L1TMuonEndCap_ConditionHelper_h
0002 #define L1TMuonEndCap_ConditionHelper_h
0003 
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "FWCore/Utilities/interface/ESGetToken.h"
0006 
0007 // forwards
0008 namespace edm {
0009   class EventSetup;
0010   class ConsumesCollector;
0011 }  // namespace edm
0012 
0013 class L1TMuonEndCapParams;
0014 class L1TMuonEndCapForest;
0015 class L1TMuonEndCapParamsRcd;
0016 class L1TMuonEndCapForestRcd;
0017 
0018 // class declaration
0019 class ConditionHelper {
0020 public:
0021   ConditionHelper(edm::ConsumesCollector);
0022   ~ConditionHelper();
0023 
0024   void checkAndUpdateConditions(const edm::EventSetup& iSetup);
0025 
0026   const L1TMuonEndCapParams* getParams() const { return params_.product(); }
0027   const L1TMuonEndCapForest* getForest() const { return forest_.product(); }
0028 
0029   // EMTF firmware is defined by three numbers:
0030   //   1. FW version for the core logic
0031   //   2. pT assignment LUT
0032   //   3. primitive conversion (PC) LUT
0033   unsigned int get_fw_version() const;
0034   unsigned int get_pt_lut_version() const;
0035   unsigned int get_pc_lut_version() const;
0036   unsigned int get_pc_lut_version_unchecked() const;
0037 
0038 private:
0039   unsigned long long params_cache_id_;
0040   unsigned long long forest_cache_id_;
0041 
0042   edm::ESGetToken<L1TMuonEndCapParams, L1TMuonEndCapParamsRcd> paramsToken_;
0043   edm::ESHandle<L1TMuonEndCapParams> params_;
0044   edm::ESGetToken<L1TMuonEndCapForest, L1TMuonEndCapForestRcd> forestToken_;
0045   edm::ESHandle<L1TMuonEndCapForest> forest_;
0046 };
0047 
0048 #endif