]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveTrackCounter.h
* hmpid_digits.C, hmpid_raw.C
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveTrackCounter.h
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #ifndef AliEveTrackCounter_H
11 #define AliEveTrackCounter_H
12
13 #include "TEveElement.h"
14 #include "TList.h"
15
16 class AliEveTrack;
17 class AliEveTracklet;
18 class TEveTrackList;
19
20 //______________________________________________________________________________
21 // Short description of AliEveTrackCounter
22 //
23
24 class AliEveTrackCounter :  public TEveElement, public TNamed
25 {
26   friend class AliEveTrackCounterEditor;
27
28 public:
29   enum EClickAction_e { kCA_PrintTrackInfo, kCA_ToggleTrack };
30
31   AliEveTrackCounter(const Text_t* name="AliEveTrackCounter", const Text_t* title="");
32   virtual ~AliEveTrackCounter();
33
34   Int_t GetEventId() const { return fEventId; }
35   void  SetEventId(Int_t id) { fEventId = id; }
36
37   void Reset();
38
39   void RegisterTracks(TEveTrackList* tlist, Bool_t goodTracks);
40   void RegisterTracklets(TEveTrackList* tlist, Bool_t goodTracks);
41
42   void DoTrackAction(AliEveTrack* track);
43   void DoTrackletAction(AliEveTracklet* track);
44
45   Int_t GetClickAction() const  { return fClickAction; }
46   void  SetClickAction(Int_t a) { fClickAction = a; }
47
48   void OutputEventTracks();
49   void PrintEventTracks();
50
51   static AliEveTrackCounter* fgInstance;
52
53 protected:
54   Int_t fBadLineStyle;  // TEveLine-style used for secondary/bad tracks.
55   Int_t fClickAction;   // Action to take when a track is ctrl-clicked.
56
57   Int_t fEventId;       // Current event-id.
58
59   Int_t fAllTracks;     // Counter of all tracks.
60   Int_t fGoodTracks;    // Counter of good tracks.
61   Int_t fAllTracklets;  // Counter of all tracklets.
62   Int_t fGoodTracklets; // Counter of good tracklets.
63
64   TList fTrackLists;    // List of track-lists registered for management.
65   TList fTrackletLists; // List of tracklet-lists registered for management.
66
67 private:
68   AliEveTrackCounter(const AliEveTrackCounter&);            // Not implemented
69   AliEveTrackCounter& operator=(const AliEveTrackCounter&); // Not implemented
70
71   ClassDef(AliEveTrackCounter, 0); // Class for selection of good/primary tracks with basic processing functionality.
72 };
73
74 #endif