00001 #ifndef DTTPGParamsWriter_H 00002 #define DTTPGParamsWriter_H 00003 00004 /* Program to write DT TPG pedestals correction into DB 00005 00006 * $Date: 2010/11/12 11:04:40 $ 00007 * $Revision: 1.1 $ 00008 * \author C. Battilana - CIEMAT 00009 */ 00010 00011 #include "FWCore/Framework/interface/EDAnalyzer.h" 00012 #include "CondFormats/DTObjects/interface/DTTPGParameters.h" 00013 #include <string> 00014 #include <fstream> 00015 00016 00017 namespace edm { 00018 class ParameterSet; 00019 class Event; 00020 class EventSetup; 00021 } 00022 00023 class DTChamberId; 00024 00025 class DTTPGParamsWriter : public edm::EDAnalyzer { 00026 public: 00028 DTTPGParamsWriter(const edm::ParameterSet& pset); 00029 00031 virtual ~DTTPGParamsWriter(); 00032 00033 // Operations 00034 00036 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); 00037 00039 void endJob(); 00040 00041 private: 00042 00043 void pharseLine(std::string &line, DTChamberId& chId, float &fine, int &coarse); 00044 00045 bool debug_; 00046 std::string inputFileName_; 00047 DTTPGParameters *phaseMap_; 00048 }; 00049 #endif