summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-08-04 11:54:04 -0400
committerStan Seibert <stan@mtrr.org>2011-08-04 11:54:04 -0400
commit69a78faaf5a11e01893dc0d9b8289f1ea0cbd2fb (patch)
tree60a9e537a4577c333cd29056521f49831e517c5f
parent9b8a7902e01bea0f87154857163624b8da040ec5 (diff)
downloadchroma-69a78faaf5a11e01893dc0d9b8289f1ea0cbd2fb.tar.gz
chroma-69a78faaf5a11e01893dc0d9b8289f1ea0cbd2fb.tar.bz2
chroma-69a78faaf5a11e01893dc0d9b8289f1ea0cbd2fb.zip
Use the clear() method on Event to reset for filling.
-rw-r--r--io/root.C3
1 files changed, 1 insertions, 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++) {