AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONPainterGroup.h
Go to the documentation of this file.
1 #ifndef ALIMUONPAINTERGROUP_H
2 #define ALIMUONPAINTERGROUP_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 
22 class AliMUONVPainter;
24 
25 class AliMUONPainterGroup : public TObject
26 {
27 public:
29  AliMUONPainterGroup(const char* type, Int_t depth);
30  virtual ~AliMUONPainterGroup();
31 
32  Bool_t Add(AliMUONVPainter* painter);
33 
34  void ComputeDataRange(Double_t& dataMin, Double_t& dataMax);
35 
37  AliMUONVTrackerData* Data() const { return fData; }
38 
40  Int_t DataIndex() const { return fDataIndex; }
41 
43  Double_t DataMax() const { return fDataMax; }
44 
46  Double_t DataMin() const { return fDataMin; }
47 
49  Int_t Depth() const { return fDepth; }
50 
51  void Draw(Option_t* opt="");
52 
53  AliMUONVPainter* First() const;
54 
56  Bool_t IsSortable() const { return kTRUE; }
57 
58  Int_t Compare(const TObject* obj) const;
59 
61  Bool_t IsOutlined() const { return fIsOutlined; }
62 
64  Bool_t IsPlotter() const { return fData != 0 && fDataIndex >= 0; }
65 
67  Bool_t IsResponder() const { return fIsResponder; }
68 
70  Bool_t IsVisible() const { return fIsVisible; }
71 
72  Bool_t Matches(const char* pattern) const;
73 
74  void Print(Option_t* opt="") const;
75 
76  void SetData(AliMUONVTrackerData* data, Int_t dataIndex);
77 
79  void SetDataRange(Double_t min, Double_t max)
80  { fDataMin = min; fDataMax = max; }
81 
82  Int_t GetLineColor() const;
83 
84  Int_t GetLineWidth() const;
85 
86  void SetLine(Int_t lineColor, Int_t lineWidth);
87 
89  void SetOutlined(Bool_t flag=kTRUE) { fIsOutlined = flag; }
90 
92  void SetResponder(Bool_t flag=kTRUE) { fIsResponder = flag; }
93 
95  void SetVisible(Bool_t flag=kTRUE) { fIsVisible = flag; }
96 
98  const char* Type() const { return fType.Data(); }
99 
100 private:
105 
106 private:
107  TString fType;
108  Bool_t fIsResponder;
109  Bool_t fIsVisible;
111  Int_t fDataIndex;
112  Double_t fDataMin;
113  Double_t fDataMax;
115  Int_t fDepth;
116  Bool_t fIsOutlined;
117 
118  ClassDef(AliMUONPainterGroup,1) // Group of AliMUONVPainter
119 };
120 
121 #endif
AliMUONPainterGroup & operator=(const AliMUONPainterGroup &rhs)
Not implemented.
Bool_t fIsResponder
whether we are responding to mouse events
Int_t fDepth
depth in the hierarchy of painters
Bool_t IsResponder() const
Whether we are the responder group.
#define TObjArray
Int_t DataIndex() const
Return the index within the data.
Bool_t Matches(const char *pattern) const
void SetResponder(Bool_t flag=kTRUE)
Set the responder flag.
void SetOutlined(Bool_t flag=kTRUE)
Set the outlined flag.
Double_t fDataMax
max data
AliMUONVPainter * First() const
void SetDataRange(Double_t min, Double_t max)
Set the data range.
TObjArray * fPainters
painters of this group
AliMUONVTrackerData * Data() const
Return the data we are plotting.
void SetVisible(Bool_t flag=kTRUE)
Set the visible flag.
const char * Type() const
Our type.
void SetData(AliMUONVTrackerData *data, Int_t dataIndex)
Int_t Depth() const
Depth.
Base class for a graphical object representing some part of the MUON tracking system.
Bool_t IsPlotter() const
Whether we are the plotting group.
Bool_t Add(AliMUONVPainter *painter)
void SetLine(Int_t lineColor, Int_t lineWidth)
Bool_t IsVisible() const
Whether we are visible.
void ComputeDataRange(Double_t &dataMin, Double_t &dataMax)
Bool_t IsOutlined() const
Whether we should outline ourselves.
Int_t fDataIndex
the index of the data to plot (can be -1 if data=0x0)
AliMUONVTrackerData * fData
the data we plot (can be 0x0)
Bool_t fIsVisible
whether we are visible
Bool_t fIsOutlined
whether we should be outlined
Double_t DataMin() const
Min data we are plotting.
Bool_t IsSortable() const
We are sortable (by type)
TString fType
type of this group (e.g. PADS, MANU, PCB, etc...)
Int_t Compare(const TObject *obj) const
A group of AliMUONVPainter.
void Draw(Option_t *opt="")
Double_t fDataMin
min data
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
Double_t DataMax() const
Max data we are plotting.
void Print(Option_t *opt="") const