Re: How to access the value of branch variables?

From: Rene BRUN <rene.brun_at_cern.ch>
Date: Fri, 04 Feb 2005 09:13:02 +0100


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 Fri Feb 04 2005 - 09:13:07 MET

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