File indexing completed on 2025-01-18 10:11:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TFriendElement
0012 #define ROOT_TFriendElement
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "TNamed.h"
0028
0029 class TFile;
0030 class TTree;
0031 class TClass;
0032
0033 class TFriendElement : public TNamed {
0034
0035 protected:
0036 TTree *fParentTree;
0037 TTree *fTree;
0038 TFile *fFile;
0039 TString fTreeName;
0040 bool fOwnFile;
0041
0042 TFriendElement(const TFriendElement&) = delete;
0043 TFriendElement& operator=(const TFriendElement&) = delete;
0044
0045 friend void TFriendElement__SetTree(TTree *tree, TList *frlist);
0046
0047 public:
0048 enum EStatusBits {
0049 kFromChain = BIT(9),
0050 kUpdated = BIT(10)
0051 };
0052 TFriendElement();
0053 TFriendElement(TTree *tree, const char *treename, const char *filename);
0054 TFriendElement(TTree *tree, const char *treename, TFile *file);
0055 TFriendElement(TTree *tree, TTree* friendtree, const char *alias);
0056 ~TFriendElement() override;
0057 virtual TTree *Connect();
0058 virtual TTree *DisConnect();
0059 virtual TFile *GetFile();
0060 virtual TTree *GetParentTree() const {return fParentTree;}
0061 virtual TTree *GetTree();
0062
0063
0064 virtual const char *GetTreeName() const {return fTreeName.Data();}
0065 void ls(Option_t *option="") const override;
0066 void Reset() { fTree = nullptr; fFile = nullptr; }
0067 bool IsUpdated() const { return TestBit(kUpdated); }
0068 void ResetUpdated() { ResetBit(kUpdated); }
0069 void MarkUpdated() { SetBit(kUpdated); }
0070 void RecursiveRemove(TObject *obj) override;
0071
0072
0073 ClassDefOverride(TFriendElement,2)
0074 };
0075
0076 #endif
0077