130 ((
TFolder&)folder).Copy(*
this);
164 std::cerr <<
"TFolder dtor called for "<<
GetName() << std::endl;
172 if (obj == 0 ||
fFolders == 0)
return;
188 if (strchr(name,
'/')) {
189 ::Error(
"TFolder::TFolder",
"folder name cannot contain a slash: %s", name);
193 ::Error(
"TFolder::TFolder",
"folder name cannot be \"\"");
241 if (strcmp(
gFolderD[0],
"root")==0) {
254 if (name[0] ==
'/')
return 0;
260 while ((obj=next())) {
269 if (found)
return found;
282 Error(
"FindFullPathname",
"Not yet implemented");
291 Error(
"FindObject",
"Not yet implemented");
313 if (name == 0)
return 0;
314 if (name[0] ==
'/') {
315 if (name[1] ==
'/') {
316 if (!strstr(name,
"//root/"))
return 0;
317 return gROOT->GetRootFolder()->FindObject(name+7);
319 return gROOT->GetRootFolder()->FindObject(name+1);
322 Int_t nch = strlen(name);
325 if (nch < (
int)
sizeof(csname))
328 cname =
new char[nch+1];
331 char *
slash = strchr(cname,
'/');
336 if (nch >= (
int)
sizeof(csname))
delete [] cname;
340 if (nch >= (
int)
sizeof(csname))
delete [] cname;
344 if (nch >= (
int)
sizeof(csname))
delete [] cname;
358 if (name[0] ==
'/')
return 0;
363 while ((obj=next())) {
368 if (found)
return found;
418 while ((obj = (
TObject *) nextobj())) {
442 while ((obj=next())) {
443 if (strcmp(obj->
GetName(),
object->GetName()) == 0) n++;
445 if (n <=1)
return n-1;
448 while ((obj=next())) {
449 if (strcmp(obj->
GetName(),
object->GetName()) == 0) n++;
450 if (obj ==
object)
return n;
468 if (obj == 0 ||
fFolders == 0)
return;
virtual const char * GetName() const
Returns name of object.
virtual Int_t Occurence(const TObject *obj) const
Return occurence number of object in the list of objects of this folder.
virtual TObject * Remove(TObject *obj)=0
A TFolder object is a collection of objects and folders.
virtual void Clear(Option_t *option="")=0
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
virtual void SetOwner(Bool_t owner=kTRUE)
Set ownership.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Remove(TObject *obj)
Remove object from this folder. obj must be a TObject or a TFolder.
static Int_t gFolderLevel
Regular expression class.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
TFolder()
Default constructor used by the Input functions.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at this folder.
static const char * gFolderD[64]
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Delete(Option_t *option="")=0
Delete this object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
The TNamed class is the base class for all named ROOT classes.
virtual void Add(TObject *obj)
Add object to this folder. obj must be a TObject or a TFolder.
Bool_t IsOwner() const
Folder ownership has been set via.
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a folder.
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...
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Using a TBrowser one can browse all ROOT objects.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void ls(Option_t *option="") const
List folder contents.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Collection abstract base class.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static void StartGarbageCollection()
Set up for garbage collection.
if object destructor must call RecursiveRemove()
TString & Remove(Ssiz_t pos)
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save all objects in this folder in filename.
virtual const char * FindFullPathName(const char *name) const
Return the full pathname corresponding to subpath name if the node is gROOT->GetRootFolder() and retu...
Wrapper around a TObject so it can be stored in a TList.
virtual void Dump() const
Dump contents of object on stdout.
static constexpr double s
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual void Add(TObject *obj)=0
static void EmptyGarbageCollection()
Do the garbage collection.
virtual TObject * FindObject(const char *name) const
Search object identified by name in the tree of folders inside this folder.
virtual ~TFolder()
Folder destructor.
static char gFolderPath[512]
Mother of all ROOT objects.
TObject * GetObject() const
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void Clear(Option_t *option="")
Delete all objects from a folder list.
virtual const char * GetName() const
Returns name of object.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Browse(TBrowser *b)
Browse this folder.
virtual const char * GetTitle() const
Returns title of object.