ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "TDataMember.h"
21 #include "TEnum.h"
22 #include "TInterpreter.h"
23 #include "TList.h"
24 #include "TListOfDataMembers.h"
25 #include "TListOfEnums.h"
26 #include "TRealData.h"
27 #include "TError.h"
28 
29 #include <cassert>
30 
31 ////////////////////////////////////////////////////////////////////////////////
32 /// Initialize a TProtoClass from a TClass.
33 
35  TNamed(*cl), fBase(cl->GetListOfBases()),
36  fEnums(cl->GetListOfEnums()), fSizeof(cl->Size()), fCheckSum(cl->fCheckSum),
37  fCanSplit(cl->fCanSplit), fStreamerType(cl->fStreamerType), fProperty(cl->fProperty),
38  fClassProperty(cl->fClassProperty)
39 {
40  if (cl->Property() & kIsNamespace){
41  //fData=new TListOfDataMembers();
42  fEnums=nullptr;
43  //fPRealData=nullptr;
45  return;
46  }
47  // initialize list of data members (fData)
48  TList * dataMembers = cl->GetListOfDataMembers();
49  if (dataMembers && dataMembers->GetSize() > 0) {
50  fData.reserve(dataMembers->GetSize() );
51  for (auto * obj : *dataMembers) {
52  TDataMember * dm = dynamic_cast<TDataMember*>(obj);
53  fData.push_back(dm);
54  }
55  }
56 
57  fPRealData.reserve(100);
58 
59  if (!cl->GetCollectionProxy()) {
60  // Build the list of RealData before we access it:
61  cl->BuildRealData(0, true /*isTransient*/);
62  // The data members are ordered as follows:
63  // - this class's data members,
64  // - foreach base: base class's data members.
65  // fPRealData encodes all TProtoRealData objects with a
66  // TObjString to signal a new class.
67  TClass* clCurrent = cl;
68  fDepClasses.push_back(cl->GetName() );
69  TRealData* precRd = nullptr;
70  for (auto realDataObj: *cl->GetListOfRealData()) {
71  TRealData *rd = (TRealData*)realDataObj;
72  if (!precRd) precRd = rd;
73  TClass* clRD = rd->GetDataMember()->GetClass();
74  TProtoRealData protoRealData(rd);
75  if (clRD != clCurrent) {
76  // here I have a new class
77  fDepClasses.push_back(clRD->GetName() );
78  clCurrent = clRD;
79  protoRealData.fClassIndex = fDepClasses.size()-1;
80  //protoRealData.fClass = clRD->GetName();
81 //TObjString *clstr = new TObjString(clRD->GetName());
82  if (precRd->TestBit(TRealData::kTransient)) {
83  //clstr->SetBit(TRealData::kTransient);
84  protoRealData.SetFlag(TProtoRealData::kIsTransient,true);
85  }
86  else
87  protoRealData.SetFlag(TProtoRealData::kIsTransient,false);
88 
89  // fPRealData->AddLast(clstr);
90  precRd = rd;
91  }
92  //fPRealData->AddLast(new TProtoRealData(rd));
93  fPRealData.push_back(protoRealData);
94  }
95 
96  if (gDebug > 2) {
97  for (auto data : fPRealData) {
98  // const auto classType = dataPtr->IsA();
99  // const auto dataName = data.fName;
100  // const auto dataClass = data.fClass;
101  // Info("TProtoClass","Data is a protorealdata: %s - class %s - transient %d", dataName.Data(),dataClass.Data(),data.fIsTransient);
102  //if (!dataClass.IsNull()
103  // if (classType == TProtoRealData::Class())
104  // Info("TProtoClass","Data is a protorealdata: %s", dataPtrName);
105  // if (classType == TObjString::Class())
106  // Info("TProtoClass","Data is a objectstring: %s", dataPtrName);
107  // if (dataPtr->TestBit(TRealData::kTransient))
108  // Info("TProtoClass","And is transient");
109  }
110  }
111  }
112 
113  // this crashes
116 }
117 
118 
119 
120 
121 // // conversion of a new TProtoClass from an old TProtoClass
122 // //______________________________________________________________________________
123 // TProtoClass::TProtoClass(TProtoClassOld * pc):
124 // TNamed(pc->GetName(),pc->GetTitle()), fBase(pc->fBase),
125 // fEnums(pc->fEnums), fSizeof(pc->fSizeof), fCanSplit(pc->fCanSplit),
126 // fStreamerType(pc->fStreamerType), fProperty(pc->fProperty),
127 // fClassProperty(pc->fClassProperty), fOffsetStreamer( pc->fOffsetStreamer)
128 // {
129 
130 // fBase = (pc->fBase) ? (TList*) pc->fBase->Clone() : 0;
131 // //fData = (pc->fData) ? (TList*) pc->fData->Clone() : 0;
132 // fEnums = (pc->fEnums) ? (TList*) pc->fEnums->Clone() : 0;
133 
134 // // initialize list of data members (fData)
135 // TList * dataMembers = pc->fData;
136 // if (dataMembers && dataMembers->GetSize() > 0) {
137 // fData.reserve(dataMembers->GetSize() );
138 // for (auto * obj : *dataMembers) {
139 // TDataMember * dm = dynamic_cast<TDataMember*>(obj);
140 // if (dm) {
141 // TDataMember * dm2 = (TDataMember *) dm->Clone();
142 // if (dm2) fData.push_back(dm2);
143 // }
144 // }
145 // }
146 
147 // fPRealData.reserve(100);
148 
149 // TString className;
150 // for (auto dataPtr : *(pc->fPRealData) ) {
151 
152 // const auto classType = dataPtr->IsA();
153 // if (classType == TObjString::Class()) {
154 // className = dataPtr->GetName();
155 // }
156 // else if (classType == TProtoClass::TProtoRealData::Class()) {
157 // TProtoRealData protoRealData;
158 // TProtoClass::TProtoRealData * oldData= ( TProtoClass::TProtoRealData * )dataPtr;
159 // TClass * cl = TClass::GetClass(className);
160 // //protoRealData.fName = dataPtr->GetName();
161 // //TObject * obj = cl->GetListOfDataMembers()->FindObject( );
162 // protoRealData.fDMIndex = DataMemberIndex(cl, dataPtr->GetName() );
163 // // protoRealData.fTitle = dataPtr->GetTitle();
164 // //protoRealData.fClass = className;
165 // className.Clear();
166 // protoRealData.fIsTransient = dataPtr->TestBit(TRealData::kTransient);
167 // protoRealData.fOffset = oldData->GetOffset();
168 // protoRealData.fIsObject = dataPtr->TestBit(BIT(15));
169 // fPRealData.push_back(protoRealData);
170 // }
171 // }
172 // }
173 
174 ////////////////////////////////////////////////////////////////////////////////
175 /// Destructor.
176 
178 {
179  Delete();
180 }
181 
182 ////////////////////////////////////////////////////////////////////////////////
183 /// Delete the containers that are usually owned by their TClass.
184 /// if (fPRealData) fPRealData->Delete(opt);
185 /// delete fPRealData; fPRealData = 0;
186 
187 void TProtoClass::Delete(Option_t* opt /*= ""*/) {
188  if (fBase) fBase->Delete(opt);
189  delete fBase; fBase = 0;
190 
191  if (fEnums) fEnums->Delete(opt);
192  delete fEnums; fEnums = 0;
193 
194  if (gErrorIgnoreLevel==-2) printf("Delete the protoClass %s \n",GetName());
195 }
196 
197 ////////////////////////////////////////////////////////////////////////////////
198 /// Move data from this TProtoClass into cl.
199 
201  if (cl->fRealData || cl->fBase || cl->fData || cl->fEnums.load()
202  || cl->fSizeof != -1 || cl->fCanSplit >= 0
203  || cl->fProperty != (-1) ) {
204  if (cl->fProperty & kIsNamespace){
205  if (gDebug>0) Info("FillTClass", "Returning w/o doing anything. %s is a namespace.",cl->GetName());
206  return kTRUE;
207  }
208  Error("FillTClass", "TClass %s already initialized!", cl->GetName());
209  return kFALSE;
210  }
211  if (gDebug > 1) Info("FillTClass","Loading TProtoClass for %s - %s",cl->GetName(),GetName());
212 
213  if (fPRealData.size() > 0) {
214 
215  // A first loop to retrieve the mother classes before starting to
216  // fill this TClass instance. This is done in order to avoid recursions
217  // for example in presence of daughter and mother class present in two
218  // dictionaries compiled in two different libraries which are not linked
219  // one with each other.
220  for (auto element: fPRealData) {
221  //if (element->IsA() == TObjString::Class()) {
222  if (element.IsAClass() ) {
223  if (gDebug > 1) Info("","Treating beforehand mother class %s",GetClassName(element.fClassIndex));
224 // int autoloadingOldval=gInterpreter->SetClassAutoloading(false);
226 
227  TClass::GetClass(GetClassName(element.fClassIndex));
228 
229 // gInterpreter->SetClassAutoloading(autoloadingOldval);
230  }
231  }
232  }
233 
234 
235  //this->Dump();
236 
237  // Copy only the TClass bits.
238  // not bit 13 and below and not bit 24 and above, just Bits 14 - 23
239  UInt_t newbits = TestBits(0x00ffc000);
240  cl->ResetBit(0x00ffc000);
241  cl->SetBit(newbits);
242 
243  cl->fName = this->fName;
244  cl->fTitle = this->fTitle;
245  cl->fBase = fBase;
246 
247  // fill list of data members in TClass
248  //if (cl->fData) { cl->fData->Delete(); delete cl->fData; }
249  cl->fData = new TListOfDataMembers(fData);
250  // for (auto * dataMember : fData) {
251  // //printf("add data member for class %s - member %s \n",GetName(), dataMember->GetName() );
252  // cl->fData->Add(dataMember);
253  // }
254  // // set loaded bit to true to avoid re-loading the data members
255  // cl->fData->SetIsLoaded();*
256 
257  //cl->fData = (TListOfDataMembers*)fData;
258 
259  // We need to fill enums one by one to initialise the internal map which is
260  // transient
261  {
262  auto temp = new TListOfEnums();
263  for (TObject* enumAsTObj : *fEnums){
264  temp->Add((TEnum*) enumAsTObj);
265  }
266  cl->fEnums = temp;
267  }
268 
269  cl->fSizeof = fSizeof;
270  cl->fCheckSum = fCheckSum;
271  cl->fCanSplit = fCanSplit;
272  cl->fProperty = fProperty;
275 
276  // Update pointers to TClass
277  if (cl->fBase) {
278  for (auto base: *cl->fBase) {
279  ((TBaseClass*)base)->SetClass(cl);
280  }
281  }
282  if (cl->fData) {
283  for (auto dm: *cl->fData) {
284  ((TDataMember*)dm)->SetClass(cl);
285  }
286  ((TListOfDataMembers*)cl->fData)->SetClass(cl);
287  }
288  if (cl->fEnums.load()) {
289  for (auto en: *cl->fEnums) {
290  ((TEnum*)en)->SetClass(cl);
291  }
292  ((TListOfEnums*)cl->fEnums)->SetClass(cl);
293  }
294 
295 
296  TClass* currentRDClass = cl;
297  TRealData * prevRealData = 0;
298  int prevLevel = 0;
299  bool first = true;
300  if (fPRealData.size() > 0) {
301  for (auto element: fPRealData) {
302  //if (element->IsA() == TObjString::Class()) {
303  if (element.IsAClass() ) {
304  // We now check for the TClass entry, w/o loading. Indeed we did that above.
305  // If the class is not found, it means that really it was not selected and we
306  // replace it with an empty placeholder with the status of kForwardDeclared.
307  // Interactivity will be of course possible but if IO is attempted, a warning
308  // will be issued.
310 
311  // Disable autoparsing which might be triggered by the use of ResolvedTypedef
312  // and the fallback new TClass() below.
313  currentRDClass = TClass::GetClass(GetClassName(element.fClassIndex), false /* Load */ );
314  //printf("element is a class - name %s - index %d %s \n ",currentRDClass->GetName(), element.fClassIndex, GetClassName(element.fClassIndex) );
315  if (!currentRDClass && !element.TestFlag(TProtoRealData::kIsTransient)) {
316  if (gDebug>1)
317  Info("FillTClass()",
318  "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.",
319  GetClassName(element.fClassIndex));
320  currentRDClass = new TClass(GetClassName(element.fClassIndex),1,TClass::kForwardDeclared, true /*silent*/);
321  }
322  }
323  //else {
324  if (!currentRDClass) continue;
325  //TProtoRealData* prd = (TProtoRealData*)element;
326  // pass a previous real data only if depth
327 
328  if (TRealData* rd = element.CreateRealData(currentRDClass, cl,prevRealData, prevLevel)) {
329  if (first) {
330  //LM: need to do here because somehow fRealData is destroyed when calling TClass::GetListOfDataMembers()
331  if (cl->fRealData) {
332  Info("FillTClas","Real data for class %s is not empty - make a new one",cl->GetName() );
333  delete cl->fRealData;
334  }
335  cl->fRealData = new TList(); // FIXME: this should really become a THashList!
336  first = false;
337  }
338 
339  cl->fRealData->AddLast(rd);
340  prevRealData = rd;
341  prevLevel = element.fLevel;
342 
343  }
344  //}
345  }
346  }
347  else {
348  if (cl->fRealData) {
349  Info("FillTClas","Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->GetName() );
350  delete cl->fRealData;
351  }
352  cl->fRealData = new TList(); // FIXME: this should really become a THashList!
353  }
354 
355  cl->SetStreamerImpl();
356 
357  // set to zero in order not to delete when protoclass is deleted
358  fBase = 0;
359  //fData = 0;
360  fEnums = 0;
361 
362  fPRealData.clear();
363  fPRealData.shrink_to_fit(); // to reset the underlying allocate space
364 
365  // if (fPRealData) fPRealData->Delete();
366  // delete fPRealData;
367  // fPRealData = 0;
368 
369 
370  return kTRUE;
371 }
372 
373 ////////////////////////////////////////////////////////////////////////////////
374 
376  //TNamed(rd->GetDataMember()->GetName(), rd->GetName()),
377  //TNamed(),
378  //fName(rd->GetDataMember()->GetName()),
379 // fTitle(rd->GetName()),
380  fOffset(rd->GetThisOffset()),
381  fDMIndex(-1),
382  fLevel(0),
383  fClassIndex(-1),
384  fStatusFlag(0)
385 {
386  TDataMember * dm = rd->GetDataMember();
387  TClass * cl = dm->GetClass();
388  assert(cl != NULL);
389  fDMIndex = DataMemberIndex(cl,dm->GetName());
390  //printf("Index of data member %s for class %s is %d \n",dm->GetName(), cl->GetName() , fDMIndex);
391  TString fullDataMemberName = rd->GetName(); // full data member name (e.g. fXaxis.fNbins)
392  fLevel = fullDataMemberName.CountChar('.');
393 
394  if (fullDataMemberName.Contains("*") ) SetFlag(kIsPointer);
395 
396  // Initialize this from a TRealData object.
397  SetFlag(kIsObject, rd->IsObject());
399 }
400 
401 ////////////////////////////////////////////////////////////////////////////////
402 /// Destructor to pin vtable.
403 ///if (gErrorIgnoreLevel==-2) printf("destroy real data %s - ",GetName());
404 
406 {
407 }
408 
409 ////////////////////////////////////////////////////////////////////////////////
410 /// Create a TRealData from this, with its data member coming from dmClass.
411 /// find data member from protoclass
412 
414  TClass* parent, TRealData *prevData, int prevLevel) const
415 {
416 
417  //TDataMember* dm = (TDataMember*)dmClass->GetListOfDataMembers()->FindObject(fName);
418  TDataMember* dm = TProtoClass::FindDataMember(dmClass, fDMIndex);
419 
420  if (!dm && dmClass->GetState()!=TClass::kForwardDeclared) {
421  ::Error("CreateRealData",
422  "Cannot find data member # %d of class %s for parent %s!", fDMIndex, dmClass->GetName(),
423  parent->GetName());
424  return nullptr;
425  }
426 
427  // here I need to re-construct the realdata full name (e.g. fAxis.fNbins)
428 
429  TString realMemberName;
430  // keep an empty name if data member is not found
431  if (dm) realMemberName = dm->GetName();
432  if (TestFlag(kIsPointer) )
433  realMemberName = TString("*")+realMemberName;
434  else {
435  if (dm && dm->GetArrayDim() > 0) {
436  // in case of array (like fMatrix[2][2] we need to add max index )
437  // this only in case of it os not a pointer
438  for (int idim = 0; idim < dm->GetArrayDim(); ++idim)
439  realMemberName += TString::Format("[%d]",dm->GetMaxIndex(idim) );
440  }
441  }
442 
443  if (prevData && fLevel > 0 ) {
444  if (fLevel-prevLevel == 1) // I am going down 1 level
445  realMemberName = TString::Format("%s.%s",prevData->GetName(), realMemberName.Data() );
446  else if (fLevel <= prevLevel) { // I am at the same level
447  // need to strip out prev name
448  std::string prevName = prevData->GetName();
449  // we strip the prev data member name from the full name
450  std::string parentName;
451  for (int i = 0; i < prevLevel-fLevel+1; ++i) {
452  parentName = prevName.substr(0, prevName.find_last_of(".") );
453  prevName = parentName;
454  }
455 
456  // now we need to add the current name
457  realMemberName = TString::Format("%s.%s",parentName.c_str(), realMemberName.Data() );
458  }
459  }
460 
461  //printf("adding new realdata for class %s : %s - %s %d %d \n",dmClass->GetName(), realMemberName.Data(), dm->GetName(),fLevel, fDMIndex );
462 
463  TRealData* rd = new TRealData(realMemberName, fOffset, dm);
464  rd->SetIsObject(TestFlag(kIsObject) );
465  return rd;
466 }
467 
468 ////////////////////////////////////////////////////////////////////////////////
469 
471 {
472  TList * dmList = cl->GetListOfDataMembers();
473 
474  // we cannot use IndexOf because order is guaranteed only for non-static data member
475  Int_t index = 0;
476  for ( auto * obj : *dmList) {
477  TDataMember * dm = (TDataMember *) obj;
478  if (!dm ) continue;
479  if (dm->Property() & kIsStatic) continue;
480  if ( TString(dm->GetName()) == TString(name) )
481  return index;
482  index++;
483  }
484  ::Error("TProtoClass::DataMemberIndex","data member %s is not found in class %s",name, cl->GetName());
485  dmList->ls();
486  return -1;
487 }
488 ////////////////////////////////////////////////////////////////////////////////
489 
491 {
492  TList * dmList = cl->GetListOfDataMembers(false);
493 
494  // we cannot use IndexOf because order is guaranteed only for non-static data member
495  Int_t i = 0;
496  for ( auto * obj : *dmList) {
497  TDataMember * dm = (TDataMember *) obj;
498  if (!dm ) continue;
499  if (dm->Property() & kIsStatic) continue;
500  if (i == index)
501  return dm;
502  i++;
503  }
505  ::Error("TProtoClass::FindDataMember","data member with index %d is not found in class %s",index,cl->GetName());
506  return nullptr;
507 }
EState GetState() const
Definition: TClass.h:442
TString fTitle
Definition: TNamed.h:37
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.
Definition: TEnum.h:42
void SetIsObject(Bool_t isObject)
Definition: TRealData.h:61
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:405
Long_t fProperty
Definition: TProtoClass.h:82
R__EXTERN Int_t gErrorIgnoreLevel
Definition: TError.h:107
const char Option_t
Definition: RtypesCore.h:62
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:33
const char * Size
Definition: TXMLSetup.cxx:56
#define assert(cond)
Definition: unittest.h:542
std::atomic< TListOfEnums * > fEnums
Definition: TClass.h:185
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
UInt_t fCheckSum
Definition: TProtoClass.h:79
Int_t TestBits(UInt_t f) const
Definition: TObject.h:174
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Definition: TClass.cxx:5560
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Definition: TClass.cxx:3459
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
#define gInterpreter
Definition: TInterpreter.h:502
Int_t fStreamerType
saved info to call Streamer
Definition: TClass.h:236
TList * fEnums
Definition: TProtoClass.h:74
Int_t fStreamerType
Definition: TProtoClass.h:81
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
virtual void AddLast(TObject *obj)
Add object at the end of the list.
Definition: TList.cxx:137
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:732
void Delete(Option_t *opt="")
Delete the containers that are usually owned by their TClass.
TList * GetListOfRealData() const
Definition: TClass.h:404
const char * Data() const
Definition: TString.h:349
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:2321
Bool_t FillTClass(TClass *pcl)
Move data from this TProtoClass into cl.
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
std::vector< TDataMember * > fData
Definition: TProtoClass.h:76
virtual ~TProtoRealData()
Destructor to pin vtable.
TList * fBase
Definition: TClass.h:182
const char * GetClassName(Int_t index) const
Definition: TProtoClass.h:89
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
Bool_t IsObject() const
Definition: TRealData.h:60
Int_t fCanSplit
Definition: TProtoClass.h:80
TList * fRealData
Definition: TClass.h:181
A doubly linked list.
Definition: TList.h:47
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition: TClass.cxx:1933
Int_t fCanSplit
Definition: TClass.h:225
virtual ~TProtoClass()
Destructor.
TClass * GetClass() const
Definition: TDataMember.h:73
Int_t fSizeof
Definition: TProtoClass.h:78
unsigned int UInt_t
Definition: RtypesCore.h:42
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:173
bool first
Definition: line3Dfit.C:48
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:34
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Definition: TClass.cxx:2085
TString fName
Definition: TNamed.h:36
Each class (see TClass) has a linked list of its base class(es).
Definition: TBaseClass.h:35
Int_t fSizeof
Definition: TClass.h:223
TRealData * CreateRealData(TClass *currentClass, TClass *parent, TRealData *parentData, int prevLevel) const
Create a TRealData from this, with its data member coming from dmClass.
Long_t fClassProperty
Definition: TProtoClass.h:83
virtual Int_t GetSize() const
Definition: TCollection.h:95
void SetFlag(UInt_t f, Bool_t on=kTRUE)
Definition: TProtoClass.h:61
Long_t fOffsetStreamer
Indicates whether GetClassVersion has been called.
Definition: TClass.h:235
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void SetStreamerImpl()
Internal routine to set fStreamerImpl based on the value of fStreamerType.
Definition: TClass.cxx:5662
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:2801
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
Definition: TClass.h:226
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Definition: TClass.cxx:2730
#define name(a, b)
Definition: linkTestLib0.cpp:5
TList * fBase
Definition: TProtoClass.h:72
Long_t fClassProperty
Property.
Definition: TClass.h:227
Mother of all ROOT objects.
Definition: TObject.h:58
Int_t GetArrayDim() const
Return number of array dimensions.
std::atomic< UInt_t > fCheckSum
Definition: TClass.h:199
TListOfDataMembers * fData
Definition: TClass.h:183
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:36
std::vector< TString > fDepClasses
Definition: TProtoClass.h:77
#define NULL
Definition: Rtypes.h:82
Long_t fOffsetStreamer
Definition: TProtoClass.h:84
R__EXTERN Int_t gDebug
Definition: Rtypes.h:128
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
TDataMember * GetDataMember() const
Definition: TRealData.h:57
void ResetBit(UInt_t f)
Definition: TObject.h:172
static TDataMember * FindDataMember(TClass *cl, Int_t index)
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:56
TObject * obj
static Int_t DataMemberIndex(TClass *cl, const char *name)
std::vector< TProtoRealData > fPRealData
Definition: TProtoClass.h:75