Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:15

0001 #ifndef DTTPGParamsWriter_H
0002 #define DTTPGParamsWriter_H
0003 
0004 /* Program to write DT TPG pedestals correction into DB
0005 
0006  *  \author C. Battilana - CIEMAT
0007  */
0008 
0009 #include "CondFormats/DTObjects/interface/DTTPGParameters.h"
0010 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0011 #include <fstream>
0012 #include <string>
0013 
0014 namespace edm {
0015   class ParameterSet;
0016   class Event;
0017   class EventSetup;
0018 }  // namespace edm
0019 
0020 class DTChamberId;
0021 
0022 class DTTPGParamsWriter : public edm::one::EDAnalyzer<> {
0023 public:
0024   /// Constructor
0025   DTTPGParamsWriter(const edm::ParameterSet &pset);
0026 
0027   /// Destructor
0028   ~DTTPGParamsWriter() override;
0029 
0030   // Operations
0031 
0032   /// Compute the ttrig by fiting the TB rising edge
0033   void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0034 
0035   /// Write ttrig in the DB
0036   void endJob() override;
0037 
0038 private:
0039   void pharseLine(std::string &line, DTChamberId &chId, float &fine, int &coarse);
0040 
0041   bool debug_;
0042   std::string inputFileName_;
0043   DTTPGParameters *phaseMap_;
0044 };
0045 #endif