]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveTrackCounter.h
Coverity
[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   Bool_t GetActive() const { return fActive; }
52   void   SetActive(Bool_t a) { fActive = a; }
53
54   static AliEveTrackCounter* fgInstance;
55
56   static Bool_t IsActive();
57
58 protected:
59   Int_t fBadLineStyle;  // TEveLine-style used for secondary/bad tracks.
60   Int_t fClickAction;   // Action to take when a track is ctrl-clicked.
61
62   Int_t fEventId;       // Current event-id.
63
64   Int_t fAllTracks;     // Counter of all tracks.
65   Int_t fGoodTracks;    // Counter of good tracks.
66   Int_t fAllTracklets;  // Counter of all tracklets.
67   Int_t fGoodTracklets; // Counter of good tracklets.
68
69   TList fTrackLists;    // List of track-lists registered for management.
70   TList fTrackletLists; // List of tracklet-lists registered for management.
71
72   Bool_t fActive;
73
74 private:
75   AliEveTrackCounter(const AliEveTrackCounter&);            // Not implemented
76   AliEveTrackCounter& operator=(const AliEveTrackCounter&); // Not implemented
77
78   ClassDef(AliEveTrackCounter, 0); // Class for selection of good/primary tracks with basic processing functionality.
79 };
80
81 #endif