CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DQM/SiPixelMonitorClient/interface/SiPixelHistoPlotter.h

Go to the documentation of this file.
00001 #ifndef _SiPixelHistoPlotter_h_
00002 #define _SiPixelHistoPlotter_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 SiPixelHistoPlotter {
00018 
00019  public:
00020 
00021   SiPixelHistoPlotter();
00022  ~SiPixelHistoPlotter();
00023 
00024   void getNamedImageBuffer(const std::string& path, std::string& image);
00025   void createPlots(DQMStore* bei);
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 
00030  private:
00031 
00032 
00033   struct PlotParameter { 
00034     std::string Path;
00035     std::string Option;
00036     int         CWidth;
00037     int         CHeight;
00038      
00039   };
00040 
00041   void fillNamedImageBuffer(TCanvas * c1, const std::string& name);
00042   void makePlot(DQMStore* bei, const PlotParameter& par);
00043   bool hasNamedImage(const std::string & name);
00044   void createDummyImage(const std::string& name);
00045   void setDrawingOption(TH1* hist);
00046 
00047   void setSubDetAxisDrawing(   std::string                                detector, 
00048                                TH1F                                     * histo);
00049   void setLines(               MonitorElement                           * me, 
00050                                std::string                              & meName, 
00051                                double                                   & ymin, 
00052                                double                                   & ymax, 
00053                                double                                   & warning, 
00054                                double                                   & error, 
00055                                double                                   & channelFraction);
00056 
00057   std::map<std::string, std::string>   namedPictureBuffer_;
00058   std::vector<PlotParameter>           plotList_;
00059  
00060 };
00061 #endif