File indexing completed on 2025-01-18 10:12:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TObjectSpy
0013 #define ROOT_TObjectSpy
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "TObject.h"
0028
0029
0030 class TObjectSpy : public TObject {
0031
0032 private:
0033 TObjectSpy(const TObjectSpy& s) = delete;
0034 TObjectSpy& operator=(const TObjectSpy& s) = delete;
0035
0036 protected:
0037 TObject *fObj;
0038 Bool_t fResetMustCleanupBit;
0039
0040 public:
0041 TObjectSpy(TObject *obj = nullptr, Bool_t fixMustCleanupBit=kTRUE);
0042 virtual ~TObjectSpy();
0043
0044 void RecursiveRemove(TObject *obj) override;
0045 TObject *GetObject() const { return fObj; }
0046 void SetObject(TObject *obj, Bool_t fixMustCleanupBit = kTRUE);
0047
0048 ClassDefOverride(TObjectSpy, 0);
0049 };
0050
0051
0052 class TObjectRefSpy : public TObject {
0053
0054 private:
0055 TObjectRefSpy(const TObjectRefSpy& s) = delete;
0056 TObjectRefSpy& operator=(const TObjectRefSpy& s) = delete;
0057
0058 protected:
0059 TObject *&fObj;
0060 Bool_t fResetMustCleanupBit;
0061
0062 public:
0063 TObjectRefSpy(TObject *&obj, Bool_t fixMustCleanupBit=kTRUE);
0064 virtual ~TObjectRefSpy();
0065
0066 void RecursiveRemove(TObject *obj) override;
0067 TObject *GetObject() const { return fObj; }
0068
0069 ClassDefOverride(TObjectRefSpy, 0);
0070 };
0071
0072 #endif