Additiona TOF data members (S.Arcelli)
[u/mrichter/AliRoot.git] / FMD / AliFMDDisplay.h
CommitLineData
bf000c32 1#ifndef AliFMDDISPLAY_H
2#define AliFMDDISPLAY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
8//___________________________________________________________________
9//
10// The classes defined here, are utility classes for reading in data
11// for the FMD. They are put in a seperate library to not polute the
12// normal libraries. The classes are intended to be used as base
13// classes for customized class that do some sort of analysis on the
14// various types of data produced by the FMD.
15//
16#include "AliFMDInput.h"
17class TObjArray;
18class TCanvas;
19class TPad;
20class TButton;
21
22//___________________________________________________________________
9f662337 23/** @class AliFMDDisplay
24 @brief Utility class to visualize FMD data in geometry.
25 @ingroup FMD_util
26 */
bf000c32 27class AliFMDDisplay : public AliFMDInput
28{
29public:
9f662337 30 /** Constructor
31 @param gAliceFile galice file*/
bf000c32 32 AliFMDDisplay(const char* gAliceFile="galice.root");
9f662337 33 /** DTOR */
bf000c32 34 virtual ~AliFMDDisplay() {}
9f662337 35 /** Singleton access function
36 @return Singleton object. */
bf000c32 37 static AliFMDDisplay* Instance();
38
9f662337 39 /** Continue to next event */
bf000c32 40 void Continue() { fWait = kFALSE; }
9f662337 41 /** Zoom mode */
bf000c32 42 void Zoom() { fZoomMode = kTRUE; }
9f662337 43 /** Pick mode */
bf000c32 44 void Pick() { fZoomMode = kFALSE; }
9f662337 45 /** Called when a mouse or similar event happens in the display.
46 @param event Event type
47 @param px where the event happened in pixels along X
48 @param py where the event happened in pixels along Y */
bf000c32 49 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
9f662337 50 /** Calculate distance from point @f$ (p_x,p_y)@f$ to this object.
51 @param px Pixel X coordinate
52 @param py Pixel Y coordinate
53 @return distance. */
1e8f773e 54 Int_t DistancetoPrimitive(Int_t px, Int_t py);
9f662337 55 /** Paint into canvas
56 @param option Not used */
1e8f773e 57 void Paint(Option_t* option="") { (void)option; }
bf000c32 58
9f662337 59 /** Initialize
60 @return @c false on error */
bf000c32 61 virtual Bool_t Init();
9f662337 62 /** Called at beginning of an event
63 @param event Event number
64 @return @c false on error */
bf000c32 65 virtual Bool_t Begin(Int_t event);
9f662337 66 /** Called at end of an event
67 @return @c false on error */
bf000c32 68 virtual Bool_t End();
9f662337 69 /** Visualize a hit
70 @param hit Hit
71 @param p Track
72 @return @c false on error */
bf000c32 73 virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle* p);
9f662337 74 /** Visualize a digit
75 @param digit Digit to draw
76 @return @c false on error */
bf000c32 77 virtual Bool_t ProcessDigit(AliFMDDigit* digit);
9f662337 78 /** Visualize a raw digit
79 @param digit Raw digit.
80 @return @c false on error */
d760ea03 81 virtual Bool_t ProcessRaw(AliFMDDigit* digit);
9f662337 82 /** Visualize a reconstructed point.
83 @param recpoint Reconstructed point
84 @return @c false on error */
bf000c32 85 virtual Bool_t ProcessRecPoint(AliFMDRecPoint* recpoint);
9f662337 86 /** Look up a color index, based on the value @a x and the maximum
87 value of @a x
88 @param x Value
89 @param max Maximum (for example 1023 for digits)
90 @return @c false on error */
bf000c32 91 virtual Int_t LookupColor(Float_t x, Float_t max) const;
92protected:
93 static AliFMDDisplay* fgInstance; // Static instance
94 Bool_t fWait; // Wait until user presses `Continue'
95 TObjArray* fMarkers; // Cache of markers
96 TObjArray* fHits; // Cache of `hits'
97 TCanvas* fCanvas; // Canvas to draw in
98 TPad* fPad; // View pad.
99 TButton* fButton; // Continue button
100 TButton* fZoom; // Zoom button
101 TButton* fPick; // Pick button
102 Bool_t fZoomMode; // Whether we're in Zoom mode
103 Float_t fX0; // X at lower left corner or range
104 Float_t fY0; // Y at lower left corner or range
105 Float_t fX1; // X at upper right corner or range
106 Float_t fY1; // Y at upper right corner or range
107 Int_t fXPixel; // X pixel of mark
108 Int_t fYPixel; // Y pixel of mark
109 Int_t fOldXPixel; // Old x pixel of mark
110 Int_t fOldYPixel; // Old y pixel of mark
111 Bool_t fLineDrawn; // Whether we're drawing a box
112 ClassDef(AliFMDDisplay,0) // FMD specialised event display
113};
114
115#endif
116//____________________________________________________________________
117//
118// Local Variables:
119// mode: C++
120// End:
121//
122// EOF
123//