38#define __attribute__(unused)
82#define BIT(n) (1ULL << (n))
83#define SETBIT(n,i) ((n) |= BIT(i))
84#define CLRBIT(n,i) ((n) &= ~BIT(i))
85#define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
108 class TGenericClassInfo;
109 typedef void *(*NewFunc_t)(
void *);
110 typedef void *(*NewArrFunc_t)(
Long_t size,
void *arena);
122 const char *dfil,
const char *ifil,
124 extern void AddClass(
const char *cname,
Version_t id,
const std::type_info &info,
141 return CreateInitInstance(t);
155 const std::type_info &info,
160 const char *dfil,
const char *ifil,
167 const std::type_info &info,
178 const char *dfil,
const char *ifil,
198namespace ROOT {
namespace Internal {
205 static void SetName(
const std::string&
name, std::string& nameMember);
215 static void *
New(
void *p) {
return p ?
new(p)
T :
new T; };
217 return p ?
new(p)
T[nElements] :
new T[nElements]; }
218 static void Delete(
void *p) {
delete ((
T*)p); }
222 static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy<T>(0);
223 static ::ROOT::TGenericClassInfo
224 R__instance(T::Class_Name(), T::Class_Version(),
225 T::DeclFileName(), T::DeclFileLine(),
227 &T::Dictionary, isa_proxy, 0,
sizeof(
T) );
238 static std::string
gName;
241 return gName.c_str();
252 template <
typename T>
257 template <
typename T>
269#define _ClassDefBase_(name, id, virtual_keyword, overrd) \
271 virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd \
273 static std::atomic<UChar_t> recurseBlocker(0); \
274 if (R__likely(recurseBlocker >= 2)) { \
275 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
276 } else if (recurseBlocker == 1) { \
278 } else if (recurseBlocker++ == 0) { \
279 ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency = \
280 ::ROOT::Internal::HasConsistentHashMember(_QUOTE_(name)) || \
281 ::ROOT::Internal::HasConsistentHashMember(*IsA()); \
283 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
289 static Version_t Class_Version() { return id; } \
290 virtual_keyword TClass *IsA() const overrd { return name::Class(); } \
291 virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
293 ::ROOT::Class_ShowMembers(name::Class(), this, insp); \
295 void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
296 static const char *DeclFileName() { return __FILE__; }
298#define _ClassDefOutline_(name,id, virtual_keyword, overrd) \
299 _ClassDefBase_(name,id, virtual_keyword, overrd) \
301 static atomic_TClass_ptr fgIsA; \
303 static int ImplFileLine(); \
304 static const char *ImplFileName(); \
305 static const char *Class_Name(); \
306 static TClass *Dictionary(); \
307 static TClass *Class(); \
308 virtual_keyword void Streamer(TBuffer&) overrd;
310#define _ClassDefInline_(name, id, virtual_keyword, overrd) \
311 _ClassDefBase_(name, id, virtual_keyword, overrd) public : static int ImplFileLine() { return -1; } \
312 static const char *ImplFileName() { return 0; } \
313 static const char *Class_Name() \
315 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Name(); \
317 static TClass *Dictionary() \
319 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Dictionary(); \
321 static TClass *Class() { return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Class(); } \
322 virtual_keyword void Streamer(TBuffer &R__b) overrd { ::ROOT::Internal::DefaultStreamer(R__b, name::Class(), this); }
324#define ClassDef(name,id) \
325 _ClassDefOutline_(name,id,virtual,) \
326 static int DeclFileLine() { return __LINE__; }
328#define ClassDefOverride(name,id) \
329 _ClassDefOutline_(name,id,,override) \
330 static int DeclFileLine() { return __LINE__; }
332#define ClassDefNV(name,id) \
333 _ClassDefOutline_(name,id,,) \
334 static int DeclFileLine() { return __LINE__; }
336#define ClassDefInline(name,id) \
337 _ClassDefInline_(name,id,virtual,) \
338 static int DeclFileLine() { return __LINE__; }
340#define ClassDefInlineOverride(name,id) \
341 _ClassDefInline_(name,id,,override) \
342 static int DeclFileLine() { return __LINE__; }
344#define ClassDefInlineNV(name,id) \
345 _ClassDefInline_(name,id,,) \
346 static int DeclFileLine() { return __LINE__; }
350#define R__UseDummy(name) \
351 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
354#define ClassImpUnique(name,key) \
356 TGenericClassInfo *GenerateInitInstance(const name*); \
358 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) __attribute__((unused)) = \
359 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
360 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
363#define ClassImp(name) ClassImpUnique(name,default)
367#define NamespaceImpUnique(name,key) \
370 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
372 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
373 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
374 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
378#define NamespaceImp(name) NamespaceImpUnique(name,default)
390#define ClassDefT(name,id) \
391 _ClassDefOutline_(name,id,virtual,) \
392 static int DeclFileLine() { return __LINE__; }
394#define ClassDefTNV(name,id) \
395 _ClassDefOutline_(name,id,virtual,) \
396 static int DeclFileLine() { return __LINE__; }
399#define ClassDefT2(name,Tmpl)
401#define templateClassImpUnique(name, key) \
404 _R__UNIQUE_(_NAME2_(R__dummyholder, key)) = ::ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
405 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder, key))); \
407#define templateClassImp(name) templateClassImpUnique(name,default)
409#define ClassImpT(name,Tmpl) templateClassImp(name)
416#define ClassDef2T2(name,Tmpl1,Tmpl2)
417#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
425#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
426#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
431#define RootClassVersion(name,VersionNumber) \
433 TGenericClassInfo *GenerateInitInstance(const name*); \
434 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
435 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
436 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
439#define RootStreamer(name,STREAMER) \
441 TGenericClassInfo *GenerateInitInstance(const name*); \
442 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
443 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
444 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
454# define _R_PragmaStr(x) _Pragma(#x)
455# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
456# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
457# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
458#elif defined(R__WIN32)
459# define _R_PragmaStr(x) __pragma(#x)
460# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
461# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
462# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
471# define R__LOAD_LIBRARY(LIBRARY)
472# define R__ADD_INCLUDE_PATH(PATH)
473# define R__ADD_LIBRARY_PATH(PATH)
478# define R__CLING_PTRCHECK(ONOFF) __attribute__((annotate("__cling__ptrcheck(" #ONOFF ")")))
480# define R__CLING_PTRCHECK(ONOFF)
484inline char *
R__STRTOK_R(
char *str,
const char *delim,
char **saveptr)
487 return strtok_s(str, delim, saveptr);
489 return strtok_r(str, delim, saveptr);
TClass *(* DictFuncPtr_t)()
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
char * R__STRTOK_R(char *str, const char *delim, char **saveptr)
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
void(* ShowMembersFunc_t)(const void *obj, TMemberInspector &R__insp, Bool_t isTransient)
TBuffer & operator>>(TBuffer &buf, Tmpl *&obj)
std::atomic< TClass * > atomic_TClass_ptr
void(* ClassStreamerFunc_t)(TBuffer &, void *)
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
typedef void((*Func_t)())
static void * New(void *p)
static void * NewArray(Long_t nElements, void *p)
static atomic_TClass_ptr fgIsA
static void DeleteArray(void *p)
static void Destruct(void *p)
::ROOT::TGenericClassInfo * fgGenericInfo
::ROOT::TGenericClassInfo * GenerateInitInstanceLocal()
static void Delete(void *p)
static TClass * Dictionary()
static const char * Name()
static void SetInstance(::ROOT::TGenericClassInfo &R__instance, NewFunc_t, NewArrFunc_t, DelFunc_t, DelArrFunc_t, DesFunc_t)
static void SetName(const std::string &name, std::string &nameMember)
static void SetfgIsA(atomic_TClass_ptr &isA, TClass *(*dictfun)())
virtual TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il) const
virtual void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const
virtual void Unregister(const char *classname) const
virtual TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il) const =0
virtual void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const =0
virtual void Unregister(const char *classname) const =0
Buffer base class used for serializing objects.
The ROOT global object gROOT contains a list of all defined classes.
Collection abstract base class.
Describe directory structure in memory.
Abstract base class for accessing the data-members of a class.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
R__EXTERN PyObject * gName
void DefaultStreamer(TBuffer &R__b, const TClass *cl, void *objpointer)
Default streamer implementation used by ClassDefInline to avoid requirement to include TBuffer....
const TInitBehavior * DefineBehavior(void *, void *)
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
Bool_t HasConsistentHashMember(TClass &clRef)
Return true is the Hash/RecursiveRemove setup is consistent, i.e.
Namespace for new ROOT classes and functions.
void(* DirAutoAdd_t)(void *, TDirectory *)
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il)
Global function called by a class' static Dictionary() method (see the ClassDef macro).
void(* DelFunc_t)(void *)
void AddClassAlternate(const char *normName, const char *alternate)
Global function called by GenerateInitInstance.
void RemoveClass(const char *cname)
Global function called by the dtor of a class's init class (see the ClassImp macro).
void AddClass(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits)
Global function called by the ctor of a class's init class (see the ClassImp macro).
TNamed * RegisterClassTemplate(const char *name, const char *file, Int_t line)
Global function to register the implementation file and line of a class template (i....
void *(* NewArrFunc_t)(Long_t size, void *arena)
void Class_ShowMembers(TClass *cl, const void *obj, TMemberInspector &)
Indirect call to the implementation of ShowMember allowing [forward] declaration with out a full defi...
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
Short_t SetClassVersion(RootClass *)
void(* DelArrFunc_t)(void *)
void *(* NewFunc_t)(void *)
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
static Bool_t fgHashConsistency