Hi, I have a pretty simple question about the new TFolder class, which is not easy to figure out from the documentation. The documentation seems to treat the TFolder mechanism very similarly to RZ; you have a file and it contains folders you can retrieve things from. What I would like to do is use TFolder in my MonteCarlo event class. Specifically, I would like to create my own class, TMyEvent which either derives from or contains a TFolder (or a TFolder*). I would write these TMyEvent objects to a Tree on the output file. When I read an event from the tree, I would like to be able to have named access to the TFolder the event contains or "is". This would be very handy, because then the TFolder would be sort of an Object whiteboard for a given event. It would allow adding new objects to the event, for instance when it is reconstructed etc, and writing the old + new objects contained by the event to the output file. Thus one would not have to anticipate what types of information (objects) one will attach to an event in the future. In more traditional terms, the TFolder would be like a bank directory. I suppose there are other mechanisms for doing this, by using one of the other container classes, but the TFolder and its intuitive, named access is pretty handy. Anyway, the documentation sort of implicitly suggests that this type of usage is not foreseen, so I wanted to check whether it is possible to write an object which contains a TFolder or derives from TFolder to a TTree on a root file. Thanks for any information, Dave dcasper@uci.edu
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:34 MET