]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h
coding violations and compilation warnings fixed (Sergey)
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCADisplay.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
3
4 //* This file is property of and copyright by the ALICE HLT Project         * 
5 //* ALICE Experiment at CERN, All rights reserved.                          *
6 //* See cxx source for full Copyright notice                                *
7
8 //*                                                                         *
9 //*  AliHLTTPCCADisplay class is a debug utility.                           *
10 //*  It is not used in the normal data processing.                          *
11 //*                                                                         *
12
13 #ifndef ALIHLTTPCCADISPLAY_H
14 #define ALIHLTTPCCADISPLAY_H
15
16 class AliHLTTPCCATracker;
17 class AliHLTTPCCACell;
18 class AliHLTTPCCATrack;
19
20 class TCanvas;
21 #include "TArc.h"
22 #include "TLine.h"
23 #include "TPolyLine.h"
24 #include "TBox.h"
25 #include "TCrown.h"
26 #include "TMarker.h"
27 #include "TLatex.h"
28
29
30 /**
31  * @class AliHLTTPCCADisplay
32  */
33 class AliHLTTPCCADisplay
34 {
35  public:
36
37   static AliHLTTPCCADisplay &Instance();
38   
39   AliHLTTPCCADisplay();
40   AliHLTTPCCADisplay( const AliHLTTPCCADisplay& );
41   AliHLTTPCCADisplay& operator=(const AliHLTTPCCADisplay&);
42
43   virtual ~AliHLTTPCCADisplay();
44
45   void Init();
46   void Update();
47   void Clear();
48   void Ask();
49   void SetSectorView();
50   void SetTPCView();
51   void SetCurrentSector( AliHLTTPCCATracker *sec ); 
52
53   Int_t GetColor( Double_t z ) const ;
54   void Global2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
55   void Sec2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
56
57   void DrawTPC();
58   void DrawSector( AliHLTTPCCATracker *sec ); 
59
60   void DrawHit( Int_t iRow,Int_t iHit, Int_t color=-1 );
61   void DrawCell( Int_t iRow, AliHLTTPCCACell &cell, Int_t width=1, Int_t color=-1 );
62   void DrawCell( Int_t iRow, Int_t iCell, Int_t width=1, Int_t color=-1 );
63
64   void ConnectCells( Int_t iRow1, AliHLTTPCCACell &cell1, Int_t iRow2, AliHLTTPCCACell &cell2, Int_t color=-1 );
65
66   void DrawTrack( AliHLTTPCCATrack &track, Int_t color=-1 );
67
68  protected:
69
70   TCanvas *fYX, *fZX;               // two views
71   Bool_t fAsk;                      // flag to ask for the pressing key
72   Bool_t fSectorView;               // switch between sector/TPC zoomv
73   AliHLTTPCCATracker *fSector;      // current CA tracker, includes sector geometry
74   Double_t fCos, fSin, fZMin, fZMax;// view parameters
75   Double_t fRInnerMin, fRInnerMax, fROuterMin, fROuterMax,fTPCZMin, fTPCZMax; // view parameters
76
77   TArc fArc;       // parameters of drawing objects are copied from this members
78   TLine fLine;     //!
79   TPolyLine fPLine;//!
80   TMarker fMarker; //!
81   TBox fBox;       //!
82   TCrown fCrown;   //!
83   TLatex fLatex;   //!
84
85   class AliHLTTPCCADisplayTmpCell{  
86   public:
87     Int_t &Index(){ return fIndex; }
88     Double_t &S(){ return fS; }
89
90     static Bool_t CompareCellDS( const AliHLTTPCCADisplayTmpCell &a, 
91                                  const AliHLTTPCCADisplayTmpCell  &b )
92     {    
93       return (a.fS < b.fS);
94     }
95   protected:
96     Int_t fIndex; // cell index
97     Double_t fS;  // cell position on the track
98   };
99
100
101   ClassDef(AliHLTTPCCADisplay,1);
102
103 };
104
105 #endif