Re: ROOT

Rene Brun (Rene.Brun@cern.ch)
Wed, 07 Jan 1998 15:41:19 +0100


Pasha Murat wrote:

> Right now ROOT is internally maintaining several lists of objects
> (canvases, globals, ... see TROOT::findObject(Text_t *name, void *&where))
> which one can use as dictionaries and objects by name from there.
> It would also be very helpful if ROOT provided an additional list for storing
> user-defined objects which could be used as a dictionary for user
> objects, for example:
>
> class TROOT {
> ...
> TSeqCollection *fUserObjects; // List of user objects
>
> TObject *TROOT::FindObject(Text_t *name, void *&where, char option)
> ...
> };
>
> Adding one more parameter (option) to FindObject allows to choose
> the list to be searched if it is known (the default should be all lists).
> In this case user could conveniently retrieve his objects like :
>
> TUserObject* p = (TUserObject*) gROOT->FindObject(name,where,'u');
>
> Any comments?
>

You can already use the list of special objects obtained via
gROOT->GetListOfSpecials()

A better alternative is to create your own TList object
mylist = new TList()
and add your user objects to this list.

Rene Brun