53 #include <TVirtualX.h>
75 fTrashList =
new TList;
94 return ( (TMath::Abs(point.X()-pos.X())<dim.X() ) && (TMath::Abs(point.Y()-pos.Y())<dim.Y() ) );
103 TVector2 point = TVector2(gPad->AbsPixeltoX(x), gPad->AbsPixeltoY(y));
123 if (!newobj)
return 0;
135 TVirtualPad *pad =
gROOT->GetSelectedPad();
136 TVirtualPad *padsav = gPad;
138 TObject *newobj =
Clone();
140 if (!newobj)
return 0;
143 newobj->Draw(option);
144 if (padsav) padsav->cd();
155 if (object->InheritsFrom(AliMpSector::Class()))
157 else if (object->InheritsFrom(AliMpZone::Class()))
159 else if (object->InheritsFrom(AliMpSubZone::Class()))
161 else if (object->InheritsFrom(AliMpRow::Class()))
163 else if (object->InheritsFrom(AliMpVRowSegment::Class()))
165 else if (object->InheritsFrom(AliMpMotifPosition::Class()))
167 else if (object->InheritsFrom(AliMpMotifType::Class()))
169 else if (object->InheritsFrom(AliMpPCB::Class()))
171 else if (object->InheritsFrom(AliMpSlat::Class()))
173 else if (object->InheritsFrom(AliMpVPadIterator::Class()))
175 else if (object->InheritsFrom(AliMpVSegmentation::Class()))
219 painter->Draw(option);
236 gVirtualX->SetFillColor(
fColor);
237 gVirtualX->SetTextColor(1);
238 gVirtualX->SetLineColor(1);
247 Double_t x1,y1,x2,y2;
253 Style_t sty = gVirtualX->GetFillStyle();
254 gVirtualX->SetFillStyle(fill?1:0);
255 gPad->PaintBox(x1,y1,x2,y2);
256 gVirtualX->SetFillStyle(0);
257 gPad->PaintBox(x1,y1,x2,y2);
258 gVirtualX->SetFillStyle(sty);
static AliMpVPainter * CreatePainter(TObject *object)
Painter for a group of pads defined by an iterator.
void SetRealPosition(const TVector2 &position)
Set position of the real area where to draw.
Class for drawing a PCB into canvas.
static AliMpSegmentation * Instance(Bool_t warn=true)
Class for drawing a row into canvas.
const AliMpSlat * GetSlat(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
A PCB for station 3,4 or 5.
TVector2 GetPadDimensions() const
Return dimensions of the pad area where to draw.
Class for drawing a slat into canvas.
static AliMpGraphContext * Instance()
A slat (building block of stations 3, 4 and 5)
Int_t GetColor() const
Return color to use.
void SetPadPosition(const TVector2 &position)
Set position of the pad area where to draw.
A region of pads of the same dimensions composed of subzones.
virtual TVector2 GetPosition() const =0
Return the owned object's position.
Bool_t IsInside(const TVector2 &point, const TVector2 &pos, const TVector2 &dim)
TVector2 fPadPosition
position inside the graphics pad
An interface for a row segment.
Class for drawing a zone into canvas.
void SetRealDimensions(const TVector2 &dimensions)
Set dimensions of the real area where to draw.
virtual TVector2 GetDimensions() const =0
Return the owned object's dimensions.
An interface for an iterator over pads.
void SetPadDimensions(const TVector2 &dimensions)
Set dimensions of the pad area where to draw.
Abstract base class for drawing objects into canvas.
Class for drawing a motif into canvas.
virtual TObject * Clone(const char *newname="") const
TVector2 GetPadPosition() const
Return position of the pad area where to draw.
Class for drawing a sector into canvas.
A row composed of the row segments.
Class for drawing a motif into canvas.
A sector (quadrant) of the MUON chamber of stations 1 and 2.
TVector2 RealToPad(const TVector2 &realPos)
TVector2 fPadDimensions
dimensions inside the graphics pad
void PaintWholeBox(Bool_t fill=kTRUE)
The abstract base class for the segmentation.
AliMpVPainter * DrawObject(TObject *object, Option_t *option="")
Not implemented.
TVector2 RealToPad(const TVector2 &position) const
void AddPainter(AliMpVPainter *painter)
Not implemented.
Class describing the correspondance between a given area in pad, and a zone of real (cm) position...
virtual Int_t DistancetoPrimitive(Int_t x, Int_t y)
virtual TObject * DrawClone(Option_t *option) const
TList * fTrashList
list of painter object created
Class for drawing a subzone into canvas.
Class that defines the motif properties.
A region in zone composed of the row segments with the same motif type.