00001 #ifndef DTTTrigWriter_H 00002 #define DTTTrigWriter_H 00003 00004 /* Program to evaluate ttrig and sigma ttrig from TB histograms 00005 * and write the results to a file for each SL 00006 00007 * $Date: 2008/12/09 22:44:10 $ 00008 * $Revision: 1.2 $ 00009 * \author S. Bolognesi 00010 */ 00011 00012 #include "FWCore/Framework/interface/EDAnalyzer.h" 00013 // #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h" 00014 00015 #include <string> 00016 00017 namespace edm { 00018 class ParameterSet; 00019 class Event; 00020 class EventSetup; 00021 } 00022 00023 class TFile; 00024 class DTTimeBoxFitter; 00025 class DTSuperLayerId; 00026 class DTTtrig; 00027 00028 00029 class DTTTrigWriter : public edm::EDAnalyzer { 00030 public: 00032 DTTTrigWriter(const edm::ParameterSet& pset); 00033 00035 virtual ~DTTTrigWriter(); 00036 00037 // Operations 00038 00040 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); 00041 00043 void endJob(); 00044 00045 00046 protected: 00047 00048 private: 00049 // Generate the time box name 00050 std::string getTBoxName(const DTSuperLayerId& slId) const; 00051 00052 // Debug flag 00053 bool debug; 00054 // the kfactor to be uploaded in the ttrig DB 00055 double kFactor; 00056 00057 // The file which contains the tMax histograms 00058 TFile *theFile; 00059 00060 // The name of the input root file which contains the tMax histograms 00061 std::string theRootInputFile; 00062 00063 // The fitter 00064 DTTimeBoxFitter *theFitter; 00065 00066 // The object to be written to DB 00067 DTTtrig* tTrig; 00068 00069 }; 00070 #endif