Re: TH1 as TTree branch??

Rene Brun (brun@hpbrun.cern.ch)
Mon, 9 Mar 1998 22:16:20 +0100 (MET)


Yes, you can have a TH1F as a data member in a TBranch.
We give an example in $ROOTSYS/test/Event.
See the list of possibilities at URL:
http://root.cern.ch/root/HowtoWriteTree.html

Rene Brun

On Mon, 9 Mar 1998, William J Deninger wrote:

> Hello,
>
> Is it possible to have a TH1F histogram as a data member in a TTree branch? I remember reading something about this, but I wasn't able to find it in root talk previous.
>
> //_________________________
> // header file
> class TRawData
> {
> public:
> TH1F histogram;
> }
>
> //_________________________
> // Cint
> TRawData *raw = new TRawData;
> TTree *tree = new TTree("traceback","Raw event data");
> tree->Branch("raw","TRawData",&raw,16000,1);
>
> William J Deninger
> deninger@uiuc.edu
>
>