ROOTANA
TCanvasHandleBase.hxx
Go to the documentation of this file.
1 #ifndef TCanvasHandleBase_h
2 #define TCanvasHandleBase_h
3 
4 // Base class for user to create a set of histogram or plots
5 // for a particular canvas.
6 
7 #include <iostream>
8 #include <string>
9 #include <stdlib.h>
10 
11 #include "TRootEmbeddedCanvas.h"
12 #include "TCanvas.h"
13 #include "TRootanaDisplay.hxx"
14 
15 class TRootanaDisplay;
16 
18  public:
19  TCanvasHandleBase(std::string tabName){fTabName=tabName;}
20  virtual ~TCanvasHandleBase(){}
21 
22  /// Reset the histograms for this canvas
23  virtual void ResetCanvasHistograms() = 0;
24 
25  /// Update the histograms for this canvas.
26  virtual void UpdateCanvasHistograms(TDataContainer& dataContainer) = 0;
27 
28  /// Plot the histograms for this canvas
29  virtual void PlotCanvas(TDataContainer& dataContainer, TRootEmbeddedCanvas *embedCanvas) = 0;
30 
31  /// Take actions at begin run
32  virtual void BeginRun(int transition,int run,int time){};
33 
34  /// Take actions at end run
35  virtual void EndRun(int transition,int run,int time){};
36 
37  std::string GetTabName(){return fTabName;}
38 
39  /// This method is only
40  TRootEmbeddedCanvas* GetEmbeddedCanvas(){
41  std::cerr<< "Not implemented for base class; exiting." << std::endl;
42  exit(0);
43  return 0;
44  }
45 
46  ///
47  virtual void SetUpCompositeFrame(TGCompositeFrame*, TRootanaDisplay *display){}
48 
49 private:
50  // Don't allow the user to use default constructor
52 
53  std::string fTabName;
54 
55 };
56 
57 #endif
virtual void EndRun(int transition, int run, int time)
Take actions at end run
virtual void PlotCanvas(TDataContainer &dataContainer, TRootEmbeddedCanvas *embedCanvas)=0
Plot the histograms for this canvas.
std::string GetTabName()
virtual void UpdateCanvasHistograms(TDataContainer &dataContainer)=0
Update the histograms for this canvas.
virtual void ResetCanvasHistograms()=0
Reset the histograms for this canvas.
TRootEmbeddedCanvas * GetEmbeddedCanvas()
This method is only.
TCanvasHandleBase(std::string tabName)
virtual void BeginRun(int transition, int run, int time)
Take actions at begin run.
virtual void SetUpCompositeFrame(TGCompositeFrame *, TRootanaDisplay *display)