RE: How to access the value of branch variables?

From: Rene BRUN <brun_at_mail.cern.ch>
Date: Sat, 5 Feb 2005 11:53:39 +0100 (MET)


Sudeep,

Could you send the shortest possible running script (and the data file) reproducing this problem?

Rene Brun

On
Sat, 5 Feb 2005, Sudeep Chatterji wrote:

> Dear Rene,
> When I am calling Analysis->SetMakeClass(1); as suggested by you before calling SetBranchAddress, I am getting segmentation fault. I am attaching the log file with this mail.
> Regards,
> Sudeep
>
> -----Original Message-----
> From: Rene Brun
> Sent: Fri 2/4/2005 9:13 AM
> To: Sudeep Chatterji
> Cc: roottalk_at_pcroot.cern.ch
> Subject: Re: [ROOT] How to access the value of branch variables?
> Hi Sudeep,
>
> By default when you create a top level branch with sub branches, ROOT
> assumes that you will give the address of the top level branch to read
> the sub-branches into the original class/structure.
> If you want to read a sub-branch into your own variable, you must call
> Analysis->SetMakeClass(1);
> before calling SetBranchAddress
>
> Rene Brun
>
>
>
> Sudeep Chatterji wrote:
> > Dear Rooters,
> >
> > I am using ExRootAnalysis for reconstructing photons. The parameter
> > structure is given below:
> > Analysis (tree)
> > {
> > Photon_size
> > Photon (Branch)
> > {
> > Photon.CalPT
> > Photon.CalEta
> > Photon.CalPhi
> > Photon.VtxZ
> > Photon.Isolation
> > Etc.
> > }
> > }
> > I am able to access Photon_size variable in the rootscript file by the following command:
> >
> > Analysis->SetBranchAddress("Photon_size",&Photon_size);
> >
> > But, when I am trying the same with the Photon branch variables(as shown below), I am unable to do so.
> >
> > Analysis->SetBranchAddress("Photon.CalPT",Photon_CalPT);
> >
> > Please suggest something in this regard.
> >
> >
> > Regards,
> > Sudeep Chatterji
> >
>
>
>
>
>
Received on Sat Feb 05 2005 - 11:53:44 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET