> Hello,
>
> 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();
> }
> }
In an interactive Root session, simply do:
Root > tree->Draw("Run_number")
I also suggest, you look at the URL:
http://root.cern.ch/root/HowtoReadTree.html
Rene Brun