Hello, I'm still a bit confused about the behaviour of TBranchObject. The main description of it seems to be in HowtoWriteTree.html: --------------------------------------------------------------------------- If a data member is pointer to an object, a special branch of type TBranchObject is created. This is the case in our example for the data member fH, a pointer to an histogram. The fH branch will be filled by calling the class Streamer function to serialize this object into the branch buffer. --------------------------------------------------------------------------- This should set up the pointers of the objects read from a file correctly. What happens, if the object pointed to belongs to another branch? A small test showed that also these objects are read, but not the entire TClonesArray they belong to (judging by the speed). A part of my current test looks like this: class ReconstructedTrack: some parameters (not done yet:) list of pointers to detector hits class Event: two pointers to trigger particles pointer to TClonesArray of ReconstructedTracks pointer to TClonesArray of detector hits The result looks quite promising: it is possible to access the different branch levels of Event (like in the famous Event example) and the reading of the trigger particle pointers reads the correct parts of the clones array. Is this observation correct? It still seems like magic. If yes, does it mean that all chains of pointers are restored even if only a very small branch is read? And: how can I avoid to read large unimportant fractions of an event, which are pointed to? Another question: can I find somewhere an example of pointers to calibration constants, which have different cycles than the events? Best regards Christoph --------------------------------------------------------------------------- Christoph Borgmeier | Mail: DESY -F15-, Notkestr. 85, 22607 Hamburg Humboldt Univ Berlin | Phone: +49 40 8998 2844 Email: borg@ifh.de | ---------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET