From 69a78faaf5a11e01893dc0d9b8289f1ea0cbd2fb Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Thu, 4 Aug 2011 11:54:04 -0400 Subject: Use the clear() method on Event to reset for filling. --- io/root.C | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io/root.C b/io/root.C index 0cfb37f..dfcb3c0 100644 --- a/io/root.C +++ b/io/root.C @@ -51,11 +51,10 @@ void fill_event(TTree *T, Event *ev, int event_id, double *gen_pos, int nchannels, float *channel_times) { + ev->clear(); ev->event_id = event_id; MC &mc = ev->mc; mc.gen_pos.SetXYZ(gen_pos[0], gen_pos[1], gen_pos[2]); - mc.photon.resize(0); - ev->channel.resize(0); ev->nhit = 0; Channel ch; for (int i=0; i < nchannels; i++) { -- cgit