36 if (!
name || status != 0)
96 fImplFileName(nullptr),
101 fResetAfterMerge(nullptr),
105 fDeleteArray(nullptr),
106 fDestructor(nullptr),
107 fDirAutoAdd(nullptr),
109 fStreamerFunc(nullptr),
110 fConvStreamerFunc(nullptr),
111 fCollectionProxy(nullptr),
134 fImplFileName(nullptr),
139 fResetAfterMerge(nullptr),
143 fDeleteArray(nullptr),
144 fDestructor(nullptr),
145 fDirAutoAdd(nullptr),
147 fStreamerFunc(nullptr),
148 fConvStreamerFunc(nullptr),
149 fCollectionProxy(nullptr),
162 class TForNamespace {};
173 fInfo(
typeid(TForNamespace)),
174 fImplFileName(nullptr),
179 fResetAfterMerge(nullptr),
183 fDeleteArray(nullptr),
184 fDestructor(nullptr),
185 fDirAutoAdd(nullptr),
187 fStreamerFunc(nullptr),
188 fConvStreamerFunc(nullptr),
189 fCollectionProxy(nullptr),
256 if (!fAction)
return;
257 GetAction().Register(fClassName,
264 TGenericClassInfo::~TGenericClassInfo()
280 GetAction().Unregister(GetClassName(),
fClass);
283 const Internal::TInitBehavior &TGenericClassInfo::GetAction()
const
290 TClass *TGenericClassInfo::GetClass()
301 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
305 ::Warning(
"TClass::TClass",
"ROOT system is being torn down");
307 return new TClass(GetClassName(),
true);
316 fClass = GetAction().CreateClass(GetClassName(),
325 fClass->fHasCustomStreamerMember =
true;
328 fClass->SetNewArray(fNewArray);
329 fClass->SetDelete(fDelete);
330 fClass->SetDeleteArray(fDeleteArray);
331 fClass->SetDestructor(fDestructor);
332 fClass->SetDirectoryAutoAdd(fDirAutoAdd);
333 fClass->SetStreamerFunc(fStreamerFunc);
334 fClass->SetConvStreamerFunc(fConvStreamerFunc);
336 fClass->SetResetAfterMerge(fResetAfterMerge);
337 fClass->AdoptStreamer(fStreamer);
344 if (!
fClass->IsZombie()) {
345 if (fCollectionProxy)
fClass->CopyCollectionProxy(*fCollectionProxy);
350 fClass->SetClassSize(fSizeof);
351 fClass->SetClassAlignment(fAlignment);
361 fClass->CreateAttributeMap();
366 fClass->GetAttributeMap()->AddProperty(
"rntuple.streamerMode",
"false");
368 fClass->GetAttributeMap()->AddProperty(
"rntuple.streamerMode",
"true");
372 if (!fRNTupleSoARecord.empty()) {
373 fClass->CreateAttributeMap();
374 fClass->GetAttributeMap()->AddProperty(
"rntuple.SoARecord", fRNTupleSoARecord.c_str());
383 void TGenericClassInfo::CreateRuleSet( std::vector<Internal::TSchemaHelper>&
vect,
386 if (
vect.empty() ) {
402 std::vector<Internal::TSchemaHelper>::iterator it;
408 ::Warning(
"TGenericClassInfo",
"The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.",
409 GetClassName(), it->fVersion.c_str(), it->fTarget.c_str(),
errmsg.Data() );
415 const char *TGenericClassInfo::GetClassName()
const
423 Detail::TCollectionProxyInfo *TGenericClassInfo::GetCollectionProxyInfo()
const
430 Detail::TCollectionProxyInfo *TGenericClassInfo::GetCollectionStreamerInfo()
const
437 const std::type_info &TGenericClassInfo::GetInfo()
const
444 const std::vector<Internal::TSchemaHelper>& TGenericClassInfo::GetReadRawRules()
const
452 const std::vector<Internal::TSchemaHelper>& TGenericClassInfo::GetReadRules()
const
458 void TGenericClassInfo::SetFromTemplate()
466 Int_t TGenericClassInfo::SetImplFile(
const char *file,
Int_t line)
470 fImplFileName = file;
471 fImplFileLine =
line;
476 Int_t TGenericClassInfo::SetDeclFile(
const char *file,
Int_t line)
480 fDeclFileName = file;
481 fDeclFileLine =
line;
495 void TGenericClassInfo::SetRNTupleSoARecord(
const std::string &
recordName)
522 void TGenericClassInfo::AdoptCollectionProxyInfo(TCollectionProxyInfo *
info)
531 void TGenericClassInfo::AdoptCollectionStreamerInfo(TCollectionProxyInfo *
info)
545 delete fStreamer; fStreamer =
nullptr;
559 delete fCollectionProxy; fCollectionProxy =
nullptr;
561 if (
fClass && fCollectionProxy && !
fClass->IsZombie()) {
562 fClass->CopyCollectionProxy(*fCollectionProxy);
567 void TGenericClassInfo::SetReadRawRules(
const std::vector<Internal::TSchemaHelper>&
rules )
574 void TGenericClassInfo::SetReadRules(
const std::vector<Internal::TSchemaHelper>&
rules )
584 delete fStreamer; fStreamer =
nullptr;
609 const char *TGenericClassInfo::GetDeclFileName()
const
613 return fDeclFileName;
616 Int_t TGenericClassInfo::GetDeclFileLine()
const
620 return fDeclFileLine;
623 const char *TGenericClassInfo::GetImplFileName()
628 return fImplFileName;
631 Int_t TGenericClassInfo::GetImplFileLine()
636 return fImplFileLine;
639 Int_t TGenericClassInfo::GetVersion()
const
646 TClass *TGenericClassInfo::IsA(
const void *obj)
700 void TGenericClassInfo::SetDirectoryAutoAdd(
DirAutoAdd_t func)
720 fResetAfterMerge = func;
721 if (
fClass)
fClass->SetResetAfterMerge(fResetAfterMerge);
724 NewFunc_t TGenericClassInfo::GetNew()
const
738 DelFunc_t TGenericClassInfo::GetDelete()
const
752 DesFunc_t TGenericClassInfo::GetDestructor()
const
759 DirAutoAdd_t TGenericClassInfo::GetDirectoryAutoAdd()
const
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Short_t
Signed Short integer 2 bytes (short)
TClass *(* DictFuncPtr_t)()
std::atomic< TClass * > atomic_TClass_ptr
void(* ClassStreamerFunc_t)(TBuffer &, void *)
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
R__EXTERN TVirtualMutex * gInterpreterMutex
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
R__EXTERN TVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
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)())
const_iterator begin() const
const_iterator end() const
@ kHasCustomStreamerMember
TClass instances represent classes, structs and namespaces in the ROOT type system.
The TNamed class is the base class for all named ROOT classes.
TCollection * GetListOfClasses() const
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
Defines a common interface to inspect/change the contents of an object that represents a collection.
static constexpr Version_t Class_Version()
R__EXTERN TROOT * gROOTLocal
const TInitBehavior * DefineBehavior(void *, void *)
std::string GetDemangledTypeName(const std::type_info &t)
void(* DirAutoAdd_t)(void *, TDirectory *)
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
void(* DelFunc_t)(void *)
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 ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
void(* DelArrFunc_t)(void *)
void *(* NewFunc_t)(void *)
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
void RemoveClassAlternate(ROOT::TClassAlt *)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
char * DemangleName(const char *mangled_name, int &errorCode)
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.