How do I Draw a "Run_number" histogram in a TTree if I have used the
following to book it? Is there a way similar to TNtuple, that being without
needing to write a bunch of code to sort through the tree and book into a
hist?
class Event: public TObject
{
EventHeader header;
......
}
class EventHeader : public TObject
{
UInt_t Run_number;
......
}
{
Event *event = new Event;
TTree *t = new TTree("tree","example tree");
tree->Branch("event","Event",&event,32000,0);
for (Int_t i=0; i<100; i++)
{
event->Run_number = i;
t->Fill();
}
}
William J Deninger
deninger@uiuc.edu