On Tue, 5 Dec 2000, Valeri Fine (Faine) wrote:
> Could you provide some extra information (for example the text of your
> program). to understanding how to reproduce your troubles.
>
Sure, here is the relevant code fragment. I thought I was doing something
relatively straightforward, but maybe I've tricked myself and I'm
forgetting to clean up some allocated memory somewhere. Any help would be
appreciated.
------------------------------------------
StEbyeEvent *event = new StEbyeEvent();
TClonesArray *tracks = 0;
TBranch *branch = chain.GetBranch("EbyeDSTBranch");
branch->SetAddress(&event);
Int_t nevent = chain.GetEntries();
printf("There are %i events in this DST chain.\n",nevent);
Int_t fCurrent = chain.GetTreeNumber();
Int_t nb = 0;
for (int i = 0; i < nevent; i++) {
Int_t centry = chain.LoadTree(i);
if (chain.GetTreeNumber() != fCurrent) {
fCurrent = chain.GetTreeNumber();
branch = chain.GetBranch("EbyeDSTBranch");
branch->SetAddress(&event);
}
nb += chain.GetEvent(i); //read complete event in memory
}
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET