26#ifndef R__LESS_INCLUDES
41#define __attribute__(unused)
90#define BIT(n) (1ULL << (n))
91#define SETBIT(n,i) ((n) |= BIT(i))
92#define CLRBIT(n,i) ((n) &= ~BIT(i))
93#define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
112 class TGenericClassInfo;
114 typedef void *(*NewFunc_t)(
void *);
127 const char *dfil,
const char *ifil,
145 template <
class T> TGenericClassInfo *GetClassInfo(
const T* t) {
146 TGenericClassInfo *GenerateInitInstance(
const T*);
147 return CreateInitInstance(t);
161 const std::type_info &info,
166 const char *dfil,
const char *ifil,
173 const std::type_info &info,
184 const char *dfil,
const char *ifil,
205namespace ROOT {
namespace Internal {
210 static void SetInstance(::ROOT::TGenericClassInfo& R__instance,
212 static void SetName(
const std::string&
name, std::string& nameMember);
222 static void *
New(
void *
p) {
return p ?
new(
p) T :
new T; };
224 return p ?
new(
p) T[nElements] :
new T[nElements]; }
229 static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy<T>(
nullptr);
230 static ::ROOT::TGenericClassInfo
231 R__instance(T::Class_Name(), T::Class_Version(),
232 T::DeclFileName(), T::DeclFileLine(),
234 &T::Dictionary, isa_proxy, 0,
sizeof(T) );
245 static std::string gName;
248 return gName.c_str();
259 template <
typename T>
264 template <
typename T>
276#define _ClassDefBase_(name, id, virtual_keyword, overrd) \
278 static_assert(std::is_integral<decltype(id)>::value, \
279 "ClassDef(Inline) macro: the specified class version number is not an integer."); \
280 virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd \
282 static std::atomic<UChar_t> recurseBlocker(0); \
283 if (R__likely(recurseBlocker >= 2)) { \
284 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
285 } else if (recurseBlocker == 1) { \
287 } else if (recurseBlocker++ == 0) { \
288 ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency = \
289 ::ROOT::Internal::HasConsistentHashMember(_QUOTE_(name)) || \
290 ::ROOT::Internal::HasConsistentHashMember(*IsA()); \
292 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
298 static constexpr Version_t Class_Version() { return id; } \
299 virtual_keyword TClass *IsA() const overrd \
300 { return name::Class(); } \
301 virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
303 ::ROOT::Class_ShowMembers(name::Class(), this, insp); \
305 void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
306 static const char *DeclFileName() { return __FILE__; }
308#define _ClassDefOutline_(name,id, virtual_keyword, overrd) \
309 _ClassDefBase_(name,id, virtual_keyword, overrd) \
312 static atomic_TClass_ptr fgIsA; \
314 static int ImplFileLine(); \
315 static const char *ImplFileName(); \
316 static const char *Class_Name(); \
317 static TClass *Dictionary(); \
318 static TClass *Class(); \
319 virtual_keyword void Streamer(TBuffer&) overrd;
321#define _ClassDefInline_(name, id, virtual_keyword, overrd) \
322 _ClassDefBase_(name, id, virtual_keyword, overrd) public : \
323 static int ImplFileLine() { return -1; } \
324 static const char *ImplFileName() { return nullptr; } \
325 static const char *Class_Name() \
327 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Name(); \
329 static TClass *Dictionary() \
331 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Dictionary(); \
333 static TClass *Class() \
335 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Class(); \
337 virtual_keyword void Streamer(TBuffer &R__b) overrd \
339 ::ROOT::Internal::DefaultStreamer(R__b, name::Class(), this); \
342#define ClassDef(name,id) \
343 _ClassDefOutline_(name,id,virtual,) \
344 static int DeclFileLine() { return __LINE__; }
346#define ClassDefOverride(name,id) \
347 _ClassDefOutline_(name,id,,override) \
348 static int DeclFileLine() { return __LINE__; }
350#define ClassDefNV(name,id) \
351 _ClassDefOutline_(name,id,,) \
352 static int DeclFileLine() { return __LINE__; }
354#define ClassDefInline(name,id) \
355 _ClassDefInline_(name,id,virtual,) \
356 static int DeclFileLine() { return __LINE__; }
358#define ClassDefInlineOverride(name,id) \
359 _ClassDefInline_(name,id,,override) \
360 static int DeclFileLine() { return __LINE__; }
362#define ClassDefInlineNV(name,id) \
363 _ClassDefInline_(name,id,,) \
364 static int DeclFileLine() { return __LINE__; }
368#define R__UseDummy(name) \
369 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
371#define ClassImpUnique(name,key) \
373 TGenericClassInfo *GenerateInitInstance(const name*); \
375 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) __attribute__((unused)) = \
376 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
377 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
382#define ClassImp(name) ClassImpUnique(name,default)
385#define NamespaceImpUnique(name,key) \
387 namespace ROOTDict { \
389 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
391 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
392 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
393 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
398#define NamespaceImp(name) NamespaceImpUnique(name,default)
409#define ClassDefT(name,id) \
410 _ClassDefOutline_(name,id,virtual,) \
411 static int DeclFileLine() { return __LINE__; }
413#define ClassDefTNV(name,id) \
414 _ClassDefOutline_(name,id,virtual,) \
415 static int DeclFileLine() { return __LINE__; }
418#define ClassDefT2(name,Tmpl)
420#define templateClassImpUnique(name, key) \
423 _R__UNIQUE_(_NAME2_(R__dummyholder, key)) = ::ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
425 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder, key))); \
427#define templateClassImp(name) templateClassImpUnique(name,default)
429#define ClassImpT(name,Tmpl) templateClassImp(name)
436#define ClassDef2T2(name,Tmpl1,Tmpl2)
437#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
445#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
446#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
451#define RootClassVersion(name,VersionNumber) \
453 TGenericClassInfo *GenerateInitInstance(const name*); \
455 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
456 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
458 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
461#define RootStreamer(name,STREAMER) \
464 TGenericClassInfo *GenerateInitInstance(const name*); \
466 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
467 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
469 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
479# define _R_PragmaStr(x) _Pragma(#x)
480# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
481# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
482# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
483#elif defined(R__WIN32)
484# define _R_PragmaStr(x) __pragma(#x)
485# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
486# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
487# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
496# define R__LOAD_LIBRARY(LIBRARY)
497# define R__ADD_INCLUDE_PATH(PATH)
498# define R__ADD_LIBRARY_PATH(PATH)
503# define R__CLING_PTRCHECK(ONOFF) __attribute__((annotate("__cling__ptrcheck(" #ONOFF ")")))
505# define R__CLING_PTRCHECK(ONOFF)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TClass *(* DictFuncPtr_t)()
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
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 *)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
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)())
void Unregister(const char *classname, TClass *cl) const override
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 override
void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const override
virtual void Unregister(const char *classname, TClass *cl) const =0
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
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
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.
Defines a common interface to inspect/change the contents of an object that represents a collection.
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 *)
Bool_t HasConsistentHashMember(TClass &clRef)
Return true is the Hash/RecursiveRemove setup is consistent, i.e.
std::string GetDemangledTypeName(const std::type_info &t)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void(* DirAutoAdd_t)(void *, TDirectory *)
ROOT::TClassAlt * AddClassAlternate(const char *normName, const char *alternate)
Global function called by GenerateInitInstance.
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
void RemoveClass(const char *cname, TClass *cl)
Global function called by the dtor of a class's init class (see the ClassImp macro).
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 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 *)
void RemoveClassAlternate(ROOT::TClassAlt *)
static Bool_t fgHashConsistency