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/// The caller of this function should be holding the ROOT Write lock.
195
197 if (cl->fRealData || cl->fBase.load() || cl->fData.load() || cl->fEnums.load() || cl->fCanSplit >= 0 ||
198 cl->fProperty != (-1)) {
199
201 // The class has dictionary, has gone through some initialization and is now being requested
202 // to be filled by a TProtoClass.
203 // This can be due to:
204 // (a) A duplicate dictionary for a class (with or without a rootpcm associated with)
205 // (b) The TClass was created before the registration of the rootpcm ** and ** it was
206 // attempted to be used before this registration
207
208 // This is technically an error
209 // but we either already warned that there is a 2nd dictionary for the class (in TClassTable::Add)
210 // or this is the same (but now emptied) TProtoClass instance as before.
211 // We return false, since we are doing no actual change to the TClass instance and thus
212 // if a caller was hoping for 'improvement' in the state of the TClass instance, it did not
213 // happen.
214 return kFALSE;
215
216 if (cl->GetCollectionType() != ROOT::kNotSTL) {
217 // We are in the case of collection, duplicate dictionary are allowed
218 // (and even somewhat expected since they can be auto asked for).
219 // They do not always have a TProtoClass for them. In particular
220 // the one that are pre-generated in the ROOT build (in what was once
221 // called the cintdlls) do not have a pcms, neither does vector<string>
222 // which is part of libCore proper.
223 if (gDebug > 0)
224 Info("FillTClass", "Returning w/o doing anything. %s is a STL collection.",cl->GetName());
225 return kFALSE;
226 }
227 if (cl->fProperty != -1 && (cl->fProperty & kIsNamespace)) {
228 if (gDebug > 0)
229 Info("FillTClass", "Returning w/o doing anything. %s is a namespace.",cl->GetName());
230 return kFALSE;
231 }
232 Error("FillTClass", "TClass %s already initialized!", cl->GetName());
233 return kFALSE;
234 }
235 if (cl->fHasRootPcmInfo) {
236 Fatal("FillTClass", "Filling TClass %s a second time but none of the info is in the TClass instance ... ", cl->GetName());
237 }
238 if (gDebug > 1) Info("FillTClass","Loading TProtoClass for %s - %s",cl->GetName(),GetName());
239
240 if (fPRealData.size() > 0) {
241
242 // A first loop to retrieve the mother classes before starting to
243 // fill this TClass instance. This is done in order to avoid recursions
244 // for example in presence of daughter and mother class present in two
245 // dictionaries compiled in two different libraries which are not linked
246 // one with each other.
247 for (auto &element : fPRealData) {
248 // if (element->IsA() == TObjString::Class()) {
249 if (element.IsAClass() ) {
250 if (gDebug > 1) Info("","Treating beforehand mother class %s",GetClassName(element.fClassIndex));
252
254 }
255 }
256 }
257
258
259 //this->Dump();
260
261 // Copy only the TClass bits.
262 // not bit 13 and below and not bit 24 and above, just Bits 14 - 23
263 UInt_t newbits = TestBits(0x00ffc000);
264 cl->ResetBit(0x00ffc000);
265 cl->SetBit(newbits);
266
267 cl->fName = this->fName;
268 cl->fTitle = this->fTitle;
269 cl->fBase = fBase;
270 fBase = nullptr;
271
272 // fill list of data members in TClass
273 //if (cl->fData) { cl->fData->Delete(); delete cl->fData; }
274 cl->fData = new TListOfDataMembers(fData);
275 // for (auto * dataMember : fData) {
276 // //printf("add data member for class %s - member %s \n",GetName(), dataMember->GetName() );
277 // cl->fData->Add(dataMember);
278 // }
279 // // set loaded bit to true to avoid re-loading the data members
280 // cl->fData->SetIsLoaded();*
281
282 //cl->fData = (TListOfDataMembers*)fData;
283
284 // The TDataMember were passed along.
285 fData.clear();
286
287 // We need to fill enums one by one to initialise the internal map which is
288 // transient
289 {
290 auto temp = cl->fEnums.load() ? cl->fEnums.load() :
292 if (fEnums) {
293 for (TObject* enumAsTObj : *fEnums){
294 temp->Add((TEnum*) enumAsTObj);
295 }
296 // We did not transfer the container itself, let remove it from memory without deleting its content.
297 fEnums->Clear();
298 delete fEnums;
299 fEnums = nullptr;
300 }
301 cl->fEnums = temp;
302 }
303
304 if (cl->fSizeof != -1 && cl->fSizeof != fSizeof) {
305 Error("FillTClass",
306 "For %s the sizeof provided by GenerateInitInstance (%d) is different from the one provided by TProtoClass (%d)",
307 cl->GetName(), cl->fSizeof, fSizeof);
308 } else
309 cl->fSizeof = fSizeof;
310 cl->fCheckSum = fCheckSum;
311 cl->fCanSplit = fCanSplit;
312 cl->fProperty = fProperty;
314
315 // Update pointers to TClass
316 if (cl->fBase.load()) {
317 for (auto base: *cl->fBase) {
318 ((TBaseClass*)base)->SetClass(cl);
319 }
320 }
321 if (cl->fData) {
322 for (auto dm: *cl->fData) {
323 ((TDataMember*)dm)->SetClass(cl);
324 }
325 ((TListOfDataMembers*)cl->fData)->SetClass(cl);
326 }
327 if (cl->fEnums.load()) {
328 for (auto en: *cl->fEnums) {
329 ((TEnum*)en)->SetClass(cl);
330 }
331 ((TListOfEnums*)cl->fEnums)->SetClass(cl);
332 }
333
334
336 TRealData * prevRealData = nullptr;
337 int prevLevel = 0;
338 bool first = true;
339 if (fPRealData.size() > 0) {
340 size_t element_next_idx = 0;
341 for (auto &element : fPRealData) {
343 //if (element->IsA() == TObjString::Class()) {
344 if (element.IsAClass() ) {
345 // We now check for the TClass entry, w/o loading. Indeed we did that above.
346 // If the class is not found, it means that really it was not selected and we
347 // replace it with an empty placeholder with the status of kForwardDeclared.
348 // Interactivity will be of course possible but if IO is attempted, a warning
349 // will be issued.
351
352 const char *classname = GetClassName(element.fClassIndex);
353
354 // Disable autoparsing which might be triggered by the use of ResolvedTypedef
355 // and the fallback new TClass() below.
356 currentRDClass = TClass::GetClass(classname, false /* Load */ );
357 //printf("element is a class - name %s - index %d %s \n ",currentRDClass->GetName(), element.fClassIndex, GetClassName(element.fClassIndex) );
359
360 if (TClassEdit::IsStdPair(classname) && element.fDMIndex == 0 && fPRealData.size() > element_next_idx) {
361 size_t hint_offset = fPRealData[element_next_idx].fOffset - element.fOffset;
362 size_t hint_size = 0;
363 // Now find the size.
364 size_t end = element_next_idx + 1;
365 while (end < fPRealData.size() && fPRealData[end].fLevel > element.fLevel)
366 ++end;
367 if (end < fPRealData.size()) {
368 hint_size = fPRealData[end].fOffset - element.fOffset;
369 } else {
370 hint_size = fSizeof - element.fOffset;
371 }
372 currentRDClass = TClass::GetClass(classname, true, false, hint_offset, hint_size);
373 }
374 if (!currentRDClass) {
375 if (gDebug > 1)
376 Info("FillTClass()",
377 "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.", classname);
378 currentRDClass = new TClass(classname, 1, TClass::kForwardDeclared, true /*silent*/);
379 }
380 }
381 }
382 //else {
383 if (!currentRDClass) continue;
384 //TProtoRealData* prd = (TProtoRealData*)element;
385 // pass a previous real data only if depth
386
388 if (first) {
389 //LM: need to do here because somehow fRealData is destroyed when calling TClass::GetListOfDataMembers()
390 if (cl->fRealData) {
391 Info("FillTClass","Real data for class %s is not empty - make a new one",cl->GetName() );
392 delete cl->fRealData;
393 }
394 cl->fRealData = new TList(); // FIXME: this should really become a THashList!
395 first = false;
396 }
397
398 cl->fRealData->AddLast(rd);
400 prevLevel = element.fLevel;
401
402 }
403 //}
404 }
405 }
406 else {
407 if (cl->fRealData) {
408 Info("FillTClas","Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->GetName() );
409 delete cl->fRealData;
410 }
411 cl->fRealData = new TList(); // FIXME: this should really become a THashList!
412 }
413
415
416 // set to zero in order not to delete when protoclass is deleted
417 fBase = nullptr;
418 //fData = 0;
419 fEnums = nullptr;
420
421 fPRealData.clear();
422 fPRealData.shrink_to_fit(); // to reset the underlying allocate space
423
424 // if (fPRealData) fPRealData->Delete();
425 // delete fPRealData;
426 // fPRealData = 0;
427
429 return kTRUE;
430}
431
432////////////////////////////////////////////////////////////////////////////////
433
435 //TNamed(rd->GetDataMember()->GetName(), rd->GetName()),
436 //TNamed(),
437 //fName(rd->GetDataMember()->GetName()),
438 //fTitle(rd->GetName()),
439 fOffset(rd->GetThisOffset()),
440 fDMIndex(-1),
441 fLevel(0),
442 fClassIndex(-1),
443 fStatusFlag(0)
444{
445 TDataMember * dm = rd->GetDataMember();
446 assert(rd->GetDataMember());
447 TClass * cl = dm->GetClass();
448 assert(cl != nullptr);
449 fDMIndex = DataMemberIndex(cl,dm->GetName());
450 //printf("Index of data member %s for class %s is %d \n",dm->GetName(), cl->GetName() , fDMIndex);
451 TString fullDataMemberName = rd->GetName(); // full data member name (e.g. fXaxis.fNbins)
452 fLevel = fullDataMemberName.CountChar('.');
453
454 if (fullDataMemberName.Contains("*") ) SetFlag(kIsPointer);
455
456 // Initialize this from a TRealData object.
457 SetFlag(kIsObject, rd->IsObject());
459}
460
461////////////////////////////////////////////////////////////////////////////////
462/// Destructor to pin vtable.
463///if (gErrorIgnoreLevel==-2) printf("destroy real data %s - ",GetName());
464
468
469////////////////////////////////////////////////////////////////////////////////
470/// \brief Create a TRealData from this, with its data member coming from dmClass.
471/// find data member from protoclass
472///
473/// \return the created TRealData
474///
475/// \param [in] dmClass Class where the data member is declared
476/// \param [in] parent Parent class
477/// \param [in] prevData the previous 'real' data member (might be part of another class)
478/// \param [in] prevLevel nesting level
479/// \param [in] quiet Whether we should not warn about missing information (usually set to true for transient members)
480
482 TClass* parent, TRealData *prevData, int prevLevel, bool quiet) const
483{
484
485 //TDataMember* dm = (TDataMember*)dmClass->GetListOfDataMembers()->FindObject(fName);
487
488 if (!dm && dmClass->GetState()!=TClass::kForwardDeclared && !dmClass->fIsSyntheticPair) {
489 ::Error("CreateRealData",
490 "Cannot find data member # %d of class %s for parent %s!", fDMIndex, dmClass->GetName(),
491 parent->GetName());
492 return nullptr;
493 }
494
495 // here I need to re-construct the realdata full name (e.g. fAxis.fNbins)
496
498 // keep an empty name if data member is not found
499 if (dm) realMemberName = dm->GetName();
500 else if (dmClass->fIsSyntheticPair) {
501 realMemberName = (fDMIndex == 0) ? "first" : "second";
502 }
503 if (TestFlag(kIsPointer) )
505 else if (dm){
506 if (dm->GetArrayDim() > 0) {
507 // in case of array (like fMatrix[2][2] we need to add max index )
508 // this only in case of it os not a pointer
509 for (int idim = 0; idim < dm->GetArrayDim(); ++idim)
511 } else if (TClassEdit::IsStdArray(dm->GetTypeName())) {
512 std::string typeNameBuf;
513 Int_t ndim = dm->GetArrayDim();
514 std::array<Int_t, 5> maxIndices; // 5 is the maximum supported in TStreamerElement::SetMaxIndex
518 ndim);
519 for (Int_t idim = 0; idim < ndim; ++idim) {
521 }
522 }
523 }
524
525 if (prevData && fLevel > 0 ) {
526 if (fLevel-prevLevel == 1) // I am going down 1 level
527 realMemberName = TString::Format("%s.%s",prevData->GetName(), realMemberName.Data() );
528 else if (fLevel <= prevLevel) { // I am at the same level
529 // need to strip out prev name
530 std::string prevName = prevData->GetName();
531 // we strip the prev data member name from the full name
532 std::string parentName;
533 for (int i = 0; i < prevLevel-fLevel+1; ++i) {
534 parentName = prevName.substr(0, prevName.find_last_of(".") );
536 }
537
538 // now we need to add the current name
539 realMemberName = TString::Format("%s.%s",parentName.c_str(), realMemberName.Data() );
540 }
541 }
542
543 //printf("adding new realdata for class %s : %s - %s %d %d \n",dmClass->GetName(), realMemberName.Data(), dm->GetName(),fLevel, fDMIndex );
544
545 TRealData* rd = new TRealData(realMemberName, fOffset, dm);
546 if (TestFlag(kIsTransient)) {
547 rd->SetBit(TRealData::kTransient);
548 }
549 rd->SetIsObject(TestFlag(kIsObject) );
550 return rd;
551}
552
553////////////////////////////////////////////////////////////////////////////////
554
556{
558
559 // we cannot use IndexOf because order is guaranteed only for non-static data member
560 Int_t index = 0;
561 for ( auto * obj : *dmList) {
562 TDataMember * dm = (TDataMember *) obj;
563 if (!dm ) continue;
564 if (dm->Property() & kIsStatic) continue;
565 if ( TString(dm->GetName()) == TString(name) )
566 return index;
567 index++;
568 }
569 ::Error("TProtoClass::DataMemberIndex","data member %s is not found in class %s",name, cl->GetName());
570 dmList->ls();
571 return -1;
572}
573////////////////////////////////////////////////////////////////////////////////
574////////////////////////////////////////////////////////////////////////////////
575/// \brief Find the requested TDataMember
576///
577/// \return the requested TDataMember if found
578///
579/// \param [in] cl TClass to search for the data member
580/// \param [in] index Numerical index of the object's data member
581/// \param [in] quiet Whether we should not warn about missing information (usually set to true for transient members)
582
584{
585 TList * dmList = cl->GetListOfDataMembers(false);
586
587 // we cannot use IndexOf because order is guaranteed only for non-static data member
588 Int_t i = 0;
589 for ( auto * obj : *dmList) {
590 TDataMember * dm = (TDataMember *) obj;
591 if (!dm ) continue;
592 if (dm->Property() & kIsStatic) continue;
593 if (i == index)
594 return dm;
595 i++;
596 }
598 ::Error("TProtoClass::FindDataMember","data member with index %d is not found in class %s",index,cl->GetName());
599 return nullptr;
600}
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:622
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:2992
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:2137
void SetStreamerImpl(Int_t streamerType)
Internal routine to set fStreamerImpl based on the value of fStreamerType.
Definition TClass.cxx:6362
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Definition TClass.cxx:3898
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:3003
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Definition TClass.cxx:2289
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Definition TClass.cxx:6229
@ 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:3074
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:203
void ResetBit(UInt_t f)
Definition TObject.h:201
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:177
@ kNotSTL
Definition ESTLType.h:29
bool IsStdArray(std::string_view name)
Definition TClassEdit.h:229
bool IsStdPair(std::string_view name)
Definition TClassEdit.h:230
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.