Hi Nick, Nick van Eijndhoven <Nick@phys.uu.nl> wrote concerning Re: [ROOT] Mixed events from TChains [Sun, 26 Jan 2003 14:08:36 +0100] ---------------------------------------------------------------------- > Hi Christian, > What I normally use is the following : > > 1) Use GetEntry(ient) to get a certain entry in memory. > > 2) Then do something like Event* evtold=new Event(*event) > to store the current event into the evtold structure. > > 3) Then do again GetEntry(ient2) to obtain a different > event in memory. > > 4) Now you have 2 structures filled, namely "event" > and "evtold" and you can have fun with your mixing :). That would obviously work, if you just want the previous event (basically my work-a-round # 1, though with a cache of exactly one), but what if you want events ahead of the current one? > > I can think of 3 ways of working around this: > > > > 1) Make the user set a flag that caches the current event, and they > > can then call it back from memory storage later on. This obviously > > doesn't work if you want to read events ahead of the current one. ... Also, the whole point was to avoid too much copying and (de)allocations. Hence, I'd rather there was some other way to do this. Thank you. Yours, ___ | Christian Holm Christensen |_| | ------------------------------------------------------------- | | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 _| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91 _| Denmark Office: (+45) 353 25 305 ____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm | |
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET