Logo ROOT  
Reference Guide
TFolder.cxx
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 02/09/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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 
13 /** \class TFolder
14 \ingroup Base
15 
16 A TFolder object is a collection of objects and folders.
17 Folders have a name and a title and are identified in the folder hierarchy
18 by a "Unix-like" naming mechanism. The root of all folders is //root.
19 New folders can be dynamically added or removed to/from a folder.
20 The folder hierarchy can be visualized via the TBrowser.
21 
22 \image html base_browser.png
23 
24 The Root folders hierarchy can be seen as a whiteboard where objects
25 are posted. Other classes/tasks can access these objects by specifying
26 only a string pathname. This whiteboard facility greatly improves the
27 modularity of an application, minimizing the class relationship problem
28 that penalizes large applications.
29 
30 Pointers are efficient to communicate between classes.
31 However, one has interest to minimize direct coupling between classes
32 in the form of direct pointers. One better uses the naming and search
33 service provided by the Root folders hierarchy. This makes the classes
34 loosely coupled and also greatly facilitates I/O operations.
35 In a client/server environment, this mechanism facilitates the access
36 to any kind of object in //root stores running on different processes.
37 
38 A TFolder is created by invoking the TFolder constructor. It is placed
39 inside an existing folder via the TFolder::AddFolder method.
40 One can search for a folder or an object in a folder using the FindObject
41 method. FindObject analyses the string passed as its argument and searches
42 in the hierarchy until it finds an object or folder matching the name.
43 
44 When a folder is deleted, its reference from the parent folder and
45 possible other folders is deleted.
46 
47 If a folder has been declared the owner of its objects/folders via
48 TFolder::SetOwner, then the contained objects are deleted when the
49 folder is deleted. By default, a folder does not own its contained objects.
50 
51 NOTE that folder ownership can be set
52  - via TFolder::SetOwner
53  - or via TCollection::SetOwner on the collection specified to TFolder::AddFolder
54 
55 Standard Root objects are automatically added to the folder hierarchy.
56 For example, the following folders exist:
57  //root/Files with the list of currently connected Root files
58  //root/Classes with the list of active classes
59  //root/Geometries with active geometries
60  //root/Canvases with the list of active canvases
61  //root/Styles with the list of graphics styles
62  //root/Colors with the list of active colors
63 
64 For example, if a file "myFile.root" is added to the list of files, one can
65 retrieve a pointer to the corresponding TFile object with a statement like:
66 ~~~ {.cpp}
67  TFile *myFile = (TFile*)gROOT->FindObject("//root/Files/myFile.root");
68 ~~~
69 The above statement can be abbreviated to:
70 ~~~ {.cpp}
71  TFile *myFile = (TFile*)gROOT->FindObject("/Files/myFile.root");
72 ~~~
73 or even to:
74 ~~~ {.cpp}
75  TFile *myFile = (TFile*)gROOT->FindObjectAny("myFile.root");
76 ~~~
77 In this last case, the TROOT::FindObjectAny function will scan the folder hierarchy
78 starting at //root and will return the first object named "myFile.root".
79 
80 Because a string-based search mechanism is expensive, it is recommended
81 to save the pointer to the object as a class member or local variable
82 if this pointer is used frequently or inside loops.
83 */
84 
85 #include <iostream>
86 #include "Strlen.h"
87 #include "strlcpy.h"
88 #include "TFolder.h"
89 #include "TBrowser.h"
90 #include "TList.h"
91 #include "TROOT.h"
92 #include "TClass.h"
93 #include "TError.h"
94 #include "TRegexp.h"
95 
96 static const char *gFolderD[64];
97 static Int_t gFolderLevel = -1;
98 static char gFolderPath[512];
99 
100 enum { kOwnFolderList = BIT(15) };
101 
103 
104 ////////////////////////////////////////////////////////////////////////////////
105 /// Default constructor used by the Input functions.
106 ///
107 /// This constructor should not be called by a user directly.
108 /// The normal way to create a folder is by calling TFolder::AddFolder.
109 
111 {
112  fFolders = 0;
113  fIsOwner = kFALSE;
114 }
115 
116 ////////////////////////////////////////////////////////////////////////////////
117 /// Create a normal folder.
118 /// Use Add or AddFolder to add objects or folders to this folder.
119 
120 TFolder::TFolder(const char *name, const char *title) : TNamed(name,title)
121 {
122  fFolders = new TList();
124  fIsOwner = kFALSE;
125 }
126 
127 ////////////////////////////////////////////////////////////////////////////////
128 /// Copy constructor.
129 
130 TFolder::TFolder(const TFolder &folder) : TNamed(folder),fFolders(0),fIsOwner(kFALSE)
131 {
132  ((TFolder&)folder).Copy(*this);
133 }
134 
135 ////////////////////////////////////////////////////////////////////////////////
136 /// Folder destructor. Remove all objects from its lists and delete
137 /// all its sub folders.
138 
140 {
142 
143  if (fFolders) {
144  if (fFolders->IsOwner()) {
145  fFolders->Delete();
146  }
147  if (TestBit(kOwnFolderList)) {
148  TObjLink *iter = ((TList*)fFolders)->FirstLink();
149  while (iter) {
150  TObject *obj = iter->GetObject();
151  TObjLink *next = iter->Next();
152  if (obj && obj->IsA() == TFolder::Class()) {
153  ((TList*)fFolders)->Remove(iter);
154  delete obj;
155  }
156  iter = next;
157  }
158  fFolders->Clear("nodelete");
160  }
161  }
162 
164 
165  if (gDebug)
166  std::cerr << "TFolder dtor called for "<< GetName() << std::endl;
167 }
168 
169 ////////////////////////////////////////////////////////////////////////////////
170 /// Add object to this folder. obj must be a TObject or a TFolder.
171 
173 {
174  if (obj == 0 || fFolders == 0) return;
175  obj->SetBit(kMustCleanup);
176  fFolders->Add(obj);
177 }
178 
179 ////////////////////////////////////////////////////////////////////////////////
180 /// Create a new folder and add it to the list of folders of this folder,
181 /// return a pointer to the created folder.
182 /// Note that a folder can be added to several folders.
183 ///
184 /// If collection is non NULL, the pointer fFolders is set to the existing
185 /// collection, otherwise a default collection (Tlist) is created.
186 /// Note that the folder name cannot contain slashes.
187 
188 TFolder *TFolder::AddFolder(const char *name, const char *title, TCollection *collection)
189 {
190  if (strchr(name,'/')) {
191  ::Error("TFolder::TFolder","folder name cannot contain a slash: %s", name);
192  return 0;
193  }
194  if (strlen(GetName()) == 0) {
195  ::Error("TFolder::TFolder","folder name cannot be \"\"");
196  return 0;
197  }
198  TFolder *folder = new TFolder();
199  folder->SetName(name);
200  folder->SetTitle(title);
201  if (!fFolders) {
202  fFolders = new TList(); //only true when gROOT creates its 1st folder
204  }
205  fFolders->Add(folder);
206 
207  if (collection) {
208  folder->fFolders = collection;
209  } else {
210  folder->fFolders = new TList();
211  folder->SetBit(kOwnFolderList);
212  }
213  return folder;
214 }
215 
216 ////////////////////////////////////////////////////////////////////////////////
217 /// Browse this folder.
218 
220 {
221  if (fFolders) fFolders->Browse(b);
222 }
223 
224 ////////////////////////////////////////////////////////////////////////////////
225 /// Delete all objects from a folder list.
226 
228 {
229  if (fFolders) fFolders->Clear(option);
230 }
231 
232 ////////////////////////////////////////////////////////////////////////////////
233 /// Return the full pathname corresponding to subpath name if the node is
234 /// gROOT->GetRootFolder() and return a relative path otherwise.
235 /// The returned path will be re-used by the next call to FindFullPathName().
236 
237 const char *TFolder::FindFullPathName(const char *name) const
238 {
239  TObject *obj = FindObject(name);
240  if (obj || !fFolders) {
241  gFolderLevel++;
243  if (strcmp(gFolderD[0],"root")==0) {
244  strlcpy(gFolderPath,"//root/", sizeof(gFolderPath));
245  } else {
246  gFolderPath[0] = '\0';
247  }
248  for (Int_t l = 1; l<=gFolderLevel;l++) {
249  strlcat(gFolderPath, gFolderD[l], sizeof(gFolderPath));
250  strlcat(gFolderPath, "/", sizeof(gFolderPath));
251  }
252  strlcat(gFolderPath,name, sizeof(gFolderPath));
253  gFolderLevel = -1;
254  return gFolderPath;
255  }
256  if (name[0] == '/') return 0;
257  TIter next(fFolders);
258  TFolder *folder;
259  const char *found;
260  gFolderLevel++;
262  while ((obj=next())) {
263  // For a TClass object, InheritsFrom does not check the inheritance of
264  // the object but the inheritance of the class described by the object,
265  // so we need to explicitly call IsA
266  if (obj->IsA()->InheritsFrom(TClass::Class())) continue;
267  // For any other object IsA is called by InheritsFrom
268  if (!obj->InheritsFrom(TFolder::Class())) continue;
269  folder = (TFolder*)obj;
270  found = folder->FindFullPathName(name);
271  if (found) return found;
272  }
273  gFolderLevel--;
274  return 0;
275 }
276 
277 
278 ////////////////////////////////////////////////////////////////////////////////
279 /// Return the full pathname corresponding to subpath name.
280 /// The returned path will be re-used by the next call to FindFullPathName().
281 
282 const char *TFolder::FindFullPathName(const TObject *) const
283 {
284  Error("FindFullPathname","Not yet implemented");
285  return 0;
286 }
287 
288 ////////////////////////////////////////////////////////////////////////////////
289 /// Find object in an folder.
290 
292 {
293  Error("FindObject","Not yet implemented");
294  return 0;
295 }
296 
297 ////////////////////////////////////////////////////////////////////////////////
298 /// Search object identified by name in the tree of folders inside
299 /// this folder.
300 /// Name may be of the forms:
301 ///
302 /// A. Specify a full pathname starting at the top ROOT folder
303 /// //root/xxx/yyy/name
304 ///
305 /// B. Specify a pathname starting with a single slash. //root is assumed
306 /// /xxx/yyy/name
307 ///
308 /// C. Specify a pathname relative to this folder
309 /// xxx/yyy/name
310 /// name
311 
312 TObject *TFolder::FindObject(const char *name) const
313 {
314  if (!fFolders) return 0;
315  if (name == 0) return 0;
316  if (name[0] == '/') {
317  if (name[1] == '/') {
318  if (!strstr(name,"//root/")) return 0;
319  return gROOT->GetRootFolder()->FindObject(name+7);
320  } else {
321  return gROOT->GetRootFolder()->FindObject(name+1);
322  }
323  }
324  Int_t nch = strlen(name);
325  char *cname;
326  char csname[128];
327  if (nch < (int)sizeof(csname))
328  cname = csname;
329  else
330  cname = new char[nch+1];
331  strcpy(cname, name);
332  TObject *obj;
333  char *slash = strchr(cname,'/');
334  if (slash) {
335  *slash = 0;
336  obj = fFolders->FindObject(cname);
337  if (!obj) {
338  if (nch >= (int)sizeof(csname)) delete [] cname;
339  return 0;
340  }
341  TObject *ret = obj->FindObject(slash+1);
342  if (nch >= (int)sizeof(csname)) delete [] cname;
343  return ret;
344  } else {
345  TObject *ret = fFolders->FindObject(cname);
346  if (nch >= (int)sizeof(csname)) delete [] cname;
347  return ret;
348  }
349 }
350 
351 ////////////////////////////////////////////////////////////////////////////////
352 /// Return a pointer to the first object with name starting at this folder.
353 
355 {
356  TObject *obj = FindObject(name);
357  if (obj || !fFolders) return obj;
358 
359  //if (!obj->InheritsFrom(TFolder::Class())) continue;
360  if (name[0] == '/') return 0;
361  TIter next(fFolders);
362  TFolder *folder;
363  TObject *found;
364  if (gFolderLevel >= 0) gFolderD[gFolderLevel] = GetName();
365  while ((obj=next())) {
366  if (!obj->InheritsFrom(TFolder::Class())) continue;
367  if (obj->IsA() == TClass::Class()) continue;
368  folder = (TFolder*)obj;
369  found = folder->FindObjectAny(name);
370  if (found) return found;
371  }
372  return 0;
373 }
374 
375 ////////////////////////////////////////////////////////////////////////////////
376 /// Folder ownership has been set via
377 /// - TFolder::SetOwner
378 /// - TCollection::SetOwner on the collection specified to TFolder::AddFolder
379 
381 {
382  if (!fFolders) return kFALSE;
383  return fFolders->IsOwner();
384 }
385 
386 ////////////////////////////////////////////////////////////////////////////////
387 /// List folder contents.
388 ///
389 /// If option contains "dump", the Dump function of contained objects is called.
390 ///
391 /// If option contains "print", the Print function of contained objects is called.
392 ///
393 /// By default the ls function of contained objects is called.
394 ///
395 /// Indentation is used to identify the folder tree.
396 ///
397 /// The if option contains a `<regexp>` it be used to match the name of the objects.
398 
399 void TFolder::ls(Option_t *option) const
400 {
401  if (!fFolders) return;
403  std::cout <<ClassName()<<"*\t\t"<<GetName()<<"\t"<<GetTitle()<<std::endl;
405 
406  TString opt = option;
407  Ssiz_t dump = opt.Index("dump", 0, TString::kIgnoreCase);
408  if (dump != kNPOS)
409  opt.Remove(dump, 4);
410  Ssiz_t print = opt.Index("print", 0, TString::kIgnoreCase);
411  if (print != kNPOS)
412  opt.Remove(print, 5);
413  opt = opt.Strip(TString::kBoth);
414  if (opt == "")
415  opt = "*";
416  TRegexp re(opt, kTRUE);
417 
418  TObject *obj;
419  TIter nextobj(fFolders);
420  while ((obj = (TObject *) nextobj())) {
421  TString s = obj->GetName();
422  if (s.Index(re) == kNPOS) continue;
423  if (dump != kNPOS)
424  obj->Dump();
425  if (print != kNPOS)
426  obj->Print(option);
427  obj->ls(option);
428  }
430 }
431 
432 ////////////////////////////////////////////////////////////////////////////////
433 /// Return occurence number of object in the list of objects of this folder.
434 /// The function returns the number of objects with the same name as object
435 /// found in the list of objects in this folder before object itself.
436 /// If only one object is found, return 0.
437 
438 Int_t TFolder::Occurence(const TObject *object) const
439 {
440  Int_t n = 0;
441  if (!fFolders) return 0;
442  TIter next(fFolders);
443  TObject *obj;
444  while ((obj=next())) {
445  if (strcmp(obj->GetName(),object->GetName()) == 0) n++;
446  }
447  if (n <=1) return n-1;
448  n = 0;
449  next.Reset();
450  while ((obj=next())) {
451  if (strcmp(obj->GetName(),object->GetName()) == 0) n++;
452  if (obj == object) return n;
453  }
454  return 0;
455 }
456 
457 ////////////////////////////////////////////////////////////////////////////////
458 /// Recursively remove object from a folder.
459 
461 {
462  if (fFolders) fFolders->RecursiveRemove(obj);
463 }
464 
465 ////////////////////////////////////////////////////////////////////////////////
466 /// Remove object from this folder. obj must be a TObject or a TFolder.
467 
469 {
470  if (obj == 0 || fFolders == 0) return;
471  fFolders->Remove(obj);
472 }
473 
474 ////////////////////////////////////////////////////////////////////////////////
475 /// Save all objects in this folder in filename.
476 /// Each object in this folder will have a key in the file where the name of
477 /// the key will be the name of the object.
478 
479 void TFolder::SaveAs(const char *filename, Option_t *option) const
480 {
481  if (gDirectory) gDirectory->SaveObjectAs(this,filename,option);
482 }
483 
484 ////////////////////////////////////////////////////////////////////////////////
485 /// Set ownership.
486 /// If the folder is declared owner, when the folder is deleted, all
487 /// the objects added via TFolder::Add are deleted via TObject::Delete,
488 /// otherwise TObject::Clear is called.
489 ///
490 /// NOTE that folder ownership can be set:
491 /// - via TFolder::SetOwner
492 /// - or via TCollection::SetOwner on the collection specified to TFolder::AddFolder
493 
495 {
496  if (!fFolders) fFolders = new TList();
497  fFolders->SetOwner(owner);
498 }
TObject::kMustCleanup
@ kMustCleanup
if object destructor must call RecursiveRemove()
Definition: TObject.h:60
l
auto * l
Definition: textangle.C:4
n
const Int_t n
Definition: legend1.C:16
TFolder::ls
virtual void ls(Option_t *option="") const
List folder contents.
Definition: TFolder.cxx:399
TFolder::fFolders
TCollection * fFolders
Definition: TFolder.h:33
TBrowser
Definition: TBrowser.h:37
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
TCollection::Clear
virtual void Clear(Option_t *option="")=0
TFolder::Add
virtual void Add(TObject *obj)
Add object to this folder. obj must be a TObject or a TFolder.
Definition: TFolder.cxx:172
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TROOT::DecreaseDirLevel
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
Definition: TROOT.cxx:2694
TFolder::~TFolder
virtual ~TFolder()
Folder destructor.
Definition: TFolder.cxx:139
TString::Strip
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Definition: TString.cxx:1106
kNPOS
const Ssiz_t kNPOS
Definition: RtypesCore.h:115
TFolder::AddFolder
TFolder * AddFolder(const char *name, const char *title, TCollection *collection=0)
Create a new folder and add it to the list of folders of this folder, return a pointer to the created...
Definition: TFolder.cxx:188
TObject::Print
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definition: TObject.cxx:552
TFolder
Definition: TFolder.h:30
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:54
TCollection::Remove
virtual TObject * Remove(TObject *obj)=0
TCollection::Delete
virtual void Delete(Option_t *option="")=0
Delete this object.
TFolder::FindFullPathName
virtual const char * FindFullPathName(const char *name) const
Return the full pathname corresponding to subpath name if the node is gROOT->GetRootFolder() and retu...
Definition: TFolder.cxx:237
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TString::kIgnoreCase
@ kIgnoreCase
Definition: TString.h:268
TCollection::SetOwner
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
Definition: TCollection.cxx:746
gFolderD
static const char * gFolderD[64]
Definition: TFolder.cxx:96
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
Int_t
int Int_t
Definition: RtypesCore.h:45
TBrowser.h
SafeDelete
#define SafeDelete(p)
Definition: RConfig.hxx:543
Strlen.h
TClass.h
TList.h
TFolder::IsOwner
Bool_t IsOwner() const
Folder ownership has been set via.
Definition: TFolder.cxx:380
TFolder::Browse
virtual void Browse(TBrowser *b)
Browse this folder.
Definition: TFolder.cxx:219
TIter::Reset
void Reset()
Definition: TCollection.h:252
TString
Definition: TString.h:136
kOwnFolderList
@ kOwnFolderList
Definition: TFolder.cxx:100
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
b
#define b(i)
Definition: RSha256.hxx:118
TFolder::SaveAs
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save all objects in this folder in filename.
Definition: TFolder.cxx:479
bool
object
TString::kBoth
@ kBoth
Definition: TString.h:267
TROOT.h
TObject::ls
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Definition: TObject.cxx:494
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
TFolder::SetOwner
virtual void SetOwner(Bool_t owner=kTRUE)
Set ownership.
Definition: TFolder.cxx:494
TRegexp.h
TNamed::Copy
virtual void Copy(TObject &named) const
Copy this to obj.
Definition: TNamed.cxx:94
TCollection::StartGarbageCollection
static void StartGarbageCollection()
Set up for garbage collection.
Definition: TCollection.cxx:696
TFolder::FindObject
virtual TObject * FindObject(const char *name) const
Search object identified by name in the tree of folders inside this folder.
Definition: TFolder.cxx:312
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TFolder::Remove
virtual void Remove(TObject *obj)
Remove object from this folder. obj must be a TObject or a TFolder.
Definition: TFolder.cxx:468
slash
TCanvas * slash()
Definition: slash.C:1
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
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
TNamed
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TFolder::TFolder
TFolder()
Default constructor used by the Input functions.
Definition: TFolder.cxx:110
gDebug
R__EXTERN Int_t gDebug
Definition: RtypesCore.h:119
TObject::FindObject
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition: TObject.cxx:323
gDirectory
#define gDirectory
Definition: TDirectory.h:236
TCollection::IsOwner
Bool_t IsOwner() const
Definition: TCollection.h:188
BIT
#define BIT(n)
Definition: Rtypes.h:85
TCollection::Browse
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
Definition: TCollection.cxx:248
TFolder::Clear
virtual void Clear(Option_t *option="")
Delete all objects from a folder list.
Definition: TFolder.cxx:227
TNamed::SetTitle
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TROOT::IncreaseDirLevel
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
Definition: TROOT.cxx:2790
TCollection::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
Definition: TCollection.cxx:574
TROOT::IndentLevel
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition: TROOT.cxx:2798
TRegexp
Definition: TRegexp.h:31
TString::Index
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition: TString.h:639
TObject::Dump
virtual void Dump() const
Dump contents of object on stdout.
Definition: TObject.cxx:268
TCollection::EmptyGarbageCollection
static void EmptyGarbageCollection()
Do the garbage collection.
Definition: TCollection.cxx:710
TFolder::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a folder.
Definition: TFolder.cxx:460
TObject
Definition: TObject.h:37
TCollection::Add
virtual void Add(TObject *obj)=0
TFolder.h
name
char name[80]
Definition: TGX11.cxx:110
gFolderPath
static char gFolderPath[512]
Definition: TFolder.cxx:98
TIter
Definition: TCollection.h:233
TCollection
Definition: TCollection.h:63
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TFolder::Occurence
virtual Int_t Occurence(const TObject *obj) const
Return occurence number of object in the list of objects of this folder.
Definition: TFolder.cxx:438
Class
void Class()
Definition: Class.C:29
TFolder::FindObjectAny
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at this folder.
Definition: TFolder.cxx:354
TCollection::FindObject
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Definition: TCollection.cxx:312
TObject::ClassName
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
TFolder::fIsOwner
Bool_t fIsOwner
Definition: TFolder.h:34
TList
Definition: TList.h:44
gFolderLevel
static Int_t gFolderLevel
Definition: TFolder.cxx:97
gROOT
#define gROOT
Definition: TROOT.h:406
int
TError.h