Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ShiftTTrigDB_H
0002 #define ShiftTTrigDB_H
0003 
0004 /** \class ShiftTTrigDB
0005  *  Class which read a ttrig DB and modifies it introducing
0006  *  shifts with chamber granularity
0007  *
0008  *  \author S. Bolognesi - 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 "Geometry/Records/interface/MuonGeometryRecord.h"
0015 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0016 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0017 
0018 #include <map>
0019 #include <string>
0020 #include <vector>
0021 
0022 class DTTtrig;
0023 class DTGeometry;
0024 
0025 class ShiftTTrigDB : public edm::one::EDAnalyzer<> {
0026 public:
0027   /// Constructor
0028   ShiftTTrigDB(const edm::ParameterSet& pset);
0029 
0030   /// Destructor
0031   virtual ~ShiftTTrigDB();
0032 
0033   // Operations
0034 
0035   virtual void beginRun(const edm::Run& run, const edm::EventSetup& setup);
0036 
0037   virtual void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
0038 
0039   virtual void endJob();
0040 
0041 protected:
0042 private:
0043   const DTTtrig* tTrigMap;
0044   edm::ESHandle<DTGeometry> muonGeom;
0045 
0046   std::vector<std::vector<int> > chambers;
0047   std::vector<double> shifts;
0048   std::map<std::vector<int>, double> mapShiftsByChamber;
0049   bool debug;
0050 
0051   edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0052   edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0053 };
0054 #endif