160 std::cerr <<
"TFolder dtor called for "<<
GetName() << std::endl;
168 if (obj ==
nullptr ||
fFolders ==
nullptr)
return;
184 if (strchr(
name,
'/')) {
185 ::Error(
"TFolder::TFolder",
"folder name cannot contain a slash: %s",
name);
189 ::Error(
"TFolder::TFolder",
"folder name cannot be \"\"");
237 if (strcmp(
gFolderD[0],
"root")==0) {
250 if (
name[0] ==
'/')
return nullptr;
256 while ((obj=next())) {
265 if (found)
return found;
278 Error(
"FindFullPathname",
"Not yet implemented");
287 Error(
"FindObject",
"Not yet implemented");
309 if (
name[0] ==
'/') {
310 if (
name[1] ==
'/') {
311 if (!strstr(
name,
"//root/"))
return nullptr;
319 char *
cname = csname;
349 if (
name[0] ==
'/')
return nullptr;
354 while ((obj=next())) {
359 if (found)
return found;
409 while ((obj = (
TObject *) nextobj())) {
433 while ((obj=next())) {
436 if (
n <=1)
return n-1;
439 while ((obj=next())) {
441 if (obj ==
object)
return n;
459 if (obj ==
nullptr ||
fFolders ==
nullptr)
return;
static const char * gFolderD[64]
static Int_t gFolderLevel
static char gFolderPath[512]
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Using a TBrowser one can browse all ROOT objects.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
Collection abstract base class.
virtual TObject * Remove(TObject *obj)=0
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
static void EmptyGarbageCollection()
Do the garbage collection.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
virtual void Add(TObject *obj)=0
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Delete(Option_t *option="") override=0
Delete this object.
void Clear(Option_t *option="") override=0
static void StartGarbageCollection()
Set up for garbage collection.
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
void RecursiveRemove(TObject *obj) override
Recursively remove object from a folder.
void Browse(TBrowser *b) override
Browse this folder.
TFolder()
Default constructor used by the Input functions.
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at this folder.
TFolder * AddFolder(const char *name, const char *title, TCollection *collection=nullptr)
Create a new folder and add it to the list of folders of this folder, return a pointer to the created...
virtual void Add(TObject *obj)
Add object to this folder. obj must be a TObject or a TFolder.
void Clear(Option_t *option="") override
Delete all objects from a folder list.
virtual ~TFolder()
Folder destructor.
TObject * FindObject(const char *name) const override
Search object identified by name in the tree of folders inside this folder.
void ls(Option_t *option="") const override
List folder contents.
void SaveAs(const char *filename="", Option_t *option="") const override
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...
virtual void SetOwner(Bool_t owner=kTRUE)
Set ownership.
Bool_t IsOwner() const
Folder ownership has been set via.
virtual Int_t Occurence(const TObject *obj) const
Return occurence number of object in the list of objects of this folder.
virtual void Remove(TObject *obj)
Remove object from this folder. obj must be a TObject or a TFolder.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual void Dump() const
Dump contents of object on stdout.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
@ kMustCleanup
if object destructor must call RecursiveRemove()
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
Regular expression class.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TString & Remove(Ssiz_t pos)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const