Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18namespace ROOT {
19namespace Experimental {
20
21/////////////////////////////////////////////////////////////////////////////////
22/// REveSelectorToEventList
23/// TSelector that stores entry numbers of matching TTree entries into an event-list.
24/////////////////////////////////////////////////////////////////////////////////
25
27{
30
31protected:
34
35public:
36 REveSelectorToEventList(TEventList *evl, const char *sel);
38
39 Int_t Version() const override { return 1; }
40 Bool_t Process(Long64_t entry) override;
41
42 ClassDefOverride(REveSelectorToEventList, 2); // 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
51
53{
54public:
56
57protected:
58 ETreeVarType_e fSourceCS; // Coordinate-System of the source tree variables
59
60public:
63
64 virtual void InitFill(Int_t /*subIdNum*/) {}
65 virtual void TakeAction(REvePointSelector *) = 0;
66
69};
70
71/////////////////////////////////////////////////////////////////////////////////
72/// REvePointSelector
73/// TSelector for direct extraction of point-like data from a Tree.
74/////////////////////////////////////////////////////////////////////////////////
75
77{
80
81protected:
82 TTree *fSelectTree{nullptr};
84
87
90
92
93public:
94 REvePointSelector(TTree *t = nullptr, REvePointSelectorConsumer *c = nullptr, const char *vexp = "", const char *sel = "");
95 ~REvePointSelector() override {}
96
97 virtual Long64_t Select(const char *selection = nullptr);
98 virtual Long64_t Select(TTree *t, const char *selection = nullptr);
99 void TakeAction() override;
100
101 TTree *GetTree() const { return fSelectTree; }
102 void SetTree(TTree *t) { fSelectTree = 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 ClassDefOverride(REvePointSelector, 2); // TSelector for direct extraction of point-like data from a Tree.
119};
120
121} // namespace Experimental
122} // namespace ROOT
123
124#endif
#define c(i)
Definition RSha256.hxx:101
bool Bool_t
Definition RtypesCore.h:63
long long Long64_t
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
virtual void TakeAction(REvePointSelector *)=0
REvePointSelectorConsumer(ETreeVarType_e cs=kTVT_XYZ)
REvePointSelector TSelector for direct extraction of point-like data from a Tree.
REvePointSelectorConsumer * GetConsumer() const
REvePointSelector(const REvePointSelector &)=delete
REvePointSelectorConsumer * fConsumer
void SetConsumer(REvePointSelectorConsumer *c)
virtual Long64_t Select(const char *selection=nullptr)
Process the tree, select points matching 'selection'.
REvePointSelector & operator=(const REvePointSelector &)=delete
void TakeAction() override
Callback from tree-player after a chunk of data has been processed.
REveSelectorToEventList TSelector that stores entry numbers of matching TTree entries into an event-l...
REveSelectorToEventList(const REveSelectorToEventList &)=delete
REveSelectorToEventList & operator=(const REveSelectorToEventList &)=delete
Bool_t Process(Long64_t entry) override
Process entry.
A TEventList object is a list of selected events (entries) in a TTree.
Definition TEventList.h:31
A doubly linked list.
Definition TList.h:38
A specialized TSelector for TTree::Draw.
Basic string class.
Definition TString.h:139
A TTree represents a columnar dataset.
Definition TTree.h:79
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.