Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:27

0001 #ifndef CalibMuon_DTCalibration_DTTTrigCorrection_h
0002 #define CalibMuon_DTCalibration_DTTTrigCorrection_h
0003 
0004 /** \class DTTTrigCorrection
0005  *  Class which read a ttrig DB and correct it with
0006  *  the near SL (or the global average)
0007  *
0008  *  \author S. Maselli - INFN Torino
0009  */
0010 
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0013 #include "FWCore/Framework/interface/ESHandle.h"
0014 #include "FWCore/Framework/interface/ConsumesCollector.h"
0015 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0016 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0017 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0018 
0019 #include <string>
0020 
0021 class DTTtrig;
0022 class DTGeometry;
0023 namespace dtCalibration {
0024   class DTTTrigBaseCorrection;
0025 }
0026 
0027 class DTTTrigCorrection : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0028 public:
0029   /// Constructor
0030   DTTTrigCorrection(const edm::ParameterSet& pset);
0031 
0032   /// Destructor
0033   ~DTTTrigCorrection() override;
0034 
0035   // Operations
0036 
0037   void beginJob() override {}
0038   void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
0039   void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
0040   void endRun(const edm::Run& run, const edm::EventSetup& setup) override{};
0041   void endJob() override;
0042 
0043 protected:
0044 private:
0045   const DTTtrig* tTrigMap_;
0046   edm::ESHandle<DTGeometry> muonGeom_;
0047 
0048   edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0049   edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0050 
0051   std::unique_ptr<dtCalibration::DTTTrigBaseCorrection> correctionAlgo_;
0052 };
0053 #endif