Re: checking result of SetBranchAddress

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 11 Sep 2009 10:31:42 -0500


Hi Alexander,

How does the new values compare to the one you passed?

Cheers,
Philippe

Alexander Mann wrote:
> Hi Philippe,
>
>> The example you sent prints the location of the branch object itself
>> and __not__ the location of the user object the branch will use to
>> fill in or read from the TTree. The location of the branch object is,
>> of course, not affected by the call to SetBranchAddres.
>
> OK, that makes sense. (So SetBranchAddress does not set the address of
> the branch as one might deduce from its name :)
>
> The problem however remains, as on a failure of SetBranchAddress the
> pointer is modified, too:
>
> --> StacoMuon_nucone20 before (nil)
> --> now is 0x8e2797c
>
> --> StacoMuon_bestMatch before (nil)
> Error in <TTree::SetBranchAddress>: The pointer type give (vector<bool>)
> does not correspond to the class needed (vector<int>) by the branch:
> StacoMuon_bestMatch
> --> now is 0x8e27980
>
> cu,
> Alexander
>
Received on Fri Sep 11 2009 - 17:32:01 CEST

This archive was generated by hypermail 2.2.0 : Fri Sep 11 2009 - 17:50:03 CEST