]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/Tools/AliFigure.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[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     kPerformance,
31     kPreliminary,
32     kFinal,
33     kStatusLast
34   };
35
36   enum Mode_t {
37     kPresentation,
38     kPrint
39   };
40
41   enum Pos_t {
42     kN = 0, kNE, kE, kSE, kS, kSW, kW, kNW, kCenter
43   };
44
45   void Draw(Option_t *option = "");
46   void Paint(Option_t *option = "");
47   void Clear(Option_t *option = "");
48   void Update();
49
50   void SetStatus(Status_t status);
51
52   void SetLogoFilename(Status_t status, TString filename);
53   void SetLogoPos(Float_t x, Float_t y);
54   void SetLogoPos(Pos_t pos);
55   void SetLogoSize(Float_t size);
56
57   void SetCollSystem(TString txt);
58   void SetCollSystemPos(Float_t x, Float_t y);
59
60   void SetDataSample(TString txt);
61
62   void SetTextSize(Float_t size);
63
64   static TStyle* Style();
65
66  protected:
67   void UpdateLogo();
68   void UpdateLogoPos();
69   void UpdatePad(TPad *pad);
70
71   Bool_t   isMC;
72   Status_t fStatus;
73
74   TString  fDateFormat;
75   Float_t  fTextSize;
76   Color_t  fTextColor;
77
78   TString  fLogoFilename[kStatusLast];
79   Float_t  fLogoPosX;
80   Float_t  fLogoPosY;
81   Float_t  fLogoHeight;
82
83   TPad     *fLogoPad;
84   TText    *fDate;
85   TText    *fStatusPad;
86   TLatex   *fCollSystem;
87   TLatex   *fDataSample;
88   TText    *fTag;
89   TASImage *fLogo;
90
91   const char* fStatusString[kStatusLast];
92
93   static TStyle *fgStyle;
94
95  private:
96   AliFigure(const AliFigure& rhs); // not implemented
97   AliFigure& operator=(const AliFigure& rhs); // not implemented
98
99   ClassDef(AliFigure, 1);
100 };
101
102 #endif