Logo ROOT  
Reference Guide
TProtoClass.cxx
Go to the documentation of this file.
1 // @(#)root/meta:$
2 // Author: Axel Naumann 2014-05-02
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2014, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TProtoClass
13 Persistent version of a TClass.
14 */
15 
16 #include "TProtoClass.h"
17 
18 #include "TBaseClass.h"
19 #include "TClass.h"
20 #include "TClassEdit.h"
21 #include "TDataMember.h"
22 #include "TEnum.h"
23 #include "TInterpreter.h"
24 #include "TList.h"
25 #include "TListOfDataMembers.h"
26 #include "TListOfEnums.h"
27 #include "TRealData.h"
28 #include "TError.h"
29 
30 #include <cassert>
31 #include <unordered_map>
32 
33 ////////////////////////////////////////////////////////////////////////////////
34 /// Initialize a TProtoClass from a TClass.
35 
37  TNamed(*cl), fBase(cl->GetListOfBases()),
38  fEnums(cl->GetListOfEnums()), fSizeof(cl->Size()), fCheckSum(cl->fCheckSum),
39  fCanSplit(cl->fCanSplit), fStreamerType(cl->fStreamerType), fProperty(cl->fProperty),
40  fClassProperty(cl->fClassProperty)
41 {
42  if (cl->Property() & kIsNamespace){
43  //fData=new TListOfDataMembers();
44  fEnums=nullptr;
45  //fPRealData=nullptr;
47  return;
48  }
49  TListOfEnums *enums = dynamic_cast<TListOfEnums*>(fEnums);
50  if (enums && !enums->fIsLoaded) {
51  // Make sure all the enum information is loaded
52  enums->Load();
53  }
54  // initialize list of data members (fData)
55  TList * dataMembers = cl->GetListOfDataMembers();
56  if (dataMembers && dataMembers->GetSize() > 0) {
57  fData.reserve(dataMembers->GetSize() );
58  for (auto * obj : *dataMembers) {
59  TDataMember * dm = dynamic_cast<TDataMember*>(obj);
60  fData.push_back(dm);
61  }
62  }
63 
64  fPRealData.reserve(100);
65  class DepClassDedup {
66  std::vector<TString> &fDepClasses;
67  std::unordered_map<std::string, int> fDepClassIdx;
68  public:
69  DepClassDedup(std::vector<TString> &depClasses): fDepClasses(depClasses)
70  {
71  R__ASSERT(fDepClasses.empty() && "Expected fDepClasses to be empty before fililng it!");
72  }
73 
74  ~DepClassDedup()
75  {
76  if (fDepClasses.size() != fDepClassIdx.size())
77  ::Error("TProtoClass::DepClassDedup::~DepClassDedup",
78  "Mismatching size of fDepClasses and index map! Please report.");
79  }
80 
81  int GetIdx(const char *name) {
82  auto itins = fDepClassIdx.insert({name, fDepClasses.size()});
83  if (itins.second) {
84  fDepClasses.emplace_back(name);
85  }
86  return itins.first->second;
87  }
88  } depClassDedup(fDepClasses);
89 
90  if (!cl->GetCollectionProxy()) {
91  // Build the list of RealData before we access it:
92  cl->BuildRealData(0, true /*isTransient*/);
93  // The data members are ordered as follows:
94  // - this class's data members,
95  // - foreach base: base class's data members.
96  for (auto realDataObj: *cl->GetListOfRealData()) {
97  TRealData *rd = (TRealData*)realDataObj;
98  TProtoRealData protoRealData(rd);
99 
100  if (TClass* clRD = rd->GetDataMember()->GetClass())
101  protoRealData.fClassIndex = depClassDedup.GetIdx(clRD->GetName());
102 
104 
105  fPRealData.emplace_back(protoRealData);
106  }
107 
108  // if (gDebug > 2) {
109  // for (const auto &data : fPRealData) {
110  // const auto classType = dataPtr->IsA();
111  // const auto dataName = data.fName;
112  // const auto dataClass = data.fClass;
113  // Info("TProtoClass","Data is a protorealdata: %s - class %s - transient %d", dataName.Data(),dataClass.Data(),data.fIsTransient);
114  //if (!dataClass.IsNull()
115  // if (classType == TProtoRealData::Class())
116  // Info("TProtoClass","Data is a protorealdata: %s", dataPtrName);
117  // if (classType == TObjString::Class())
118  // Info("TProtoClass","Data is a objectstring: %s", dataPtrName);
119  // if (dataPtr->TestBit(TRealData::kTransient))
120  // Info("TProtoClass","And is transient");
121  // }
122  // }
123  }
124 
127 }
128 
129 
130 ////////////////////////////////////////////////////////////////////////////////
131 /// Destructor.
132 
134 {
135  Delete();
136 }
137 
138 ////////////////////////////////////////////////////////////////////////////////
139 /// Delete the containers that are usually owned by their TClass.
140 /// if (fPRealData) fPRealData->Delete(opt);
141 /// delete fPRealData; fPRealData = 0;
142 
143 void TProtoClass::Delete(Option_t* opt /*= ""*/) {
144  if (fBase) fBase->Delete(opt);
145  delete fBase; fBase = 0;
146 
147  for (auto dm: fData) {
148  delete dm;
149  }
150 
151  if (fEnums) fEnums->Delete(opt);
152  delete fEnums; fEnums = 0;
153 
154  if (gErrorIgnoreLevel==-2) printf("Delete the protoClass %s \n",GetName());
155 }
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Move data from this TProtoClass into cl.
159 /// Returns 'false' if nothing was done. This can happen in the case where
160 /// there is more than one dictionary for the same entity. Note having
161 /// duplicate dictionary is acceptable for namespace or STL collections.
162 
164  if (cl->fRealData || cl->fBase.load() || cl->fData || cl->fEnums.load() || cl->fSizeof != -1 || cl->fCanSplit >= 0 ||
165  cl->fProperty != (-1)) {
166 
167  if (cl->GetCollectionType() != ROOT::kNotSTL) {
168  // We are in the case of collection, duplicate dictionary are allowed
169  // (and even somewhat excepted since they can be auto asked for).
170  // They do not always have a TProtoClass for them. In particular
171  // the one that are pre-generated in the ROOT build (in what was once
172  // called the cintdlls) do not have a pcms, neither does vector<string>
173  // which is part of libCore proper.
174  if (gDebug > 0)
175  Info("FillTClass", "Returning w/o doing anything. %s is a STL collection.",cl->GetName());
176  return kFALSE;
177  }
178  if (cl->Property() & kIsNamespace) {
179  if (gDebug > 0)
180  Info("FillTClass", "Returning w/o doing anything. %s is a namespace.",cl->GetName());
181  return kFALSE;
182  }
183  Error("FillTClass", "TClass %s already initialized!", cl->GetName());
184  return kFALSE;
185  }
186  if (gDebug > 1) Info("FillTClass","Loading TProtoClass for %s - %s",cl->GetName(),GetName());
187 
188  if (fPRealData.size() > 0) {
189 
190  // A first loop to retrieve the mother classes before starting to
191  // fill this TClass instance. This is done in order to avoid recursions
192  // for example in presence of daughter and mother class present in two
193  // dictionaries compiled in two different libraries which are not linked
194  // one with each other.
195  for (auto element: fPRealData) {
196  //if (element->IsA() == TObjString::Class()) {
197  if (element.IsAClass() ) {
198  if (gDebug > 1) Info("","Treating beforehand mother class %s",GetClassName(element.fClassIndex));
200 
201  TClass::GetClass(GetClassName(element.fClassIndex));
202  }
203  }
204  }
205 
206 
207  //this->Dump();
208 
209  // Copy only the TClass bits.
210  // not bit 13 and below and not bit 24 and above, just Bits 14 - 23
211  UInt_t newbits = TestBits(0x00ffc000);
212  cl->ResetBit(0x00ffc000);
213  cl->SetBit(newbits);
214 
215  cl->fName = this->fName;
216  cl->fTitle = this->fTitle;
217  cl->fBase = fBase;
218 
219  // fill list of data members in TClass
220  //if (cl->fData) { cl->fData->Delete(); delete cl->fData; }
221  cl->fData = new TListOfDataMembers(fData);
222  // for (auto * dataMember : fData) {
223  // //printf("add data member for class %s - member %s \n",GetName(), dataMember->GetName() );
224  // cl->fData->Add(dataMember);
225  // }
226  // // set loaded bit to true to avoid re-loading the data members
227  // cl->fData->SetIsLoaded();*
228 
229  //cl->fData = (TListOfDataMembers*)fData;
230 
231  // The TDataMember were passed along.
232  fData.clear();
233 
234  // We need to fill enums one by one to initialise the internal map which is
235  // transient
236  {
237  auto temp = new TListOfEnums();
238  if (fEnums) {
239  for (TObject* enumAsTObj : *fEnums){
240  temp->Add((TEnum*) enumAsTObj);
241  }
242  // We did not transfer the container itself, let remove it from memory without deleting its content.
243  fEnums->Clear();
244  delete fEnums;
245  fEnums = nullptr;
246  }
247  cl->fEnums = temp;
248  }
249 
250  cl->fSizeof = fSizeof;
251  cl->fCheckSum = fCheckSum;
252  cl->fCanSplit = fCanSplit;
253  cl->fProperty = fProperty;
256 
257  // Update pointers to TClass
258  if (cl->fBase.load()) {
259  for (auto base: *cl->fBase) {
260  ((TBaseClass*)base)->SetClass(cl);
261  }
262  }
263  if (cl->fData) {
264  for (auto dm: *cl->fData) {
265  ((TDataMember*)dm)->SetClass(cl);
266  }
267  ((TListOfDataMembers*)cl->fData)->SetClass(cl);
268  }
269  if (cl->fEnums.load()) {
270  for (auto en: *cl->fEnums) {
271  ((TEnum*)en)->SetClass(cl);
272  }
273  ((TListOfEnums*)cl->fEnums)->SetClass(cl);
274  }
275 
276 
277  TClass* currentRDClass = cl;
278  TRealData * prevRealData = 0;
279  int prevLevel = 0;
280  bool first = true;
281  if (fPRealData.size() > 0) {
282  for (auto element: fPRealData) {
283  //if (element->IsA() == TObjString::Class()) {
284  if (element.IsAClass() ) {
285  // We now check for the TClass entry, w/o loading. Indeed we did that above.
286  // If the class is not found, it means that really it was not selected and we
287  // replace it with an empty placeholder with the status of kForwardDeclared.
288  // Interactivity will be of course possible but if IO is attempted, a warning
289  // will be issued.
291 
292  // Disable autoparsing which might be triggered by the use of ResolvedTypedef
293  // and the fallback new TClass() below.
294  currentRDClass = TClass::GetClass(GetClassName(element.fClassIndex), false /* Load */ );
295  //printf("element is a class - name %s - index %d %s \n ",currentRDClass->GetName(), element.fClassIndex, GetClassName(element.fClassIndex) );
296  if (!currentRDClass && !element.TestFlag(TProtoRealData::kIsTransient)) {
297  if (gDebug>1)
298  Info("FillTClass()",
299  "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.",
300  GetClassName(element.fClassIndex));
301  currentRDClass = new TClass(GetClassName(element.fClassIndex),1,TClass::kForwardDeclared, true /*silent*/);
302  }
303  }
304  //else {
305  if (!currentRDClass) continue;
306  //TProtoRealData* prd = (TProtoRealData*)element;
307  // pass a previous real data only if depth
308 
309  if (TRealData* rd = element.CreateRealData(currentRDClass, cl,prevRealData, prevLevel)) {
310  if (first) {
311  //LM: need to do here because somehow fRealData is destroyed when calling TClass::GetListOfDataMembers()
312  if (cl->fRealData) {
313  Info("FillTClass","Real data for class %s is not empty - make a new one",cl->GetName() );
314  delete cl->fRealData;
315  }
316  cl->fRealData = new TList(); // FIXME: this should really become a THashList!
317  first = false;
318  }
319 
320  cl->fRealData->AddLast(rd);
321  prevRealData = rd;
322  prevLevel = element.fLevel;
323 
324  }
325  //}
326  }
327  }
328  else {
329  if (cl->fRealData) {
330  Info("FillTClas","Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->GetName() );
331  delete cl->fRealData;
332  }
333  cl->fRealData = new TList(); // FIXME: this should really become a THashList!
334  }
335 
336  cl->SetStreamerImpl();
337 
338  // set to zero in order not to delete when protoclass is deleted
339  fBase = 0;
340  //fData = 0;
341  fEnums = 0;
342 
343  fPRealData.clear();
344  fPRealData.shrink_to_fit(); // to reset the underlying allocate space
345 
346  // if (fPRealData) fPRealData->Delete();
347  // delete fPRealData;
348  // fPRealData = 0;
349 
350  return kTRUE;
351 }
352 
353 ////////////////////////////////////////////////////////////////////////////////
354 
356  //TNamed(rd->GetDataMember()->GetName(), rd->GetName()),
357  //TNamed(),
358  //fName(rd->GetDataMember()->GetName()),
359  //fTitle(rd->GetName()),
360  fOffset(rd->GetThisOffset()),
361  fDMIndex(-1),
362  fLevel(0),
363  fClassIndex(-1),
364  fStatusFlag(0)
365 {
366  TDataMember * dm = rd->GetDataMember();
367  TClass * cl = dm->GetClass();
368  assert(cl != NULL);
369  fDMIndex = DataMemberIndex(cl,dm->GetName());
370  //printf("Index of data member %s for class %s is %d \n",dm->GetName(), cl->GetName() , fDMIndex);
371  TString fullDataMemberName = rd->GetName(); // full data member name (e.g. fXaxis.fNbins)
372  fLevel = fullDataMemberName.CountChar('.');
373 
374  if (fullDataMemberName.Contains("*") ) SetFlag(kIsPointer);
375 
376  // Initialize this from a TRealData object.
377  SetFlag(kIsObject, rd->IsObject());
379 }
380 
381 ////////////////////////////////////////////////////////////////////////////////
382 /// Destructor to pin vtable.
383 ///if (gErrorIgnoreLevel==-2) printf("destroy real data %s - ",GetName());
384 
386 {
387 }
388 
389 ////////////////////////////////////////////////////////////////////////////////
390 /// Create a TRealData from this, with its data member coming from dmClass.
391 /// find data member from protoclass
392 
394  TClass* parent, TRealData *prevData, int prevLevel) const
395 {
396 
397  //TDataMember* dm = (TDataMember*)dmClass->GetListOfDataMembers()->FindObject(fName);
398  TDataMember* dm = TProtoClass::FindDataMember(dmClass, fDMIndex);
399 
400  if (!dm && dmClass->GetState()!=TClass::kForwardDeclared) {
401  ::Error("CreateRealData",
402  "Cannot find data member # %d of class %s for parent %s!", fDMIndex, dmClass->GetName(),
403  parent->GetName());
404  return nullptr;
405  }
406 
407  // here I need to re-construct the realdata full name (e.g. fAxis.fNbins)
408 
409  TString realMemberName;
410  // keep an empty name if data member is not found
411  if (dm) realMemberName = dm->GetName();
412  if (TestFlag(kIsPointer) )
413  realMemberName = TString("*")+realMemberName;
414  else if (dm){
415  if (dm->GetArrayDim() > 0) {
416  // in case of array (like fMatrix[2][2] we need to add max index )
417  // this only in case of it os not a pointer
418  for (int idim = 0; idim < dm->GetArrayDim(); ++idim)
419  realMemberName += TString::Format("[%d]",dm->GetMaxIndex(idim) );
420  } else if (TClassEdit::IsStdArray(dm->GetTypeName())) {
421  std::string typeNameBuf;
422  Int_t ndim = dm->GetArrayDim();
423  std::array<Int_t, 5> maxIndices; // 5 is the maximum supported in TStreamerElement::SetMaxIndex
425  typeNameBuf,
426  maxIndices,
427  ndim);
428  for (Int_t idim = 0; idim < ndim; ++idim) {
429  realMemberName += TString::Format("[%d]",maxIndices[idim] );
430  }
431  }
432  }
433 
434  if (prevData && fLevel > 0 ) {
435  if (fLevel-prevLevel == 1) // I am going down 1 level
436  realMemberName = TString::Format("%s.%s",prevData->GetName(), realMemberName.Data() );
437  else if (fLevel <= prevLevel) { // I am at the same level
438  // need to strip out prev name
439  std::string prevName = prevData->GetName();
440  // we strip the prev data member name from the full name
441  std::string parentName;
442  for (int i = 0; i < prevLevel-fLevel+1; ++i) {
443  parentName = prevName.substr(0, prevName.find_last_of(".") );
444  prevName = parentName;
445  }
446 
447  // now we need to add the current name
448  realMemberName = TString::Format("%s.%s",parentName.c_str(), realMemberName.Data() );
449  }
450  }
451 
452  //printf("adding new realdata for class %s : %s - %s %d %d \n",dmClass->GetName(), realMemberName.Data(), dm->GetName(),fLevel, fDMIndex );
453 
454  TRealData* rd = new TRealData(realMemberName, fOffset, dm);
455  if (TestFlag(kIsTransient)) {
457  }
458  rd->SetIsObject(TestFlag(kIsObject) );
459  return rd;
460 }
461 
462 ////////////////////////////////////////////////////////////////////////////////
463 
465 {
466  TList * dmList = cl->GetListOfDataMembers();
467 
468  // we cannot use IndexOf because order is guaranteed only for non-static data member
469  Int_t index = 0;
470  for ( auto * obj : *dmList) {
471  TDataMember * dm = (TDataMember *) obj;
472  if (!dm ) continue;
473  if (dm->Property() & kIsStatic) continue;
474  if ( TString(dm->GetName()) == TString(name) )
475  return index;
476  index++;
477  }
478  ::Error("TProtoClass::DataMemberIndex","data member %s is not found in class %s",name, cl->GetName());
479  dmList->ls();
480  return -1;
481 }
482 ////////////////////////////////////////////////////////////////////////////////
483 
485 {
486  TList * dmList = cl->GetListOfDataMembers(false);
487 
488  // we cannot use IndexOf because order is guaranteed only for non-static data member
489  Int_t i = 0;
490  for ( auto * obj : *dmList) {
491  TDataMember * dm = (TDataMember *) obj;
492  if (!dm ) continue;
493  if (dm->Property() & kIsStatic) continue;
494  if (i == index)
495  return dm;
496  i++;
497  }
499  ::Error("TProtoClass::FindDataMember","data member with index %d is not found in class %s",index,cl->GetName());
500  return nullptr;
501 }
TProtoClass::TProtoRealData::fLevel
Int_t fLevel
Definition: TProtoClass.h:43
TDataMember::GetTypeName
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
Definition: TDataMember.cxx:604
TProtoClass::fOffsetStreamer
Long_t fOffsetStreamer
Definition: TProtoClass.h:84
TProtoClass::fPRealData
std::vector< TProtoRealData > fPRealData
Definition: TProtoClass.h:75
TProtoClass.h
first
Definition: first.py:1
TProtoClass::TProtoRealData::CreateRealData
TRealData * CreateRealData(TClass *currentClass, TClass *parent, TRealData *parentData, int prevLevel) const
Create a TRealData from this, with its data member coming from dmClass.
Definition: TProtoClass.cxx:393
TClass::GetCollectionProxy
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Definition: TClass.cxx:2854
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
TProtoClass::FindDataMember
static TDataMember * FindDataMember(TClass *cl, Int_t index)
Definition: TProtoClass.cxx:484
TListOfEnums::Load
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' into this collection.
Definition: TListOfEnums.cxx:322
TList::Delete
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:469
TString::Data
const char * Data() const
Definition: TString.h:369
TProtoClass::fCheckSum
UInt_t fCheckSum
Definition: TProtoClass.h:79
TClass::Property
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Definition: TClass.cxx:5857
TClassEdit::GetStdArrayProperties
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
Definition: TClassEdit.cxx:2069
ROOT::kNotSTL
@ kNotSTL
Definition: ESTLType.h:41
TClass::SetStreamerImpl
void SetStreamerImpl()
Internal routine to set fStreamerImpl based on the value of fStreamerType.
Definition: TClass.cxx:5986
TClass::CalculateStreamerOffset
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Definition: TClass.cxx:2132
kIsPointer
@ kIsPointer
Definition: TDictionary.h:77
kIsNamespace
@ kIsNamespace
Definition: TDictionary.h:92
TObject::Info
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:864
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TProtoClass::fEnums
TList * fEnums
Definition: TProtoClass.h:74
TProtoClass::TProtoRealData::SetFlag
void SetFlag(UInt_t f, Bool_t on=kTRUE)
Definition: TProtoClass.h:62
TProtoClass::TProtoClass
TProtoClass()
Definition: TProtoClass.h:97
gInterpreter
#define gInterpreter
Definition: TInterpreter.h:558
TProtoClass::fProperty
Long_t fProperty
Definition: TProtoClass.h:82
TDataMember.h
TClass::fClassProperty
Long_t fClassProperty
Property.
Definition: TClass.h:226
TBaseClass
Definition: TBaseClass.h:33
TProtoClass::TProtoRealData::kIsObject
@ kIsObject
Definition: TProtoClass.h:48
TDataMember
Definition: TDataMember.h:31
TObject::TestBits
Int_t TestBits(UInt_t f) const
Definition: TObject.h:173
TNamed::fName
TString fName
Definition: TNamed.h:38
TString::Contains
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:624
TBaseClass.h
TClass.h
TList.h
TList::AddLast
virtual void AddLast(TObject *obj)
Add object at the end of the list.
Definition: TList.cxx:151
TString::Format
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition: TString.cxx:2311
TProtoClass::TProtoRealData::kIsPointer
@ kIsPointer
Definition: TProtoClass.h:50
TString
Definition: TString.h:136
TProtoClass::TProtoRealData::fClassIndex
Int_t fClassIndex
Definition: TProtoClass.h:44
TClass::fCheckSum
std::atomic< UInt_t > fCheckSum
Definition: TClass.h:198
TRealData::kTransient
@ kTransient
Definition: TRealData.h:44
TProtoClass::fCanSplit
Int_t fCanSplit
Definition: TProtoClass.h:80
bool
TString::CountChar
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
Definition: TString.cxx:476
TNamed::fTitle
TString fTitle
Definition: TNamed.h:39
TProtoClass::fStreamerType
Int_t fStreamerType
Definition: TProtoClass.h:81
TClass::fStreamerType
Int_t fStreamerType
saved info to call Streamer
Definition: TClass.h:246
TProtoClass::fSizeof
Int_t fSizeof
Definition: TProtoClass.h:78
TProtoClass::fData
std::vector< TDataMember * > fData
Definition: TProtoClass.h:76
TRealData::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:52
TDataMember::Property
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Definition: TDataMember.cxx:776
TRealData::GetDataMember
TDataMember * GetDataMember() const
Definition: TRealData.h:53
TRealData::IsObject
Bool_t IsObject() const
Definition: TRealData.h:56
TDataMember::GetArrayDim
Int_t GetArrayDim() const
Return number of array dimensions.
Definition: TDataMember.cxx:545
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TClass::GetCollectionType
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
Definition: TClass.cxx:2843
TListOfDataMembers
Definition: TListOfDataMembers.h:32
TProtoClass::Delete
void Delete(Option_t *opt="")
Delete the containers that are usually owned by their TClass.
Definition: TProtoClass.cxx:143
TProtoClass::TProtoRealData::TProtoRealData
TProtoRealData()
Definition: TProtoClass.h:56
TRealData::SetIsObject
void SetIsObject(Bool_t isObject)
Definition: TRealData.h:57
TObject::ResetBit
void ResetBit(UInt_t f)
Definition: TObject.h:171
kIsStatic
@ kIsStatic
Definition: TDictionary.h:79
TClass::fOffsetStreamer
Long_t fOffsetStreamer
Properties that can only be evaluated at run-time.
Definition: TClass.h:245
TEnum.h
TProtoClass::FillTClass
Bool_t FillTClass(TClass *pcl)
Move data from this TProtoClass into cl.
Definition: TProtoClass.cxx:163
TObject::SetBit
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:696
TProtoClass::TProtoRealData::kIsTransient
@ kIsTransient
Definition: TProtoClass.h:49
TEnum
Definition: TEnum.h:33
TClass::GetListOfRealData
TList * GetListOfRealData() const
Definition: TClass.h:404
TDataMember::GetMaxIndex
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Definition: TDataMember.cxx:591
TNamed
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TListOfDataMembers.h
TListOfEnums.h
gDebug
R__EXTERN Int_t gDebug
Definition: RtypesCore.h:119
TClass::fProperty
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
Definition: TClass.h:225
TProtoClass::~TProtoClass
virtual ~TProtoClass()
Destructor.
Definition: TProtoClass.cxx:133
TClass::GetClass
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.
Definition: TClass.cxx:2925
TRealData.h
TClass::fData
TListOfDataMembers * fData
Definition: TClass.h:182
TProtoClass::TProtoRealData::fDMIndex
Int_t fDMIndex
Definition: TProtoClass.h:42
TClass::BuildRealData
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition: TClass.cxx:1980
TProtoClass::fBase
TList * fBase
Definition: TProtoClass.h:73
unsigned int
xmlio::Size
const char * Size
Definition: TXMLSetup.cxx:62
TClass::fEnums
std::atomic< TListOfEnums * > fEnums
Definition: TClass.h:184
TListOfEnums
Definition: TListOfEnums.h:32
TClass::fCanSplit
Int_t fCanSplit
Definition: TClass.h:224
gErrorIgnoreLevel
R__EXTERN Int_t gErrorIgnoreLevel
Definition: TError.h:129
TListOfEnums::fIsLoaded
Bool_t fIsLoaded
Holder of TEnum for unloaded Enums.
Definition: TListOfEnums.h:44
R__ASSERT
#define R__ASSERT(e)
Definition: TError.h:120
TProtoClass::fClassProperty
Long_t fClassProperty
Definition: TProtoClass.h:83
TClassEdit.h
TClass::GetListOfDataMembers
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Definition: TClass.cxx:3665
TRealData
Definition: TRealData.h:30
TCollection::GetSize
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
TInterpreter.h
TClass
Definition: TClass.h:80
TClass::kForwardDeclared
@ kForwardDeclared
Definition: TClass.h:123
TObject
Definition: TObject.h:37
TList::Clear
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:401
name
char name[80]
Definition: TGX11.cxx:110
TInterpreter::SuspendAutoParsing
Definition: TInterpreter.h:114
TClass::GetState
EState GetState() const
Definition: TClass.h:439
TClass::fSizeof
Int_t fSizeof
Definition: TClass.h:222
TProtoClass::TProtoRealData
Definition: TProtoClass.h:40
TDataMember::GetClass
TClass * GetClass() const
Definition: TDataMember.h:73
TProtoClass::fDepClasses
std::vector< TString > fDepClasses
Definition: TProtoClass.h:77
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TClass::fRealData
TList * fRealData
Definition: TClass.h:180
TProtoClass::DataMemberIndex
static Int_t DataMemberIndex(TClass *cl, const char *name)
Definition: TProtoClass.cxx:464
TProtoClass::TProtoRealData::~TProtoRealData
virtual ~TProtoRealData()
Destructor to pin vtable.
Definition: TProtoClass.cxx:385
TClass::fBase
std::atomic< TList * > fBase
Definition: TClass.h:181
TList
Definition: TList.h:44
int
TProtoClass::GetClassName
const char * GetClassName(Int_t index) const
Definition: TProtoClass.h:89
TError.h
TClassEdit::IsStdArray
bool IsStdArray(std::string_view name)
Definition: TClassEdit.h:186