File indexing completed on 2025-01-18 10:12:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TTreeFormulaManager
0013 #define ROOT_TTreeFormulaManager
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TObjArray.h"
0025 #include "TTreeFormula.h"
0026
0027 class TArrayI;
0028
0029
0030 class TTreeFormulaManager : public TObject {
0031 private:
0032 TObjArray fFormulas;
0033 Int_t fMultiplicity;
0034 bool fMultiVarDim;
0035 Int_t fNdata;
0036
0037
0038 Int_t fCumulUsedSizes[kMAXFORMDIM+1];
0039 TArrayI *fCumulUsedVarDims;
0040
0041 Int_t fUsedSizes[kMAXFORMDIM+1];
0042 TArrayI *fVarDims[kMAXFORMDIM+1];
0043 Int_t fVirtUsedSizes[kMAXFORMDIM+1];
0044
0045 bool fNeedSync;
0046
0047 friend class TTreeFormula;
0048
0049 private:
0050
0051 TTreeFormulaManager(const TTreeFormulaManager&) = delete;
0052 TTreeFormulaManager& operator=(const TTreeFormulaManager&) = delete;
0053
0054 protected:
0055
0056 virtual void AddVarDims(Int_t virt_dim);
0057 virtual void CancelDimension(Int_t virt_dim);
0058 virtual void EnableMultiVarDims();
0059 virtual void UpdateUsedSize(Int_t &virt_dim, Int_t vsize);
0060
0061 public:
0062 TTreeFormulaManager();
0063 ~TTreeFormulaManager() override;
0064
0065 virtual void Add(TTreeFormula*);
0066 virtual Int_t GetMultiplicity() const {return fMultiplicity;}
0067 virtual Int_t GetNdata(bool forceLoadDim = false);
0068 bool Notify() override { UpdateFormulaLeaves(); return true; }
0069 virtual void Remove(TTreeFormula*);
0070 virtual bool Sync();
0071 virtual void UpdateFormulaLeaves();
0072
0073 ClassDefOverride(TTreeFormulaManager,0)
0074 };
0075
0076
0077 #endif
0078