File indexing completed on 2025-01-18 10:12:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TTreeIndex
0013 #define ROOT_TTreeIndex
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TVirtualIndex.h"
0026
0027 class TTreeFormula;
0028
0029 class TTreeIndex : public TVirtualIndex {
0030 protected:
0031 TString fMajorName;
0032 TString fMinorName;
0033 Long64_t fN;
0034 Long64_t *fIndexValues;
0035 Long64_t *fIndexValuesMinor;
0036 Long64_t *fIndex;
0037 TTreeFormula *fMajorFormula;
0038 TTreeFormula *fMinorFormula;
0039 TTreeFormula *fMajorFormulaParent;
0040 TTreeFormula *fMinorFormulaParent;
0041
0042 TTreeFormula *GetMajorFormulaParent(const TTree *parent);
0043 TTreeFormula *GetMinorFormulaParent(const TTree *parent);
0044
0045 private:
0046 TTreeIndex(const TTreeIndex&) = delete;
0047 TTreeIndex &operator=(const TTreeIndex&) = delete;
0048
0049 public:
0050 TTreeIndex();
0051 TTreeIndex(const TTree *T, const char *majorname, const char *minorname);
0052 ~TTreeIndex() override;
0053 void Append(const TVirtualIndex *,bool delaySort = false) override;
0054 bool ConvertOldToNew();
0055 Long64_t FindValues(Long64_t major, Long64_t minor) const;
0056 Long64_t GetEntryNumberFriend(const TTree *parent) override;
0057 Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor) const override;
0058 Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor) const override;
0059 virtual Long64_t *GetIndex() const {return fIndex;}
0060 virtual Long64_t *GetIndexValues() const {return fIndexValues;}
0061 virtual Long64_t *GetIndexValuesMinor() const;
0062 const char *GetMajorName() const override {return fMajorName.Data();}
0063 const char *GetMinorName() const override {return fMinorName.Data();}
0064 Long64_t GetN() const override {return fN;}
0065 virtual TTreeFormula *GetMajorFormula();
0066 virtual TTreeFormula *GetMinorFormula();
0067 bool IsValidFor(const TTree *parent) override;
0068 void Print(Option_t *option="") const override;
0069 void UpdateFormulaLeaves(const TTree *parent) override;
0070 void SetTree(TTree *T) override;
0071 TObject *Clone(const char *newname = "") const override;
0072
0073 ClassDefOverride(TTreeIndex,2);
0074 };
0075
0076 #endif
0077