File indexing completed on 2025-01-18 10:11:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TBaseClass
0013 #define ROOT_TBaseClass
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TDictionary.h"
0026 #include "TClassRef.h"
0027
0028 #include <atomic>
0029
0030 class TBrowser;
0031 class TClass;
0032
0033 class TBaseClass : public TDictionary {
0034 #ifndef __CLING__
0035 using AtomicInt_t = std::atomic<Int_t>;
0036 static_assert(sizeof(std::atomic<Int_t>) == sizeof(Int_t),
0037 "We requiqre atomic<int> and <int> to have the same size but they are not");
0038 #else
0039
0040
0041 using AtomicInt_t = Int_t;
0042 #endif
0043
0044 private:
0045 TBaseClass(const TBaseClass &) = delete;
0046 TBaseClass&operator=(const TBaseClass &) = delete;
0047
0048 private:
0049 BaseClassInfo_t *fInfo;
0050 TClassRef fClassPtr;
0051 TClass *fClass;
0052 AtomicInt_t fDelta;
0053 mutable AtomicInt_t fProperty;
0054 Int_t fSTLType;
0055
0056 public:
0057 TBaseClass(BaseClassInfo_t *info = nullptr, TClass *cl = nullptr);
0058 virtual ~TBaseClass();
0059
0060 void Browse(TBrowser *b) override;
0061 const char *GetTitle() const override;
0062 TClass *GetClassPointer(Bool_t load=kTRUE);
0063 Int_t GetDelta();
0064 Bool_t IsFolder() const override {return kTRUE;}
0065 ROOT::ESTLType IsSTLContainer();
0066 Long_t Property() const override;
0067 void SetClass(TClass* cl) { fClass = cl; }
0068
0069 ClassDefOverride(TBaseClass,2)
0070 };
0071
0072 #endif