3 //__________________________________________________________________________
6 // Collection of classes for TTree interaction.
8 #include "TTreeTools.h"
10 #include <TTreeFormula.h>
12 /**************************************************************************/
13 /**************************************************************************/
15 ClassImp(TSelectorToEventList)
17 TSelectorToEventList::TSelectorToEventList(TEventList* evl, const Text_t* sel) :
18 TSelectorDraw(), fEvList(evl)
20 fInput.Add(new TNamed("varexp", ""));
21 fInput.Add(new TNamed("selection", sel));
22 SetInputList(&fInput);
25 Bool_t TSelectorToEventList::Process(Long64_t entry)
27 if(GetSelect()->EvalInstance(0) != 0)
28 fEvList->Enter(entry);
32 /**************************************************************************/
33 /**************************************************************************/
37 Int_t TTreeQuery::Select(TTree* t, const Text_t* selection)
39 TSelectorToEventList sel(this, selection);
40 t->Process(&sel, "goff");
44 /**************************************************************************/
45 // TPointSelectorConsumer, TPointSelector
46 /**************************************************************************/
48 ClassImp(TPointSelectorConsumer)
49 ClassImp(TPointSelector)
51 TPointSelector::TPointSelector(TTree* t,
52 TPointSelectorConsumer* c,
53 const Text_t* vexp, const Text_t* sel) :
61 SetInputList(&fInput);
64 Long64_t TPointSelector::Select(const Text_t* selection)
67 fSelection = selection;
70 fInput.Add(new TNamed("varexp", fVarexp.Data()));
71 fInput.Add(new TNamed("selection", fSelection.Data()));
74 fTree->Process(this, "goff");
78 Long64_t TPointSelector::Select(TTree* t, const Text_t* selection)
81 return Select(selection);
84 void TPointSelector::TakeAction()
86 fSelectedRows += fNfill;
87 // printf("TPointSelector::TakeAction nfill=%d, nall=%lld\n", fNfill, fSelectedRows);
89 fConsumer->TakeAction(this);