]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/Tools/AliFigure.h
Static cast needed by C++11
[u/mrichter/AliRoot.git] / PWG / Tools / AliFigure.h
CommitLineData
5e2810e1 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
3b27388b 8#ifndef ALIFIGURE_H
9#define ALIFIGURE_H
10
5e2810e1 11#include "TCanvas.h"
12#include "TColor.h"
13
14class TObject;
15class TString;
16class TCanvas;
17class TText;
18class TASImage;
19class TStyle;
20class TLatex;
21
22class 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};
3b27388b 101
102#endif