Warning, file /include/root/TEveTreeTools.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveTreeTools
0013 #define ROOT_TEveTreeTools
0014
0015 #include "TSelectorDraw.h"
0016 #include "TEventList.h"
0017
0018
0019
0020
0021
0022 class TEveSelectorToEventList : public TSelectorDraw
0023 {
0024 TEveSelectorToEventList(const TEveSelectorToEventList&) = delete;
0025 TEveSelectorToEventList& operator=(const TEveSelectorToEventList&) = delete;
0026
0027 protected:
0028 TEventList* fEvList;
0029 TList fInputList;
0030 public:
0031 TEveSelectorToEventList(TEventList* evl, const char* sel);
0032
0033 Int_t Version() const override { return 1; }
0034 Bool_t Process(Long64_t entry) override;
0035
0036 ClassDefOverride(TEveSelectorToEventList, 2);
0037 };
0038
0039
0040
0041
0042
0043 class TEvePointSelector;
0044
0045 class TEvePointSelectorConsumer
0046 {
0047 public:
0048 enum ETreeVarType_e { kTVT_XYZ, kTVT_RPhiZ };
0049
0050 protected:
0051 ETreeVarType_e fSourceCS;
0052
0053 public:
0054 TEvePointSelectorConsumer(ETreeVarType_e cs=kTVT_XYZ) :fSourceCS(cs) {}
0055 virtual ~TEvePointSelectorConsumer() {}
0056
0057 virtual void InitFill(Int_t ) {}
0058 virtual void TakeAction(TEvePointSelector*) = 0;
0059
0060 ETreeVarType_e GetSourceCS() const { return fSourceCS; }
0061 void SetSourceCS(ETreeVarType_e cs) { fSourceCS = cs; }
0062
0063 ClassDef(TEvePointSelectorConsumer, 1);
0064 };
0065
0066 class TEvePointSelector : public TSelectorDraw
0067 {
0068 TEvePointSelector(const TEvePointSelector&) = delete;
0069 TEvePointSelector& operator=(const TEvePointSelector&) = delete;
0070
0071 protected:
0072 TTree *fSelectTree;
0073 TEvePointSelectorConsumer *fConsumer;
0074
0075 TString fVarexp;
0076 TString fSelection;
0077
0078 TString fSubIdExp;
0079 Int_t fSubIdNum;
0080
0081 TList fInputList;
0082
0083 public:
0084 TEvePointSelector(TTree* t=nullptr, TEvePointSelectorConsumer* c=nullptr,
0085 const char* vexp="", const char* sel="");
0086 ~TEvePointSelector() override {}
0087
0088 virtual Long64_t Select(const char* selection=nullptr);
0089 virtual Long64_t Select(TTree* t, const char* selection=nullptr);
0090 void TakeAction() override;
0091
0092
0093 TTree* GetTree() const { return fSelectTree; }
0094 void SetTree(TTree* t) { fSelectTree = t; }
0095
0096 TEvePointSelectorConsumer* GetConsumer() const { return fConsumer; }
0097 void SetConsumer(TEvePointSelectorConsumer* c) { fConsumer = c; }
0098
0099 const char* GetVarexp() const { return fVarexp; }
0100 void SetVarexp(const char* v) { fVarexp = v; }
0101
0102 const char* GetSelection() const { return fSelection; }
0103 void SetSelection(const char* s) { fSelection = s; }
0104
0105 const char* GetSubIdExp() const { return fSubIdExp; }
0106 void SetSubIdExp(const char* s) { fSubIdExp = s; }
0107
0108 Int_t GetSubIdNum() const { return fSubIdNum; }
0109
0110 ClassDefOverride(TEvePointSelector, 2);
0111 };
0112
0113 #endif