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
>
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET