AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliCanvas.h
Go to the documentation of this file.
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 ALICANVAS_H
9 #define ALICANVAS_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 AliCanvas : public TCanvas
23 {
24  public:
25  AliCanvas(const char* name = "", const char* title = "", Int_t ww = 800, Int_t wh = 600);
26  ~AliCanvas();
27 
28  enum Status_t {
35  };
36 
37  enum Mode_t {
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 
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  void SetDisabledMargin(Bool_t disable = kTRUE) { fDisabledMargin = disable; }
70 
71  static TStyle* Style();
72 
73  protected:
74  void UpdateLogo();
75  void UpdateLogoPos();
76  void UpdatePad(TPad *pad);
77 
78  Bool_t fDisabled; // updating of canvas disabled
79  Bool_t fDisabledMargin; // updating of canvas margins disabled
80 
81  Bool_t isMC; // set if Monte-Carlo figure
82  Status_t fStatus; // status of plot (published, preliminary, ...)
83 
86  Color_t fTextColor;
87 
92 
93  TPad *fLogoPad;
94  TText *fDate;
95  TText *fStatusPad;
96  TLatex *fCollSystem;
97  TLatex *fDataSample;
98  TText *fTag;
99  TASImage *fLogo;
100 
102 
103  static TStyle *fgStyle;
104 
105  private:
106  AliCanvas(const AliCanvas& rhs); // not implemented
107  AliCanvas& operator=(const AliCanvas& rhs); // not implemented
108 
109  ClassDef(AliCanvas, 1);
110 };
111 
112 #endif
void SetCollSystemPos(Float_t x, Float_t y)
Definition: AliCanvas.cxx:313
const char * filename
Definition: TestFCM.C:1
TString fLogoFilename[kStatusLast]
Definition: AliCanvas.h:88
AliCanvas(const char *name="", const char *title="", Int_t ww=800, Int_t wh=600)
Definition: AliCanvas.cxx:46
const char * title
Definition: MakeQAPdf.C:27
void SetTextSize(Float_t size)
Definition: AliCanvas.cxx:399
TText * fTag
Definition: AliCanvas.h:98
TPad * fLogoPad
Definition: AliCanvas.h:93
TLatex * fCollSystem
Definition: AliCanvas.h:96
void UpdateLogo()
Definition: AliCanvas.cxx:228
void SetDisabledMargin(Bool_t disable=kTRUE)
Definition: AliCanvas.h:68
void SetLogoPos(Float_t x, Float_t y)
Definition: AliCanvas.cxx:249
void SetCollSystem(TString txt)
Definition: AliCanvas.cxx:306
Bool_t fDisabledMargin
Definition: AliCanvas.h:79
void SetDisabled(Bool_t disable=kTRUE)
Definition: AliCanvas.h:65
void Update()
Definition: AliCanvas.cxx:183
Bool_t isMC
Definition: AliCanvas.h:81
TString fDateFormat
Definition: AliCanvas.h:84
int Int_t
Definition: External.C:63
void Clear(Option_t *option="")
Definition: AliCanvas.cxx:165
Bool_t GetDisabledMargin() const
Definition: AliCanvas.h:69
Float_t fLogoPosY
Definition: AliCanvas.h:90
void Draw(Option_t *option="")
Definition: AliCanvas.cxx:151
float Float_t
Definition: External.C:68
TLatex * fDataSample
Definition: AliCanvas.h:97
Bool_t fDisabled
Definition: AliCanvas.h:78
void SetLogoSize(Float_t size)
Definition: AliCanvas.cxx:297
void SetDataSample(TString txt)
Definition: AliCanvas.cxx:321
AliCanvas & operator=(const AliCanvas &rhs)
void UpdatePad(TPad *pad)
Definition: AliCanvas.cxx:453
Bool_t GetDisabled() const
Definition: AliCanvas.h:66
static TStyle * fgStyle
Definition: AliCanvas.h:103
TASImage * fLogo
Definition: AliCanvas.h:99
Float_t fTextSize
Definition: AliCanvas.h:85
TText * fDate
Definition: AliCanvas.h:94
static TStyle * Style()
Definition: AliCanvas.cxx:328
Color_t fTextColor
Definition: AliCanvas.h:86
void SetStatus(Status_t status)
Definition: AliCanvas.cxx:208
void Paint(Option_t *option="")
Definition: AliCanvas.cxx:158
const char Option_t
Definition: External.C:48
Status_t fStatus
Definition: AliCanvas.h:82
bool Bool_t
Definition: External.C:53
Float_t fLogoPosX
Definition: AliCanvas.h:89
Float_t fLogoHeight
Definition: AliCanvas.h:91
const char * fStatusString[kStatusLast]
Definition: AliCanvas.h:101
void SetLogoFilename(Status_t status, TString filename)
Definition: AliCanvas.cxx:221
void UpdateLogoPos()
Definition: AliCanvas.cxx:410
TText * fStatusPad
Definition: AliCanvas.h:95