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 /// Get our attributes
46 const AliMUONAttPainter& Attributes() const { return fAttributes; }
48 /// Compute the data range for this matrix
49 void ComputeDataRange();
51 /// Get the data range for this matrix
52 void GetDataRange(Double_t& dataMin, Double_t& dataMax) const;
55 virtual const char* GetName() const { return Name().Data(); }
57 static TString NameIt(const TString& basename, const AliMUONAttPainter& att);
60 virtual TString Name() const { return fName; }
62 /// Base name (short name)
63 virtual TString Basename() const { return fBasename; }
65 void GetTypes(TObjArray& types) const;
67 /// Number of painters to arrange in x-direction
68 Int_t Nx() const { return fNx; }
70 /// Number of painters to arrange in y-direction
71 Int_t Ny() const { return fNy; }
74 AliMUONVPainter* Painter(Int_t index) const;
77 void Print(Option_t* opt="") const;
79 AliMUONVTrackerData* Data() const;
81 TString DataPattern() const;
83 Int_t DataIndex() const;
85 void SetData(const char* pattern, AliMUONVTrackerData* d, Int_t indexInData);
87 /// Force a given data range for all painter groups belonging to this matrix
88 void SetDataRange(Double_t min, Double_t max);
90 void SetOutlined(const char* pattern, Bool_t value);
92 void SetResponder(const char* pattern);
94 /// Number of painters (should be <= Nx*Ny)
97 /// Normalize attributes
98 AliMUONAttPainter Validate(const AliMUONAttPainter& att) const;
102 AliMUONPainterMatrix(const AliMUONPainterMatrix& rhs);
104 AliMUONPainterMatrix& operator=(const AliMUONPainterMatrix& rhs);
106 void UpdateAttributes();
109 TString fBasename; ///< base name of that matrix
110 TString fName; ///< complete name
111 Int_t fNx; ///< number of rows
112 Int_t fNy; ///< number of columns
113 TObjArray* fPainters; ///< painters in that matrix
114 AliMUONAttPainter fAttributes; ///< attributes of our painter(s)
116 ClassDef(AliMUONPainterMatrix,1) // Matrix of AliMUONVPainter