CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/SiStripMonitorClient/interface/SiStripHistoPlotter.h

Go to the documentation of this file.
00001 #ifndef _SiStripHistoPlotter_h_
00002 #define _SiStripHistoPlotter_h_
00003 
00004 
00005 #include <fstream>
00006 #include <sstream>
00007 #include <map>
00008 #include <vector>
00009 #include <string>
00010 
00011 #include "TCanvas.h"
00012 
00013 class DQMStore;
00014 class MonitorElement;
00015 class TH1;
00016 
00017 class SiStripHistoPlotter {
00018 
00019  public:
00020 
00021   SiStripHistoPlotter();
00022  ~SiStripHistoPlotter();
00023 
00024   void getNamedImageBuffer(const std::string& path, std::string& image);
00025   void createPlots(DQMStore* dqm_store);
00026   void setNewPlot(std::string& path,  std::string& option, 
00027                   int width, int height);
00028   void createStaticPlot(MonitorElement* me, const std::string& file_name);
00029   void createCondDBPlots(DQMStore* dqm_store);
00030   void setNewCondDBPlot(std::string& path,  std::string& option, 
00031                   int width, int height);
00032   bool plotsToMake() { return  ((plotList_.size() > 0) ? true : false);}
00033   bool condDBPlotsToMake(){ return ((condDBPlotList_.size() > 0) ? true : false);}
00034 
00035 
00036  private:
00037 
00038 
00039   struct PlotParameter { 
00040     std::string Path;
00041     std::string Option;
00042     int         CWidth;
00043     int         CHeight;
00044      
00045   };
00046 
00047   void fillNamedImageBuffer(TCanvas * c1, const std::string& name);
00048   void makePlot(DQMStore* dqm_store, const PlotParameter& par);
00049   void makeCondDBPlots(DQMStore* dqm_store, const PlotParameter& par);
00050   bool hasNamedImage(const std::string & name);
00051   void createDummyImage(const std::string& name);
00052   void getDummyImage(std::string & image);
00053 
00054   void setDrawingOption(TH1* hist);
00055   void getProjection(MonitorElement* me, TH1F* tp);
00056 
00057 
00058   std::map<std::string, std::string>   namedPictureBuffer_;
00059   std::vector<PlotParameter>           plotList_;
00060   std::vector<PlotParameter>           condDBPlotList_;
00061  
00062 };
00063 #endif