Logo ROOT  
Reference Guide
REveTreeTools.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, 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 ROOT7_REveTreeTools
13 #define ROOT7_REveTreeTools
14 
15 #include "TSelectorDraw.h"
16 #include "TEventList.h"
17 
18 namespace ROOT {
19 namespace Experimental {
20 
21 /////////////////////////////////////////////////////////////////////////////////
22 /// REveSelectorToEventList
23 /// TSelector that stores entry numbers of matching TTree entries into an event-list.
24 /////////////////////////////////////////////////////////////////////////////////
25 
27 {
30 
31 protected:
32  TEventList *fEvList{nullptr};
34 
35 public:
36  REveSelectorToEventList(TEventList *evl, const char *sel);
38 
39  virtual Int_t Version() const { return 1; }
40  virtual Bool_t Process(Long64_t entry);
41 
42  ClassDef(REveSelectorToEventList, 1); // TSelector that stores entry numbers of matching TTree entries into an event-list.
43 };
44 
45 /////////////////////////////////////////////////////////////////////////////////
46 /// REvePointSelectorConsumer
47 /// Virtual base for classes that can be filled from TTree data via the REvePointSelector class.
48 /////////////////////////////////////////////////////////////////////////////////
49 
50 class REvePointSelector;
51 
53 {
54 public:
56 
57 protected:
58  ETreeVarType_e fSourceCS; // Coordinate-System of the source tree variables
59 
60 public:
63 
64  virtual void InitFill(Int_t /*subIdNum*/) {}
65  virtual void TakeAction(REvePointSelector *) = 0;
66 
67  ETreeVarType_e GetSourceCS() const { return fSourceCS; }
69 };
70 
71 /////////////////////////////////////////////////////////////////////////////////
72 /// REvePointSelector
73 /// TSelector for direct extraction of point-like data from a Tree.
74 /////////////////////////////////////////////////////////////////////////////////
75 
77 {
80 
81 protected:
82  TTree *fTree{nullptr};
84 
87 
90 
92 
93 public:
94  REvePointSelector(TTree *t = nullptr, REvePointSelectorConsumer *c = nullptr, const char *vexp = "", const char *sel = "");
95  virtual ~REvePointSelector() {}
96 
97  virtual Long64_t Select(const char *selection = nullptr);
98  virtual Long64_t Select(TTree *t, const char *selection = nullptr);
99  virtual void TakeAction();
100 
101  TTree *GetTree() const { return fTree; }
102  void SetTree(TTree *t) { fTree = t; }
103 
106 
107  const char *GetVarexp() const { return fVarexp; }
108  void SetVarexp(const char *v) { fVarexp = v; }
109 
110  const char *GetSelection() const { return fSelection; }
111  void SetSelection(const char *s) { fSelection = s; }
112 
113  const char *GetSubIdExp() const { return fSubIdExp; }
114  void SetSubIdExp(const char *s) { fSubIdExp = s; }
115 
116  Int_t GetSubIdNum() const { return fSubIdNum; }
117 
118  ClassDef(REvePointSelector, 1); // TSelector for direct extraction of point-like data from a Tree.
119 };
120 
121 } // namespace Experimental
122 } // namespace ROOT
123 
124 #endif
c
#define c(i)
Definition: RSha256.hxx:101
ROOT::Experimental::REvePointSelector::REvePointSelector
REvePointSelector(const REvePointSelector &)=delete
ROOT::Experimental::REveSelectorToEventList::REveSelectorToEventList
REveSelectorToEventList(const REveSelectorToEventList &)=delete
ROOT::Experimental::REvePointSelector::GetSubIdExp
const char * GetSubIdExp() const
Definition: REveTreeTools.hxx:113
ROOT::Experimental::REvePointSelector::fConsumer
REvePointSelectorConsumer * fConsumer
Definition: REveTreeTools.hxx:83
TEventList
A TEventList object is a list of selected events (entries) in a TTree.
Definition: TEventList.h:31
ROOT::Experimental::REvePointSelector::SetSubIdExp
void SetSubIdExp(const char *s)
Definition: REveTreeTools.hxx:114
ROOT::Experimental::REveSelectorToEventList::fEvList
TEventList * fEvList
Definition: REveTreeTools.hxx:32
ROOT::Experimental::REvePointSelectorConsumer::~REvePointSelectorConsumer
virtual ~REvePointSelectorConsumer()
Definition: REveTreeTools.hxx:62
ROOT::Experimental::REveSelectorToEventList::Version
virtual Int_t Version() const
Definition: REveTreeTools.hxx:39
ROOT::Experimental::REvePointSelectorConsumer::kTVT_XYZ
@ kTVT_XYZ
Definition: REveTreeTools.hxx:55
ROOT::Experimental::REvePointSelector::fSelection
TString fSelection
Definition: REveTreeTools.hxx:86
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
ROOT::Experimental::REvePointSelector::fSubIdExp
TString fSubIdExp
Definition: REveTreeTools.hxx:88
ROOT::Experimental::REvePointSelector::fSubIdNum
Int_t fSubIdNum
Definition: REveTreeTools.hxx:89
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
ROOT::Experimental::REvePointSelector::GetVarexp
const char * GetVarexp() const
Definition: REveTreeTools.hxx:107
ROOT::Experimental::REveSelectorToEventList::~REveSelectorToEventList
virtual ~REveSelectorToEventList()
Definition: REveTreeTools.hxx:37
TString
Basic string class.
Definition: TString.h:136
ROOT::Experimental::REvePointSelectorConsumer::ETreeVarType_e
ETreeVarType_e
Definition: REveTreeTools.hxx:55
ROOT::Experimental::REvePointSelector::~REvePointSelector
virtual ~REvePointSelector()
Definition: REveTreeTools.hxx:95
ROOT::Experimental::REvePointSelector::operator=
REvePointSelector & operator=(const REvePointSelector &)=delete
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
ROOT::Experimental::REvePointSelector::TakeAction
virtual void TakeAction()
Callback from tree-player after a chunk of data has been processed.
Definition: REveTreeTools.cxx:127
v
@ v
Definition: rootcling_impl.cxx:3635
ROOT::Experimental::REveSelectorToEventList::Process
virtual Bool_t Process(Long64_t entry)
Process entry.
Definition: REveTreeTools.cxx:45
ROOT::Experimental::REvePointSelectorConsumer
Definition: REveTreeTools.hxx:53
ROOT::Experimental::REvePointSelector::GetSelection
const char * GetSelection() const
Definition: REveTreeTools.hxx:110
ROOT::Experimental::REvePointSelector::fInput
TList fInput
Definition: REveTreeTools.hxx:91
ROOT::Experimental::REvePointSelector::GetConsumer
REvePointSelectorConsumer * GetConsumer() const
Definition: REveTreeTools.hxx:104
ROOT::Experimental::REvePointSelector::SetVarexp
void SetVarexp(const char *v)
Definition: REveTreeTools.hxx:108
ROOT::Experimental::REvePointSelectorConsumer::REvePointSelectorConsumer
REvePointSelectorConsumer(ETreeVarType_e cs=kTVT_XYZ)
Definition: REveTreeTools.hxx:61
ROOT::Experimental::REvePointSelector::SetSelection
void SetSelection(const char *s)
Definition: REveTreeTools.hxx:111
ROOT::Experimental::REvePointSelectorConsumer::TakeAction
virtual void TakeAction(REvePointSelector *)=0
ROOT::Experimental::REvePointSelectorConsumer::kTVT_RPhiZ
@ kTVT_RPhiZ
Definition: REveTreeTools.hxx:55
ROOT::Experimental::REvePointSelector::SetConsumer
void SetConsumer(REvePointSelectorConsumer *c)
Definition: REveTreeTools.hxx:105
ROOT::Experimental::REvePointSelector::GetTree
TTree * GetTree() const
Definition: REveTreeTools.hxx:101
ROOT::Experimental::REvePointSelectorConsumer::InitFill
virtual void InitFill(Int_t)
Definition: REveTreeTools.hxx:64
ROOT::Experimental::REvePointSelectorConsumer::fSourceCS
ETreeVarType_e fSourceCS
Definition: REveTreeTools.hxx:58
TSelectorDraw.h
ROOT::Experimental::REveSelectorToEventList::operator=
REveSelectorToEventList & operator=(const REveSelectorToEventList &)=delete
ROOT::Experimental::REveSelectorToEventList::fInput
TList fInput
Definition: REveTreeTools.hxx:33
ROOT::Experimental::REvePointSelector::fVarexp
TString fVarexp
Definition: REveTreeTools.hxx:85
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
ROOT::Experimental::REvePointSelectorConsumer::GetSourceCS
ETreeVarType_e GetSourceCS() const
Definition: REveTreeTools.hxx:67
ROOT::Experimental::REvePointSelector::fTree
TTree * fTree
Definition: REveTreeTools.hxx:82
ROOT::Experimental::REvePointSelector::GetSubIdNum
Int_t GetSubIdNum() const
Definition: REveTreeTools.hxx:116
ROOT::Experimental::REvePointSelector
REvePointSelector TSelector for direct extraction of point-like data from a Tree.
Definition: REveTreeTools.hxx:77
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REvePointSelector::Select
virtual Long64_t Select(const char *selection=nullptr)
Process the tree, select points matching 'selection'.
Definition: REveTreeTools.cxx:85
ROOT::Experimental::REvePointSelectorConsumer::SetSourceCS
void SetSourceCS(ETreeVarType_e cs)
Definition: REveTreeTools.hxx:68
TList
A doubly linked list.
Definition: TList.h:44
TSelectorDraw
A specialized TSelector for TTree::Draw.
Definition: TSelectorDraw.h:33
ROOT::Experimental::REvePointSelector::SetTree
void SetTree(TTree *t)
Definition: REveTreeTools.hxx:102
ROOT::Experimental::REveSelectorToEventList
REveSelectorToEventList TSelector that stores entry numbers of matching TTree entries into an event-l...
Definition: REveTreeTools.hxx:27
int
TEventList.h