Re: TRefArray :: accessing elements

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 18 Aug 2011 13:29:53 -0500


Hi Adrian,

 > 1. if TRefArray* array ; elements are still accessed with array.At(i) or with array->At(i) (as with any  > other pointer)?

Yes.
> 2. if i know the type of obj (a derived class of TObject)
> can i do directly a cast like lets say
> AliAODTrack* track = (AliAODTrack*) array->At(i) ?
Yes (however you may want to use dynamic_cast<AliAODTrack*>(array->At(i))

Cheers,
Philippe. Received on Thu Aug 18 2011 - 20:30:03 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 18 2011 - 23:50:01 CEST