Hello,
I have observed a very peculiar behaviour which I hope someone can help
explain. I have a macro that runs like this:
{
TFile *fFile = new TFile("somefilename");
TTree *fTree = (TTree*) fFile->Get("EventsTree");
TBranch *b_Events=fTree->GetBranch("Event");
THenaEvent *fRaw = new THenaEvent(); //THenaEvent is a custom
class written for holding data
b_Events->SetAddress(&fRaw);
fFile->Close();
delete fFile;
delete fRaw;
delete b_Events;
}
The macro runs fine but:
1) How do I get rid of the TTree?? Running
delete fTree
yields only a segmentation violation.
2) When I afterwards type
fFile = new TFile("samefilename")
I get a segmentation violation, but running it a *second* time works fine.
I am experimenting with all this in order to be able to run a set of
analysis macros on a huge amount of files. So far it always hangs when it
reaches the second file.
Any help would be greatly appreciated.
David Lindelof
EP-Division
CERN
1211 Geneva 23
Switzerland
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:12 MET