TCanvasHandleBase.hxx

Go to the documentation of this file.
00001 #ifndef TCanvasHandleBase_h
00002 #define TCanvasHandleBase_h
00003 
00004 // Base class for user to create a set of histogram or plots 
00005 // for a particular canvas.
00006 
00007 #include <iostream>
00008 #include <string>
00009 #include <stdlib.h>
00010 
00011 #include "TRootEmbeddedCanvas.h"
00012 #include "TCanvas.h"
00013 #include "TMidasEvent.h"
00014 #include "TRootanaDisplay.hxx"
00015 
00016 class TRootanaDisplay;
00017 
00018 class TCanvasHandleBase{
00019  public:
00020   TCanvasHandleBase(std::string tabName){fTabName=tabName;}
00021   virtual ~TCanvasHandleBase(){}
00022 
00023   /// Reset the histograms for this canvas
00024   virtual void ResetCanvasHistograms() = 0;
00025 
00026   /// Update the histograms for this canvas.
00027   virtual void UpdateCanvasHistograms(TDataContainer& dataContainer) = 0;
00028 
00029   /// Plot the histograms for this canvas
00030   virtual void PlotCanvas(TDataContainer& dataContainer, TRootEmbeddedCanvas *embedCanvas) = 0;
00031 
00032   /// Take actions at begin run
00033   virtual void BeginRun(int transition,int run,int time){};
00034 
00035   /// Take actions at end run  
00036   virtual void EndRun(int transition,int run,int time){};
00037 
00038   std::string GetTabName(){return fTabName;}
00039 
00040   /// This method is only 
00041   TRootEmbeddedCanvas* GetEmbeddedCanvas(){
00042     std::cerr<< "Not implemented for base class; exiting." << std::endl;
00043     exit(0);
00044     return 0;
00045   }
00046 
00047   ///
00048   virtual void SetUpCompositeFrame(TGCompositeFrame*, TRootanaDisplay *display){}
00049 
00050 private:
00051   // Don't allow the user to use default constructor
00052   TCanvasHandleBase(){};
00053 
00054   std::string fTabName;
00055 
00056 };
00057 
00058 #endif

Generated on 5 May 2014 for ROOT Analyzer by  doxygen 1.6.1