I've created an TTree containing 980 events, written to a TFile using
a batch program. When I try to read the tree back using an interactive
program based on "Eventa", I get an error message after reading 184
events:
---
Entering TshowerEvent Destructor
Entering TShowrEvent::Clear()
Fatal in <operator new>: storage exhausted
aborting
Warning in <TClass::TClass>: no dictionary for class TWinNTSystem available
Warning in <TWinNTSystem::StackTrace>: this method must be overridden!
abnormal program termination
---
Following is the code I'm using to try to read the file:
---
// dump_test.cxx
//
// Try to read back test root file and dump event information.
// Based on "eventa".
//
{
gROOT->Reset();
gSystem.Load("TShowerEvent.dll");
// Connect file generated by CvttoTree
TFile f("i:/auger/white_top_3xx.root");
// Read Tree named "T" in memory. Tree pointer is assigned the same name
TTree *T = (TTree*)f.Get("AugerEventFile");
// Create a timer object to benchmark this loop
TStopwatch timer;
timer.Start();
// Start main loop on all events
TShowerEvent *event = new TShowerEvent();
T->SetBranchAddress("AugerEvent", &event);
Int_t nevent = T->GetEntries();
printf("Nevent=%d\n",nevent);
Int_t nb = 0;
for (Int_t i=0;i<nevent;i++) {
printf("Event:%d\n",i);
nb += T->GetEvent(i); //read complete event in memory
// if (i < 3) event->Dump(); //dump the first 3 events
event->Clear(); //clear tracks array
}
// Stop timer and print results
timer.Stop();
f.Close();
}
---
I'm running Root version 1.03/09 on a Windows 95 machine. The file
seems to be ok when I use TBrowser to look at it. Any ideas what I'm
missing here?
----------------------
David F. Nitz (dfnitz@umich.edu)
Physics Department, University of Michigan
Tel: (734) 763-9696 Fax: (734) 936-6529
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:23 MET