Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
13Persistent 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"
28#include "TRealData.h"
29#include "TError.h"
31
32#include <cassert>
33#include <unordered_map>
34
35#ifdef WIN32
36#include <io.h>
37#include "Windows4Root.h"
38#include <Psapi.h>
39#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
40#define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name)
41#else
42#include <dlfcn.h>
43#endif
44
45static bool IsFromRootCling() {
46 // rootcling also uses TCling for generating the dictionary ROOT files.
47 const static bool foundSymbol = dlsym(RTLD_DEFAULT, "usedToIdentifyRootClingByDlSym");
48 return foundSymbol;
49}
50
51////////////////////////////////////////////////////////////////////////////////
52/// Initialize a TProtoClass from a TClass.
53
55 TNamed(*cl), fBase(cl->GetListOfBases()),
56 fEnums(cl->GetListOfEnums()), fSizeof(cl->Size()), fCheckSum(cl->fCheckSum),
57 fCanSplit(cl->fCanSplit), fStreamerType(cl->fStreamerType), fProperty(cl->fProperty),
58 fClassProperty(cl->fClassProperty), fOwner(false)
59{
60 if (cl->Property() & kIsNamespace){
61 //fData=new TListOfDataMembers();
62 fEnums=nullptr;
63 //fPRealData=nullptr;
65 return;
66 }
67 TListOfEnums *enums = dynamic_cast<TListOfEnums*>(fEnums);
68 if (enums && !enums->fIsLoaded) {
69 // Make sure all the enum information is loaded
70 enums->Load();
71 }
72 // initialize list of data members (fData)
74 if (dataMembers && dataMembers->GetSize() > 0) {
75 fData.reserve(dataMembers->GetSize() );
76 for (auto * obj : *dataMembers) {
77 TDataMember * dm = dynamic_cast<TDataMember*>(obj);
78 fData.push_back(dm);
79 }
80 }
81
82 fPRealData.reserve(100);
83 class DepClassDedup {
84 std::vector<TString> &fDepClasses;
85 std::unordered_map<std::string, int> fDepClassIdx;
86 public:
87 DepClassDedup(std::vector<TString> &depClasses): fDepClasses(depClasses)
88 {
89 R__ASSERT(fDepClasses.empty() && "Expected fDepClasses to be empty before fililng it!");
90 }
91
93 {
94 if (fDepClasses.size() != fDepClassIdx.size())
95 ::Error("TProtoClass::DepClassDedup::~DepClassDedup",
96 "Mismatching size of fDepClasses and index map! Please report.");
97 }
98
99 int GetIdx(const char *name) {
100 auto itins = fDepClassIdx.insert({name, fDepClasses.size()});
101 if (itins.second) {
102 fDepClasses.emplace_back(name);
103 }
104 return itins.first->second;
105 }
107
108 if (!cl->GetCollectionProxy()) {
109 // Build the list of RealData before we access it:
110 cl->BuildRealData(nullptr, true /*isTransient*/);
111 // The data members are ordered as follows:
112 // - this class's data members,
113 // - foreach base: base class's data members.
114 for (auto realDataObj: *cl->GetListOfRealData()) {
116 if (!rd->GetDataMember())
117 continue;
119
120 if (TClass* clRD = rd->GetDataMember()->GetClass())
121 protoRealData.fClassIndex = depClassDedup.GetIdx(clRD->GetName());
122
124
125 fPRealData.emplace_back(protoRealData);
126 }
127
128 // if (gDebug > 2) {
129 // for (const auto &data : fPRealData) {
130 // const auto classType = dataPtr->IsA();
131 // const auto dataName = data.fName;
132 // const auto dataClass = data.fClass;
133 // Info("TProtoClass","Data is a protorealdata: %s - class %s - transient %d", dataName.Data(),dataClass.Data(),data.fIsTransient);
134 //if (!dataClass.IsNull()
135 // if (classType == TProtoRealData::Class())
136 // Info("TProtoClass","Data is a protorealdata: %s", dataPtrName);
137 // if (classType == TObjString::Class())
138 // Info("TProtoClass","Data is a objectstring: %s", dataPtrName);
139 // if (dataPtr->TestBit(TRealData::kTransient))
140 // Info("TProtoClass","And is transient");
141 // }
142 // }
144 // The collection proxy is emulated has the wrong size.
145 if (cl->HasInterpreterInfo())
147 else
148 fSizeof = -1;
149 }
150
153}
154
155
156////////////////////////////////////////////////////////////////////////////////
157/// Destructor.
158
163
164////////////////////////////////////////////////////////////////////////////////
165/// Delete the containers that are usually owned by their TClass.
166/// if (fPRealData) fPRealData->Delete(opt);
167/// delete fPRealData; fPRealData = 0;
168
169void TProtoClass::Delete(Option_t* opt /*= ""*/)
170{
171 if (fOwner && fBase) {
172 fBase->Delete(opt);
173 delete fBase; fBase = nullptr;
174 }
175
176 if (fOwner)
177 for (auto dm: fData)
178 delete dm;
179 fData.clear();
180
181 if (fOwner && fEnums) {
182 fEnums->Delete(opt);
183 delete fEnums; fEnums = nullptr;
184 }
185
186 if (gErrorIgnoreLevel==-2) printf("Delete the protoClass %s \n",GetName());
187}
188
189////////////////////////////////////////////////////////////////////////////////
190/// Move data from this TProtoClass into cl.
191/// Returns 'false' if nothing was done. This can happen in the case where
192/// there is more than one dictionary for the same entity. Note having
193/// duplicate dictionary is acceptable for namespace or STL collections.
194
196 if (cl->fRealData || cl->fBase.load() || cl->fData.load() || cl->fEnums.load() || cl->fCanSplit >= 0 ||
197 cl->fProperty != (-1)) {
198
200 // The class has dictionary, has gone through some initialization and is now being requested
201 // to be filled by a TProtoClass.
202 // This can be due to:
203 // (a) A duplicate dictionary for a class (with or without a rootpcm associated with)
204 // (b) The TClass was created before the registration of the rootpcm ** and ** it was
205 // attempted to be used before this registration
206
207 // This is technically an error
208 // but we either already warned that there is a 2nd dictionary for the class (in TClassTable::Add)
209 // or this is the same (but now emptied) TProtoClass instance as before.
210 // We return false, since we are doing no actual change to the TClass instance and thus
211 // if a caller was hoping for 'improvement' in the state of the TClass instance, it did not
212 // happen.
213 return kFALSE;
214
215 if (cl->GetCollectionType() != ROOT::kNotSTL) {
216 // We are in the case of collection, duplicate dictionary are allowed
217 // (and even somewhat expected since they can be auto asked for).
218 // They do not always have a TProtoClass for them. In particular
219 // the one that are pre-generated in the ROOT build (in what was once
220 // called the cintdlls) do not have a pcms, neither does vector<string>
221 // which is part of libCore proper.
222 if (gDebug > 0)
223 Info("FillTClass", "Returning w/o doing anything. %s is a STL collection.",cl->GetName());
224 return kFALSE;
225 }
226 if (cl->fProperty != -1 && (cl->fProperty & kIsNamespace)) {
227 if (gDebug > 0)
228 Info("FillTClass", "Returning w/o doing anything. %s is a namespace.",cl->GetName());
229 return kFALSE;
230 }
231 Error("FillTClass", "TClass %s already initialized!", cl->GetName());
232 return kFALSE;
233 }
234 if (cl->fHasRootPcmInfo) {
235 Fatal("FillTClass", "Filling TClass %s a second time but none of the info is in the TClass instance ... ", cl->GetName());
236 }
237 if (gDebug > 1) Info("FillTClass","Loading TProtoClass for %s - %s",cl->GetName(),GetName());
238
239 if (fPRealData.size() > 0) {
240
241 // A first loop to retrieve the mother classes before starting to
242 // fill this TClass instance. This is done in order to avoid recursions
243 // for example in presence of daughter and mother class present in two
244 // dictionaries compiled in two different libraries which are not linked
245 // one with each other.
246 for (auto &element : fPRealData) {
247 // if (element->IsA() == TObjString::Class()) {
248 if (element.IsAClass() ) {
249 if (gDebug > 1) Info("","Treating beforehand mother class %s",GetClassName(element.fClassIndex));
251
253 }
254 }
255 }
256
257
258 //this->Dump();
259
260 // Copy only the TClass bits.
261 // not bit 13 and below and not bit 24 and above, just Bits 14 - 23
262 UInt_t newbits = TestBits(0x00ffc000);
263 cl->ResetBit(0x00ffc000);
264 cl->SetBit(newbits);
265
266 cl->fName = this->fName;
267 cl->fTitle = this->fTitle;
268 cl->fBase = fBase;
269 fBase = nullptr;
270
271 // fill list of data members in TClass
272 //if (cl->fData) { cl->fData->Delete(); delete cl->fData; }
273 cl->fData = new TListOfDataMembers(fData);
274 // for (auto * dataMember : fData) {
275 // //printf("add data member for class %s - member %s \n",GetName(), dataMember->GetName() );
276 // cl->fData->Add(dataMember);
277 // }
278 // // set loaded bit to true to avoid re-loading the data members
279 // cl->fData->SetIsLoaded();*
280
281 //cl->fData = (TListOfDataMembers*)fData;
282
283 // The TDataMember were passed along.
284 fData.clear();
285
286 // We need to fill enums one by one to initialise the internal map which is
287 // transient
288 {
289 auto temp = cl->fEnums.load() ? cl->fEnums.load() :
291 if (fEnums) {
292 for (TObject* enumAsTObj : *fEnums){
293 temp->Add((TEnum*) enumAsTObj);
294 }
295 // We did not transfer the container itself, let remove it from memory without deleting its content.
296 fEnums->Clear();
297 delete fEnums;
298 fEnums = nullptr;
299 }
300 cl->fEnums = temp;
301 }
302
303 if (cl->fSizeof != -1 && cl->fSizeof != fSizeof) {
304 Error("FillTClass",
305 "For %s the sizeof provided by GenerateInitInstance (%d) is different from the one provided by TProtoClass (%d)",
306 cl->GetName(), cl->fSizeof, fSizeof);
307 } else
308 cl->fSizeof = fSizeof;
309 cl->fCheckSum = fCheckSum;
310 cl->fCanSplit = fCanSplit;
311 cl->fProperty = fProperty;
313
314 // Update pointers to TClass
315 if (cl->fBase.load()) {
316 for (auto base: *cl->fBase) {
317 ((TBaseClass*)base)->SetClass(cl);
318 }
319 }
320 if (cl->fData) {
321 for (auto dm: *cl->fData) {
322 ((TDataMember*)dm)->SetClass(cl);
323 }
324 ((TListOfDataMembers*)cl->fData)->SetClass(cl);
325 }
326 if (cl->fEnums.load()) {
327 for (auto en: *cl->fEnums) {
328 ((TEnum*)en)->SetClass(cl);
329 }
330 ((TListOfEnums*)cl->fEnums)->SetClass(cl);
331 }
332
333
335 TRealData * prevRealData = nullptr;
336 int prevLevel = 0;
337 bool first = true;
338 if (fPRealData.size() > 0) {
339 size_t element_next_idx = 0;
340 for (auto &element : fPRealData) {
342 //if (element->IsA() == TObjString::Class()) {
343 if (element.IsAClass() ) {
344 // We now check for the TClass entry, w/o loading. Indeed we did that above.
345 // If the class is not found, it means that really it was not selected and we
346 // replace it with an empty placeholder with the status of kForwardDeclared.
347 // Interactivity will be of course possible but if IO is attempted, a warning
348 // will be issued.
350
351 const char *classname = GetClassName(element.fClassIndex);
352
353 // Disable autoparsing which might be triggered by the use of ResolvedTypedef
354 // and the fallback new TClass() below.
355 currentRDClass = TClass::GetClass(classname, false /* Load */ );
356 //printf("element is a class - name %s - index %d %s \n ",currentRDClass->GetName(), element.fClassIndex, GetClassName(element.fClassIndex) );
358
359 if (TClassEdit::IsStdPair(classname) && element.fDMIndex == 0 && fPRealData.size() > element_next_idx) {
360 size_t hint_offset = fPRealData[element_next_idx].fOffset - element.fOffset;
361 size_t hint_size = 0;
362 // Now find the size.
363 size_t end = element_next_idx + 1;
364 while (end < fPRealData.size() && fPRealData[end].fLevel > element.fLevel)
365 ++end;
366 if (end < fPRealData.size()) {
367 hint_size = fPRealData[end].fOffset - element.fOffset;
368 } else {
369 hint_size = fSizeof - element.fOffset;
370 }
371 currentRDClass = TClass::GetClass(classname, true, false, hint_offset, hint_size);
372 }
373 if (!currentRDClass) {
374 if (gDebug > 1)
375 Info("FillTClass()",
376 "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.", classname);
377 currentRDClass = new TClass(classname, 1, TClass::kForwardDeclared, true /*silent*/);
378 }
379 }
380 }
381 //else {
382 if (!currentRDClass) continue;
383 //TProtoRealData* prd = (TProtoRealData*)element;
384 // pass a previous real data only if depth
385
387 if (first) {
388 //LM: need to do here because somehow fRealData is destroyed when calling TClass::GetListOfDataMembers()
389 if (cl->fRealData) {
390 Info("FillTClass","Real data for class %s is not empty - make a new one",cl->GetName() );
391 delete cl->fRealData;
392 }
393 cl->fRealData = new TList(); // FIXME: this should really become a THashList!
394 first = false;
395 }
396
397 cl->fRealData->AddLast(rd);
399 prevLevel = element.fLevel;
400
401 }
402 //}
403 }
404 }
405 else {
406 if (cl->fRealData) {
407 Info("FillTClas","Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->GetName() );
408 delete cl->fRealData;
409 }
410 cl->fRealData = new TList(); // FIXME: this should really become a THashList!
411 }
412
414
415 // set to zero in order not to delete when protoclass is deleted
416 fBase = nullptr;
417 //fData = 0;
418 fEnums = nullptr;
419
420 fPRealData.clear();
421 fPRealData.shrink_to_fit(); // to reset the underlying allocate space
422
423 // if (fPRealData) fPRealData->Delete();
424 // delete fPRealData;
425 // fPRealData = 0;
426
428 return kTRUE;
429}
430
431////////////////////////////////////////////////////////////////////////////////
432
434 //TNamed(rd->GetDataMember()->GetName(), rd->GetName()),
435 //TNamed(),
436 //fName(rd->GetDataMember()->GetName()),
437 //fTitle(rd->GetName()),
438 fOffset(rd->GetThisOffset()),
439 fDMIndex(-1),
440 fLevel(0),
441 fClassIndex(-1),
442 fStatusFlag(0)
443{
444 TDataMember * dm = rd->GetDataMember();
445 assert(rd->GetDataMember());
446 TClass * cl = dm->GetClass();
447 assert(cl != nullptr);
448 fDMIndex = DataMemberIndex(cl,dm->GetName());
449 //printf("Index of data member %s for class %s is %d \n",dm->GetName(), cl->GetName() , fDMIndex);
450 TString fullDataMemberName = rd->GetName(); // full data member name (e.g. fXaxis.fNbins)
451 fLevel = fullDataMemberName.CountChar('.');
452
453 if (fullDataMemberName.Contains("*") ) SetFlag(kIsPointer);
454
455 // Initialize this from a TRealData object.
456 SetFlag(kIsObject, rd->IsObject());
458}
459
460////////////////////////////////////////////////////////////////////////////////
461/// Destructor to pin vtable.
462///if (gErrorIgnoreLevel==-2) printf("destroy real data %s - ",GetName());
463
467
468////////////////////////////////////////////////////////////////////////////////
469/// \brief Create a TRealData from this, with its data member coming from dmClass.
470/// find data member from protoclass
471///
472/// \return the created TRealData
473///
474/// \param [in] dmClass Class where the data member is declared
475/// \param [in] parent Parent class
476/// \param [in] prevData the previous 'real' data member (might be part of another class)
477/// \param [in] prevLevel nesting level
478/// \param [in] quiet Whether we should not warn about missing information (usually set to true for transient members)
479
481 TClass* parent, TRealData *prevData, int prevLevel, bool quiet) const
482{
483
484 //TDataMember* dm = (TDataMember*)dmClass->GetListOfDataMembers()->FindObject(fName);
486
487 if (!dm && dmClass->GetState()!=TClass::kForwardDeclared && !dmClass->fIsSyntheticPair) {
488 ::Error("CreateRealData",
489 "Cannot find data member # %d of class %s for parent %s!", fDMIndex, dmClass->GetName(),
490 parent->GetName());
491 return nullptr;
492 }
493
494 // here I need to re-construct the realdata full name (e.g. fAxis.fNbins)
495
497 // keep an empty name if data member is not found
498 if (dm) realMemberName = dm->GetName();
499 else if (dmClass->fIsSyntheticPair) {
500 realMemberName = (fDMIndex == 0) ? "first" : "second";
501 }
502 if (TestFlag(kIsPointer) )
504 else if (dm){
505 if (dm->GetArrayDim() > 0) {
506 // in case of array (like fMatrix[2][2] we need to add max index )
507 // this only in case of it os not a pointer
508 for (int idim = 0; idim < dm->GetArrayDim(); ++idim)
510 } else if (TClassEdit::IsStdArray(dm->GetTypeName())) {
511 std::string typeNameBuf;
512 Int_t ndim = dm->GetArrayDim();
513 std::array<Int_t, 5> maxIndices; // 5 is the maximum supported in TStreamerElement::SetMaxIndex
517 ndim);
518 for (Int_t idim = 0; idim < ndim; ++idim) {
520 }
521 }
522 }
523
524 if (prevData && fLevel > 0 ) {
525 if (fLevel-prevLevel == 1) // I am going down 1 level
526 realMemberName = TString::Format("%s.%s",prevData->GetName(), realMemberName.Data() );
527 else if (fLevel <= prevLevel) { // I am at the same level
528 // need to strip out prev name
529 std::string prevName = prevData->GetName();
530 // we strip the prev data member name from the full name
531 std::string parentName;
532 for (int i = 0; i < prevLevel-fLevel+1; ++i) {
533 parentName = prevName.substr(0, prevName.find_last_of(".") );
535 }
536
537 // now we need to add the current name
538 realMemberName = TString::Format("%s.%s",parentName.c_str(), realMemberName.Data() );
539 }
540 }
541
542 //printf("adding new realdata for class %s : %s - %s %d %d \n",dmClass->GetName(), realMemberName.Data(), dm->GetName(),fLevel, fDMIndex );
543
544 TRealData* rd = new TRealData(realMemberName, fOffset, dm);
545 if (TestFlag(kIsTransient)) {
546 rd->SetBit(TRealData::kTransient);
547 }
548 rd->SetIsObject(TestFlag(kIsObject) );
549 return rd;
550}
551
552////////////////////////////////////////////////////////////////////////////////
553
555{
557
558 // we cannot use IndexOf because order is guaranteed only for non-static data member
559 Int_t index = 0;
560 for ( auto * obj : *dmList) {
561 TDataMember * dm = (TDataMember *) obj;
562 if (!dm ) continue;
563 if (dm->Property() & kIsStatic) continue;
564 if ( TString(dm->GetName()) == TString(name) )
565 return index;
566 index++;
567 }
568 ::Error("TProtoClass::DataMemberIndex","data member %s is not found in class %s",name, cl->GetName());
569 dmList->ls();
570 return -1;
571}
572////////////////////////////////////////////////////////////////////////////////
573////////////////////////////////////////////////////////////////////////////////
574/// \brief Find the requested TDataMember
575///
576/// \return the requested TDataMember if found
577///
578/// \param [in] cl TClass to search for the data member
579/// \param [in] index Numerical index of the object's data member
580/// \param [in] quiet Whether we should not warn about missing information (usually set to true for transient members)
581
583{
584 TList * dmList = cl->GetListOfDataMembers(false);
585
586 // we cannot use IndexOf because order is guaranteed only for non-static data member
587 Int_t i = 0;
588 for ( auto * obj : *dmList) {
589 TDataMember * dm = (TDataMember *) obj;
590 if (!dm ) continue;
591 if (dm->Property() & kIsStatic) continue;
592 if (i == index)
593 return dm;
594 i++;
595 }
597 ::Error("TProtoClass::FindDataMember","data member with index %d is not found in class %s",index,cl->GetName());
598 return nullptr;
599}
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
static bool IsFromRootCling()
Definition TClass.cxx:174
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kIsPointer
Definition TDictionary.h:78
@ kIsStatic
Definition TDictionary.h:80
@ kIsNamespace
Definition TDictionary.h:95
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Definition TError.h:125
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:185
Int_t gErrorIgnoreLevel
Error handling routines.
Definition TError.cxx:31
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char name[80]
Definition TGX11.cxx:110
R__EXTERN TInterpreter * gCling
#define gInterpreter
static bool IsFromRootCling()
Int_t gDebug
Definition TROOT.cxx:597
Each class (see TClass) has a linked list of its base class(es).
Definition TBaseClass.h:33
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
EState GetState() const
Definition TClass.h:495
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
Definition TClass.cxx:2991
EState fState
cached of the streaming method to use
Definition TClass.h:280
TList * fRealData
Definition TClass.h:203
std::atomic< TList * > fBase
Definition TClass.h:204
std::atomic< Char_t > fCanSplit
Definition TClass.h:248
Bool_t fIsSyntheticPair
Indicates whether this class can be split or not. Values are -1, 0, 1, 2.
Definition TClass.h:253
std::atomic< UInt_t > fCheckSum
Definition TClass.h:222
std::atomic< TListOfEnums * > fEnums
Definition TClass.h:208
Bool_t HasInterpreterInfo() const
Definition TClass.h:417
std::atomic< Long_t > fProperty
Definition TClass.h:258
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition TClass.cxx:2136
void SetStreamerImpl(Int_t streamerType)
Internal routine to set fStreamerImpl based on the value of fStreamerType.
Definition TClass.cxx:6345
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Definition TClass.cxx:3884
TList * GetListOfRealData() const
Definition TClass.h:460
Longptr_t fOffsetStreamer
Properties that can only be evaluated at run-time.
Definition TClass.h:278
Int_t fSizeof
Definition TClass.h:246
std::atomic< TListOfDataMembers * > fData
Definition TClass.h:205
ClassInfo_t * GetClassInfo() const
Definition TClass.h:440
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Definition TClass.cxx:3002
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Definition TClass.cxx:2288
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Definition TClass.cxx:6212
@ kHasTClassInit
Definition TClass.h:130
@ kForwardDeclared
Definition TClass.h:127
Long_t fClassProperty
Property See TClass::Property() for details.
Definition TClass.h:259
std::atomic< Bool_t > fHasRootPcmInfo
C++ Property of the class (is abstract, has virtual table, etc.)
Definition TClass.h:262
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:3073
All ROOT classes may have RTTI (run time type identification) support added.
Definition TDataMember.h:31
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
Int_t GetArrayDim() const
Return number of array dimensions.
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
TClass * GetClass() const
Definition TDataMember.h:75
The TEnum class implements the enum type.
Definition TEnum.h:33
virtual int ClassInfo_Size(ClassInfo_t *) const
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A doubly linked list.
Definition TList.h:38
void Clear(Option_t *option="") override
Remove all objects from the list.
Definition TList.cxx:400
void AddLast(TObject *obj) override
Add object at the end of the list.
Definition TList.cxx:150
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
Definition TList.cxx:468
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
TString fTitle
Definition TNamed.h:33
TString fName
Definition TNamed.h:32
Mother of all ROOT objects.
Definition TObject.h:41
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:864
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1071
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition TObject.cxx:1099
Int_t TestBits(UInt_t f) const
Definition TObject.h:206
void ResetBit(UInt_t f)
Definition TObject.h:204
Bool_t FillTClass(TClass *pcl)
Move data from this TProtoClass into cl.
virtual ~TProtoClass()
Destructor.
const char * GetClassName(Int_t index) const
Definition TProtoClass.h:90
Long_t fClassProperty
Definition TProtoClass.h:83
Long_t fOffsetStreamer
Definition TProtoClass.h:84
std::vector< TDataMember * > fData
Definition TProtoClass.h:76
TList * fEnums
Definition TProtoClass.h:74
UInt_t fCheckSum
Definition TProtoClass.h:79
Int_t fCanSplit
Definition TProtoClass.h:80
std::vector< TProtoRealData > fPRealData
Definition TProtoClass.h:75
Long_t fProperty
Definition TProtoClass.h:82
Int_t fSizeof
Definition TProtoClass.h:78
void Delete(Option_t *opt="") override
Delete the containers that are usually owned by their TClass.
std::vector< TString > fDepClasses
Definition TProtoClass.h:77
static TDataMember * FindDataMember(TClass *cl, Int_t index, bool quiet)
Find the requested TDataMember.
TList * fBase
Definition TProtoClass.h:73
static Int_t DataMemberIndex(TClass *cl, const char *name)
Int_t fStreamerType
Definition TProtoClass.h:81
The TRealData class manages the effective list of all data members for a given class.
Definition TRealData.h:30
Basic string class.
Definition TString.h:139
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:2378
virtual Int_t GetProperties() const
Return miscallenous properties of the proxy (see TVirtualCollectionProxy::EProperty)
std::ostream & Info()
Definition hadd.cxx:171
@ kNotSTL
Definition ESTLType.h:29
bool IsStdArray(std::string_view name)
Definition TClassEdit.h:183
bool IsStdPair(std::string_view name)
Definition TClassEdit.h:184
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
void SetFlag(UInt_t f, Bool_t on=kTRUE)
Definition TProtoClass.h:62
TRealData * CreateRealData(TClass *currentClass, TClass *parent, TRealData *parentData, int prevLevel, bool quiet) const
Create a TRealData from this, with its data member coming from dmClass.
virtual ~TProtoRealData()
Destructor to pin vtable.