AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONPainterMatrix.h
Go to the documentation of this file.
1 #ifndef ALIMUONPAINTERMATRIX_H
2 #define ALIMUONPAINTERMATRIX_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // Author Laurent Aphecetche, Subatech
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 #ifndef ROOT_TString
19 # include "TString.h"
20 #endif
21 #ifndef ALIMUONATTPAINTER_H
22 # include "AliMUONAttPainter.h"
23 #endif
24 #include <string>
25 
26 class AliMUONVPainter;
28 class TObjArray;
29 class TCanvas;
30 
31 class AliMUONPainterMatrix : public TObject
32 {
33 public:
34  AliMUONPainterMatrix(const char* basename="", Int_t nx=1, Int_t ny=1);
35  virtual ~AliMUONPainterMatrix();
36 
38  void Adopt(AliMUONVPainter* painter);
39 
40  using TObject::Clone;
41 
42  AliMUONPainterMatrix* Clone(const AliMUONAttPainter& attributes) const;
43 
44  void Connect(const char* sourceMethod, const char* destClassName,
45  void* destObject, const char* destMethod);
46 
48  const AliMUONAttPainter& Attributes() const { return fAttributes; }
49 
51  void ComputeDataRange();
52 
54  void GetDataRange(Double_t& dataMin, Double_t& dataMax) const;
55 
57  virtual const char* GetName() const { return fName.Data(); }
58 
60  const char* Basename() const { return fBasename.Data(); }
61 
62  const char* Whatname() const { return fWhatname.Data(); }
63 
64  void GetTypes(TObjArray& types) const;
65 
67  Int_t Nx() const { return fNx; }
68 
70  Int_t Ny() const { return fNy; }
71 
73  AliMUONVPainter* Painter(Int_t index) const;
74 
76  void Print(Option_t* opt="") const;
77 
78  AliMUONVTrackerData* Data() const;
79 
80  TString DataPattern() const;
81 
82  Int_t DataIndex() const;
83 
84  void SetData(const char* pattern, AliMUONVTrackerData* d, Int_t indexInData);
85 
87  void SetDataRange(Double_t min, Double_t max);
88 
89  void SetOutlined(const char* pattern, Bool_t value);
90 
91  void SetResponder(const char* pattern);
92 
94  Int_t Size() const;
95 
98 
99  static std::string NameIt(const char* what, const char* basename, const AliMUONAttPainter& att);
100 
101  void Draw(Option_t* opt="");
102 
103  TCanvas* CreateCanvas(Int_t x=0, Int_t y=0, Int_t w=-1, Int_t h=-1);
104 
105 private:
110 
111  void SetName();
112  void UpdateAttributes();
113 
114 private:
115  TString fBasename;
116  TString fWhatname;
117  Int_t fNx;
118  Int_t fNy;
121  TString fName;
122 
123  ClassDef(AliMUONPainterMatrix,3) // Matrix of AliMUONVPainter
124 };
125 
126 #endif
TObjArray * fPainters
painters in that matrix
const char * Whatname() const
virtual const char * GetName() const
Get matrix name.
Int_t Nx() const
Number of painters to arrange in x-direction.
#define TObjArray
void Draw(Option_t *opt="")
void SetResponder(const char *pattern)
static std::string NameIt(const char *what, const char *basename, const AliMUONAttPainter &att)
AliMUONPainterMatrix & operator=(const AliMUONPainterMatrix &rhs)
Not implemented.
TString fBasename
base name of that matrix
void Connect(const char *sourceMethod, const char *destClassName, void *destObject, const char *destMethod)
void ComputeDataRange()
Compute the data range for this matrix.
TCanvas * CreateCanvas(Int_t x=0, Int_t y=0, Int_t w=-1, Int_t h=-1)
Base class for a graphical object representing some part of the MUON tracking system.
const char * Basename() const
Base name (short name)
AliMUONPainterMatrix * Clone(const AliMUONAttPainter &attributes) const
Int_t fNx
number of rows
void SetData(const char *pattern, AliMUONVTrackerData *d, Int_t indexInData)
TString fWhatname
data name
void GetTypes(TObjArray &types) const
void GetDataRange(Double_t &dataMin, Double_t &dataMax) const
Get the data range for this matrix.
AliMUONPainterMatrix(const char *basename="", Int_t nx=1, Int_t ny=1)
AliMUONAttPainter Validate(const AliMUONAttPainter &att) const
Normalize attributes.
AliMUONVTrackerData * Data() const
void Adopt(AliMUONVPainter *painter)
Adopt a painter in this matrix.
void SetDataRange(Double_t min, Double_t max)
Force a given data range for all painter groups belonging to this matrix.
Basic attributes shared by all painters.
Int_t Ny() const
Number of painters to arrange in y-direction.
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
AliMUONVPainter * Painter(Int_t index) const
Get a painter.
A matrix of AliMUONVPainter.
void SetOutlined(const char *pattern, Bool_t value)
Int_t Size() const
Number of painters (should be <= Nx*Ny)
const AliMUONAttPainter & Attributes() const
Get our attributes.
Int_t fNy
number of columns
void Print(Option_t *opt="") const
Printout.
AliMUONAttPainter fAttributes
attributes of our painter(s)