]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPainterContour.h
New raw-reader class which deals with events taken from shared memory via the DATE...
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterContour.h
CommitLineData
0145e89a 1#ifndef AliMUONPainterContour_H
2#define AliMUONPainterContour_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
9/// \ingroup graphics
10/// \class AliMUONPainterContour
11/// \brief Contour(s) of a painter
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ROOT_TNamed
16# include "TNamed.h"
17#endif
18
19class AliMpArea;
20class TObjArray;
21class TPolyLine;
22class TGeoHMatrix;
23class TVector2;
24
25class AliMUONPainterContour : public TNamed
26{
27public:
28 AliMUONPainterContour(const char* name="");
29 AliMUONPainterContour(const char* name, const AliMpArea& area);
30 AliMUONPainterContour(const AliMUONPainterContour& rhs);
31 AliMUONPainterContour& operator=(const AliMUONPainterContour& rhs);
32 virtual ~AliMUONPainterContour();
33
34 AliMpArea Area() const;
35
36 /// Add an offset to all points
37 void Offset(const TVector2& offset);
38
39 /// Apply a global transformation to all points
40 void Transform(const TGeoHMatrix& matrix);
41
42 void AdoptPolyLine(TPolyLine* line);
43
44 virtual void Copy(TObject& obj) const;
45
46 Bool_t IsInside(Double_t x, Double_t y) const;
47
48 /// Paint the outline
49 void Paint(Option_t* ="") { PaintOutline(1,1); }
50
51 void PaintOutline(Int_t lineColor, Int_t lineWidth);
52
53 void PaintArea(Int_t fillColor, Int_t fillStyle=1001);
54
55 virtual void Print(Option_t* opt="") const;
56
57 /// Return as an array of polylines
58 const TObjArray* AsPolyLines() const { return fPolyLines; }
59
60private:
61 TObjArray* fPolyLines; ///< the polylines used to represent to contour
62 Double_t fXmin; ///< min x-value
63 Double_t fXmax; ///< max x-value
64 Double_t fYmin; ///< min y-value
65 Double_t fYmax; ///< max y-value
66
67 ClassDef(AliMUONPainterContour,1) // Contour for one painter
68};
69
70#endif