ObjListCanvas.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////
2 /// \file ObjListCanvas.h
3 /// \brief Base class for displaying lists of objects (eg, MC truth, reco,
4 /// etc.)
5 ///
6 /// \version $Id: ObjListCanvas.h,v 1.1.1.1 2010-12-22 16:18:52 p-nusoftart Exp $
7 /// \author jpaley@anl.gov
8 /////////////////////////////////////////////////////////////////////////
9 #ifndef EVDB_OBJLISTCANVAS_H
10 #define EVDB_OBJLISTCANVAS_H
11 
12 #include "TQObject.h"
13 #include "RQ_OBJECT.h"
14 #ifndef EVDB_PRINTABLE_H
15 #include "nutools/EventDisplayBase/Printable.h"
16 #endif
17 class TGMainFrame;
18 class TGCompositeFrame;
19 class TGLayoutHints;
20 class TRootEmbeddedCanvas;
21 class TCanvas;
22 
23 namespace evdb {
24  class ObjListCanvas : public Printable {
25  RQ_OBJECT("evdb::ObjListCanvas")
26 
27  public:
28  ObjListCanvas(TGMainFrame* mf);
29  virtual ~ObjListCanvas();
30 
31  virtual void Draw(const char* opt=0) = 0;
32 
33  // Sub-classes must define these
34  virtual const char* PrintTag() const {return "sub-class needs print tag"; }
35  virtual const char* Description() const {return "sub-class needs description"; }
36  virtual void Print(const char* f);
37 
38  void Connect(); //!< Make signal/slot connections
39 
40  protected:
41  TGCompositeFrame* fFrame; //!< Graphics frame
42  TGLayoutHints* fLayout; //!< Layout hints for frame
43  TRootEmbeddedCanvas* fEmbCanvas; //!< Embedded canvas
44  TCanvas* fCanvas; //!< The ROOT drawing canvas
45 
46  unsigned short fXsize; //!< Size of the canvas;
47  unsigned short fYsize; //!< Size of the canvas;
48  float fAspectRatio; //!< fYsize/fXsize
49  };
50 }
51 
52 #endif // EVDB_OBJLISTCANVAS_H
53 ////////////////////////////////////////////////////////////////////////
unsigned short fYsize
Size of the canvas;.
Definition: ObjListCanvas.h:47
virtual void Draw(const char *opt=0)=0
float fAspectRatio
fYsize/fXsize
Definition: ObjListCanvas.h:48
TGLayoutHints * fLayout
Layout hints for frame.
Definition: ObjListCanvas.h:42
Base class for printable objects.
Definition: Printable.h:15
opt
Definition: train.py:196
void Connect()
Make signal/slot connections.
Manage all things related to colors for the event display.
ObjListCanvas(TGMainFrame *mf)
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: ObjListCanvas.h:44
virtual const char * Description() const
Definition: ObjListCanvas.h:35
virtual const char * PrintTag() const
Definition: ObjListCanvas.h:34
virtual void Print(const char *f)
TRootEmbeddedCanvas * fEmbCanvas
Embedded canvas.
Definition: ObjListCanvas.h:43
unsigned short fXsize
Size of the canvas;.
Definition: ObjListCanvas.h:46
TGCompositeFrame * fFrame
Graphics frame.
Definition: ObjListCanvas.h:41