1 #ifndef ALIMUONPAINTERMATRIX_H
2 #define ALIMUONPAINTERMATRIX_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPainterMatrix
11 /// \brief A matrix of AliMUONVPainter
13 // Author Laurent Aphecetche, Subatech
21 #ifndef ALIMUONATTPAINTER_H
22 # include "AliMUONAttPainter.h"
25 class AliMUONVPainter;
26 class AliMUONVTrackerData;
29 class AliMUONPainterMatrix : public TObject
32 AliMUONPainterMatrix(const char* basename="", Int_t nx=1, Int_t ny=1);
33 virtual ~AliMUONPainterMatrix();
35 /// Adopt a painter in this matrix
36 void Adopt(AliMUONVPainter* painter);
40 AliMUONPainterMatrix* Clone(const AliMUONAttPainter& attributes) const;
42 void Connect(const char* sourceMethod, const char* destClassName,
43 void* destObject, const char* destMethod);
45 // void ChangeAttributes(const AliMUONAttPainter& attributes);
47 /// Get our attributes
48 const AliMUONAttPainter& Attributes() const { return fAttributes; }
50 /// Compute the data range for this matrix
51 void ComputeDataRange();
53 /// Get the data range for this matrix
54 void GetDataRange(Double_t& dataMin, Double_t& dataMax) const;
57 virtual const char* GetName() const { return Name().Data(); }
59 static TString NameIt(const TString& basename, const AliMUONAttPainter& att);
62 virtual TString Name() const { return fName; }
64 /// Base name (short name)
65 virtual TString Basename() const { return fBasename; }
67 void GetTypes(TObjArray& types) const;
69 /// Number of painters to arrange in x-direction
70 Int_t Nx() const { return fNx; }
72 /// Number of painters to arrange in y-direction
73 Int_t Ny() const { return fNy; }
76 AliMUONVPainter* Painter(Int_t index) const;
79 void Print(Option_t* opt="") const;
81 AliMUONVTrackerData* Data() const;
83 TString DataPattern() const;
85 Int_t DataIndex() const;
87 void SetData(const char* pattern, AliMUONVTrackerData* d, Int_t indexInData);
89 /// Force a given data range for all painter groups belonging to this matrix
90 void SetDataRange(Double_t min, Double_t max);
92 void SetOutlined(const char* pattern, Bool_t value);
94 void SetResponder(const char* pattern);
96 /// Number of painters (should be <= Nx*Ny)
99 /// Normalize attributes
100 AliMUONAttPainter Validate(const AliMUONAttPainter& att) const;
104 AliMUONPainterMatrix(const AliMUONPainterMatrix& rhs);
106 AliMUONPainterMatrix& operator=(const AliMUONPainterMatrix& rhs);
108 void UpdateAttributes();
111 TString fBasename; ///< base name of that matrix
112 TString fName; ///< complete name
113 Int_t fNx; ///< number of rows
114 Int_t fNy; ///< number of columns
115 TObjArray* fPainters; ///< painters in that matrix
116 AliMUONAttPainter fAttributes; ///< attributes of our painter(s)
118 ClassDef(AliMUONPainterMatrix,1) // Matrix of AliMUONVPainter