]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/Tools/AliFigure.h
Update from Francesco Noferini: Added PID for all standard methods
[u/mrichter/AliRoot.git] / PWG / Tools / AliFigure.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // Canvas for ALICE figures
5 //
6 // Author: Jochen Klein <jochen.klein@cern.ch>
7
8 #include "TCanvas.h"
9 #include "TColor.h"
10
11 class TObject;
12 class TString;
13 class TCanvas;
14 class TText;
15 class TASImage;
16 class TStyle;
17 class TLatex;
18
19 class AliFigure : public TCanvas
20 {
21  public:
22   AliFigure(const char* name = "", const char* title = "", Int_t ww = 800, Int_t wh = 600);
23   ~AliFigure();
24
25   enum Status_t {
26     kWorkInProgress = 0,
27     kPerformance,
28     kPreliminary,
29     kFinal,
30     kStatusLast
31   };
32
33   enum Mode_t {
34     kPresentation,
35     kPrint
36   };
37
38   enum Pos_t {
39     kN = 0, kNE, kE, kSE, kS, kSW, kW, kNW, kCenter
40   };
41
42   void Draw(Option_t *option = "");
43   void Paint(Option_t *option = "");
44   void Clear(Option_t *option = "");
45   void Update();
46
47   void SetStatus(Status_t status);
48
49   void SetLogoFilename(Status_t status, TString filename);
50   void SetLogoPos(Float_t x, Float_t y);
51   void SetLogoPos(Pos_t pos);
52   void SetLogoSize(Float_t size);
53
54   void SetCollSystem(TString txt);
55   void SetCollSystemPos(Float_t x, Float_t y);
56
57   void SetDataSample(TString txt);
58
59   void SetTextSize(Float_t size);
60
61   static TStyle* Style();
62
63  protected:
64   void UpdateLogo();
65   void UpdateLogoPos();
66   void UpdatePad(TPad *pad);
67
68   Bool_t   isMC;
69   Status_t fStatus;
70
71   TString  fDateFormat;
72   Float_t  fTextSize;
73   Color_t  fTextColor;
74
75   TString  fLogoFilename[kStatusLast];
76   Float_t  fLogoPosX;
77   Float_t  fLogoPosY;
78   Float_t  fLogoHeight;
79
80   TPad     *fLogoPad;
81   TText    *fDate;
82   TText    *fStatusPad;
83   TLatex   *fCollSystem;
84   TLatex   *fDataSample;
85   TText    *fTag;
86   TASImage *fLogo;
87
88   const char* fStatusString[kStatusLast];
89
90   static TStyle *fgStyle;
91
92  private:
93   AliFigure(const AliFigure& rhs); // not implemented
94   AliFigure& operator=(const AliFigure& rhs); // not implemented
95
96   ClassDef(AliFigure, 1);
97 };