Re: c-style arrays used in setbranch for std::vector branches

From: Erkcan Ozcan <eo_at_hep.ucl.ac.uk>
Date: Wed, 19 Jan 2011 09:16:34 +0200


Hi Philippe,

Thanks for the response. Just to bring this thread to a full conclusion: In my original email that started the thread, I had written that we had found that it did seem to work. Now when you say it doesn't, do you mean, it would crash right away, or it would just work by luck, but would be unreliable?

Cheers,
e.

On 18 Jan 2011, at 20:09, Philippe Canal wrote:

> Hi,
>

>> Given a branch which is found to be a *vector<POD>  by MakeClass(), can I instead call SetBranchAddress with a c-style array?

>
> No this unfortunately does not work. The address passed must be for an actual std::vector object.
>
> Philippe.
-- 

In case they are not written explicitly, please be aware that my greetings and farewell are inherently implied in this email.

V. Erkcan Ozcan
Research Fellow
University College London
Dept. of Physics & Astronomy
Received on Wed Jan 19 2011 - 08:17:12 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 19 2011 - 11:50:01 CET