AraWebPlotter/AraHistoHandler.h
00001 00002 00003 00004 00005 00006 00007 00008 #ifndef ARAHISTOHANDLER_H 00009 #define ARAHISTOHANDLER_H 00010 00011 #include "TFile.h" 00012 #include "TDirectory.h" 00013 #include "TNamed.h" 00014 #include "AraPlotUtils.h" 00015 #include "TH1.h" 00016 #include "TH2.h" 00017 //#include <zlib.h> 00018 00019 #include <map> 00020 00021 00022 class AraHistoHandler 00023 { 00024 public: 00025 00026 // typedef std::pair<Int_t,TH1D> histoPair; 00027 typedef std::map<UInt_t,TH1D*> histoMap; 00028 typedef std::map<UInt_t,Int_t> countMap; 00029 AraHistoHandler(TFile *fpHist,const char *name, const char *title ); 00030 virtual ~AraHistoHandler(); 00031 void addFile(TFile *fpNext); 00032 void addHisto(UInt_t unixTime, TH1D *histo); 00033 void Write(); 00034 char *GetName() { return fName;} 00035 00036 UInt_t getLastTime(); 00037 TH1D *getTimeHisto(UInt_t firstTime, UInt_t lastTime); 00038 TH1D *getTimeHisto(AraPlotTime::AraPlotTime_t plotTime); 00039 TH1D *getCurrentTimeHisto(AraPlotTime::AraPlotTime_t plotTime); 00040 TH2D *getTimeColourHisto(UInt_t firstTime, UInt_t lastTime, Int_t numPoints=10); 00041 TH2D *getTimeColourHisto(AraPlotTime::AraPlotTime_t plotTime, Int_t numPoints=10); 00042 TH2D *getCurrentTimeColourHisto(AraPlotTime::AraPlotTime_t plotTime, Int_t numPoints=10); 00043 private: 00044 00045 char fName[180]; 00046 char fTitle[180]; 00047 TFile *fHistoFile; 00048 TDirectory *fDirectory; 00049 histoMap theHistoMap; 00050 countMap theCountMap; 00051 countMap hasChangedMap; 00052 00053 ClassDef(AraHistoHandler,1); 00054 00055 }; 00056 00057 00058 #endif //ARAHISTOHANDLER_H
Generated on Tue Jul 16 16:58:01 2013 for ARA ROOT v3.10 Software by
