]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/Tools/AliFigure.h
- update for AliFigure to accommodate current plotting rules
[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 #ifndef ALIFIGURE_H
9 #define ALIFIGURE_H
10
11 #include "TCanvas.h"
12 #include "TColor.h"
13
14 class TObject;
15 class TString;
16 class TCanvas;
17 class TText;
18 class TASImage;
19 class TStyle;
20 class TLatex;
21
22 class AliFigure : public TCanvas
23 {
24  public:
25   AliFigure(const char* name = "", const char* title = "", Int_t ww = 800, Int_t wh = 600);
26   ~AliFigure();
27
28   enum Status_t {
29     kWorkInProgress = 0,
30     kThisWork,
31     kPerformance,
32     kPreliminary,
33     kFinal,
34     kStatusLast
35   };
36
37   enum Mode_t {
38     kPresentation,
39     kPrint
40   };
41
42   enum Pos_t {
43     kN = 0, kNE, kE, kSE, kS, kSW, kW, kNW, kCenter
44   };
45
46   void Draw(Option_t *option = "");
47   void Paint(Option_t *option = "");
48   void Clear(Option_t *option = "");
49   void Update();
50
51   void SetStatus(Status_t status);
52
53   void SetLogoFilename(Status_t status, TString filename);
54   void SetLogoPos(Float_t x, Float_t y);
55   void SetLogoPos(Pos_t pos);
56   void SetLogoSize(Float_t size);
57
58   void SetCollSystem(TString txt);
59   void SetCollSystemPos(Float_t x, Float_t y);
60
61   void SetDataSample(TString txt);
62
63   void SetTextSize(Float_t size);
64
65   void SetDisabled(Bool_t disable = kTRUE) { fDisabled = disable; }
66   Bool_t GetDisabled() const { return fDisabled; }
67
68   static TStyle* Style();
69
70  protected:
71   void UpdateLogo();
72   void UpdateLogoPos();
73   void UpdatePad(TPad *pad);
74
75   Bool_t   fDisabled;
76
77   Bool_t   isMC;
78   Status_t fStatus;
79
80   TString  fDateFormat;
81   Float_t  fTextSize;
82   Color_t  fTextColor;
83
84   TString  fLogoFilename[kStatusLast];
85   Float_t  fLogoPosX;
86   Float_t  fLogoPosY;
87   Float_t  fLogoHeight;
88
89   TPad     *fLogoPad;
90   TText    *fDate;
91   TText    *fStatusPad;
92   TLatex   *fCollSystem;
93   TLatex   *fDataSample;
94   TText    *fTag;
95   TASImage *fLogo;
96
97   const char* fStatusString[kStatusLast];
98
99   static TStyle *fgStyle;
100
101  private:
102   AliFigure(const AliFigure& rhs); // not implemented
103   AliFigure& operator=(const AliFigure& rhs); // not implemented
104
105   ClassDef(AliFigure, 1);
106 };
107
108 #endif