Logo ROOT   6.08/07
Reference Guide
TEveTreeTools.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveTreeTools
13 #define ROOT_TEveTreeTools
14 
15 #include "TSelectorDraw.h"
16 #include "TEventList.h"
17 
18 /******************************************************************************/
19 // TEveSelectorToEventList
20 /******************************************************************************/
21 
23 {
24  TEveSelectorToEventList(const TEveSelectorToEventList&); // Not implemented
25  TEveSelectorToEventList& operator=(const TEveSelectorToEventList&); // Not implemented
26 
27 protected:
30 public:
31  TEveSelectorToEventList(TEventList* evl, const char* sel);
32 
33  virtual Int_t Version() const { return 1; }
34  virtual Bool_t Process(Long64_t entry);
35 
36  ClassDef(TEveSelectorToEventList, 1); // TSelector that stores entry numbers of matching TTree entries into an event-list.
37 };
38 
39 /******************************************************************************/
40 // TEvePointSelectorConsumer, TEvePointSelector
41 /******************************************************************************/
42 
43 class TEvePointSelector;
44 
46 {
47 public:
48  enum ETreeVarType_e { kTVT_XYZ, kTVT_RPhiZ };
49 
50 protected:
51  ETreeVarType_e fSourceCS; // Coordinate-System of the source tree variables
52 
53 public:
54  TEvePointSelectorConsumer(ETreeVarType_e cs=kTVT_XYZ) :fSourceCS(cs) {}
56 
57  virtual void InitFill(Int_t /*subIdNum*/) {}
58  virtual void TakeAction(TEvePointSelector*) = 0;
59 
60  ETreeVarType_e GetSourceCS() const { return fSourceCS; }
61  void SetSourceCS(ETreeVarType_e cs) { fSourceCS = cs; }
62 
63  ClassDef(TEvePointSelectorConsumer, 1); // Virtual base for classes that can be filled from TTree data via the TEvePointSelector class.
64 };
65 
67 {
68  TEvePointSelector(const TEvePointSelector&); // Not implemented
69  TEvePointSelector& operator=(const TEvePointSelector&); // Not implemented
70 
71 protected:
74 
77 
80 
82 
83 public:
85  const char* vexp="", const char* sel="");
86  virtual ~TEvePointSelector() {}
87 
88  virtual Long64_t Select(const char* selection=0);
89  virtual Long64_t Select(TTree* t, const char* selection=0);
90  virtual void TakeAction();
91 
92 
93  TTree* GetTree() const { return fTree; }
94  void SetTree(TTree* t) { fTree = t; }
95 
96  TEvePointSelectorConsumer* GetConsumer() const { return fConsumer; }
97  void SetConsumer(TEvePointSelectorConsumer* c) { fConsumer = c; }
98 
99  const char* GetVarexp() const { return fVarexp; }
100  void SetVarexp(const char* v) { fVarexp = v; }
101 
102  const char* GetSelection() const { return fSelection; }
103  void SetSelection(const char* s) { fSelection = s; }
104 
105  const char* GetSubIdExp() const { return fSubIdExp; }
106  void SetSubIdExp(const char* s) { fSubIdExp = s; }
107 
108  Int_t GetSubIdNum() const { return fSubIdNum; }
109 
110  ClassDef(TEvePointSelector, 1); // TSelector for direct extraction of point-like data from a Tree.
111 };
112 
113 #endif
TTree * GetTree() const
Definition: TEveTreeTools.h:93
void SetSubIdExp(const char *s)
long long Long64_t
Definition: RtypesCore.h:69
virtual ~TEvePointSelectorConsumer()
Definition: TEveTreeTools.h:55
virtual void InitFill(Int_t)
Definition: TEveTreeTools.h:57
return c
TEvePointSelectorConsumer * fConsumer
Definition: TEveTreeTools.h:73
void SetTree(TTree *t)
Definition: TEveTreeTools.h:94
TSelector that stores entry numbers of matching TTree entries into an event-list. ...
Definition: TEveTreeTools.h:22
virtual void TakeAction()
Execute action for object obj fNfill times.
Basic string class.
Definition: TString.h:137
virtual ~TEvePointSelector()
Definition: TEveTreeTools.h:86
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const char * GetSelection() const
TEvePointSelectorConsumer(ETreeVarType_e cs=kTVT_XYZ)
Definition: TEveTreeTools.h:54
#define ClassDef(name, id)
Definition: Rtypes.h:254
TEvePointSelectorConsumer * GetConsumer() const
Definition: TEveTreeTools.h:96
TEvePointSelectorConsumer is a virtual base for classes that can be filled from TTree data via the TE...
Definition: TEveTreeTools.h:45
A doubly linked list.
Definition: TList.h:47
virtual Bool_t Process(Long64_t entry)
Process entry.
const char * GetVarexp() const
Definition: TEveTreeTools.h:99
SVector< double, 2 > v
Definition: Dict.h:5
A TEventList object is a list of selected events (entries) in a TTree.
Definition: TEventList.h:33
A specialized TSelector for TTree::Draw.
Definition: TSelectorDraw.h:33
void SetVarexp(const char *v)
TEveSelectorToEventList(const TEveSelectorToEventList &)
Int_t GetSubIdNum() const
const char * GetSubIdExp() const
TEveSelectorToEventList & operator=(const TEveSelectorToEventList &)
void SetSelection(const char *s)
ETreeVarType_e GetSourceCS() const
Definition: TEveTreeTools.h:60
A TTree object has a header with a name and a title.
Definition: TTree.h:98
void SetConsumer(TEvePointSelectorConsumer *c)
Definition: TEveTreeTools.h:97
ETreeVarType_e fSourceCS
Definition: TEveTreeTools.h:51
virtual Int_t Version() const
Definition: TEveTreeTools.h:33
TEvePointSelector is a sub-class of TSelectorDraw for direct extraction of point-like data from a Tre...
Definition: TEveTreeTools.h:66
void SetSourceCS(ETreeVarType_e cs)
Definition: TEveTreeTools.h:61