Problem with ROOT

From: Dan Wright (dgw2222@ksu.edu)
Date: Tue Jan 24 2006 - 18:00:54 CST


Hi all,

I've been having some problems with ROOT, and I was hoping to use a
little of the collective knowledge on this list to troubleshoot. I want
to loop through all the events in a tree, and analyze a certain
variable each time. It seemed simple to begin with, but I can't seem to
make it work. Here's what I have currently:

double en = 0;
T->SetBranchAddress("mc.totScintEdep", &en);
T->GetEntry(0);
cout << en << endl;
0

I've tried some other ways, like using T->MakeClass(), but when I call
c->GetEntry(0), root seg faults. If anyone has some advice, I would
appreciate it very much. Thanks for your time. Oh, and I almost forgot,
I've checked that mc.totScintEdep != 0 for the events I'm interested
in.

Dan



This archive was generated by hypermail 2.1.6 : Wed Jan 25 2006 - 00:01:02 CST