20 #include "TClassEdit.h" 36 TNamed(*cl), fBase(cl->GetListOfBases()),
37 fEnums(cl->GetListOfEnums()), fSizeof(cl->
Size()), fCheckSum(cl->fCheckSum),
38 fCanSplit(cl->fCanSplit), fStreamerType(cl->fStreamerType), fProperty(cl->fProperty),
39 fClassProperty(cl->fClassProperty)
55 if (dataMembers && dataMembers->
GetSize() > 0) {
57 for (
auto * obj : *dataMembers) {
78 if (!precRd) precRd = rd;
81 if (clRD != clCurrent) {
194 for (
auto dm:
fData) {
223 Info(
"FillTClass",
"Returning w/o doing anything. %s is a STL collection.",cl->
GetName());
228 Info(
"FillTClass",
"Returning w/o doing anything. %s is a namespace.",cl->
GetName());
231 Error(
"FillTClass",
"TClass %s already initialized!", cl->
GetName());
245 if (element.IsAClass() ) {
291 temp->Add((
TEnum*) enumAsTObj);
310 for (
auto base: *cl->
fBase) {
315 for (
auto dm: *cl->
fData) {
321 for (
auto en: *cl->
fEnums) {
322 ((
TEnum*)en)->SetClass(cl);
328 TClass* currentRDClass = cl;
335 if (element.IsAClass() ) {
350 "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.",
356 if (!currentRDClass)
continue;
360 if (
TRealData* rd = element.CreateRealData(currentRDClass, cl,prevRealData, prevLevel)) {
364 Info(
"FillTClass",
"Real data for class %s is not empty - make a new one",cl->
GetName() );
373 prevLevel = element.fLevel;
381 Info(
"FillTClas",
"Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->
GetName() );
411 fOffset(rd->GetThisOffset()),
423 fLevel = fullDataMemberName.CountChar(
'.');
453 "Cannot find data member # %d of class %s for parent %s!",
fDMIndex, dmClass->
GetName(),
462 if (dm) realMemberName = dm->
GetName();
464 realMemberName =
TString(
"*")+realMemberName;
469 for (
int idim = 0; idim < dm->
GetArrayDim(); ++idim)
471 }
else if (TClassEdit::IsStdArray(dm->
GetTypeName())) {
472 std::string typeNameBuf;
474 std::array<Int_t, 5> maxIndices;
475 TClassEdit::GetStdArrayProperties(dm->
GetTypeName(),
479 for (
Int_t idim = 0; idim < ndim; ++idim) {
485 if (prevData &&
fLevel > 0 ) {
486 if (
fLevel-prevLevel == 1)
488 else if (
fLevel <= prevLevel) {
490 std::string prevName = prevData->
GetName();
492 std::string parentName;
493 for (
int i = 0; i < prevLevel-
fLevel+1; ++i) {
494 parentName = prevName.substr(0, prevName.find_last_of(
".") );
495 prevName = parentName;
521 for (
auto * obj : *dmList) {
529 ::Error(
"TProtoClass::DataMemberIndex",
"data member %s is not found in class %s",name, cl->
GetName());
541 for (
auto * obj : *dmList) {
550 ::
Error(
"TProtoClass::FindDataMember",
"data member with index %d is not found in class %s",index,cl->
GetName());
virtual const char * GetName() const
Returns name of object.
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
The TEnum class implements the enum type.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t fIsLoaded
Holder of TEnum for unloaded Enums.
R__EXTERN Int_t gErrorIgnoreLevel
All ROOT classes may have RTTI (run time type identification) support added.
const char * GetClassName(Int_t index) const
std::atomic< TListOfEnums * > fEnums
Bool_t TestBit(UInt_t f) const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Int_t TestBits(UInt_t f) const
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Int_t fStreamerType
saved info to call Streamer
Bool_t TestFlag(UInt_t f) const
virtual void AddLast(TObject *obj)
Add object at the end of the list.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void Delete(Option_t *opt="")
Delete the containers that are usually owned by their TClass.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Bool_t FillTClass(TClass *pcl)
Move data from this TProtoClass into cl.
std::atomic< TList * > fBase
The TNamed class is the base class for all named ROOT classes.
std::vector< TDataMember * > fData
virtual ~TProtoRealData()
Destructor to pin vtable.
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
virtual ~TProtoClass()
Destructor.
TDataMember * GetDataMember() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
The TRealData class manages the effective list of all data members for a given class.
Int_t GetArrayDim() const
Return number of array dimensions.
The ROOT global object gROOT contains a list of all defined classes.
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Each class (see TClass) has a linked list of its base class(es).
void SetFlag(UInt_t f, Bool_t on=kTRUE)
Long_t fOffsetStreamer
Indicates whether GetClassVersion has been called.
TList * GetListOfRealData() const
void SetStreamerImpl()
Internal routine to set fStreamerImpl based on the value of fStreamerType.
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.
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' into this collection...
Long_t fClassProperty
Property.
Mother of all ROOT objects.
std::atomic< UInt_t > fCheckSum
TListOfDataMembers * fData
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
std::vector< TString > fDepClasses
static TDataMember * FindDataMember(TClass *cl, Int_t index)
virtual Int_t GetSize() const
virtual const char * GetName() const
Returns name of object.
TClass * GetClass() const
static Int_t DataMemberIndex(TClass *cl, const char *name)
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
TRealData * CreateRealData(TClass *currentClass, TClass *parent, TRealData *parentData, int prevLevel) const
Create a TRealData from this, with its data member coming from dmClass.
const char * Data() const
std::vector< TProtoRealData > fPRealData