Re: types T... in root

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Thu, 22 Jul 2010 21:57:57 +0200


You can use TParameter for that. Of course this is far from efficient if you have to write many number in which case you better make a small class inheriting from TObject to store a whole bunch of numbers.

Cheers, Fons.

On 22/07/2010 21:49, Marc Escalier wrote:
> Dear rooters,
>
> when one create a file with root, one can write some object (histograms,
> etc...) inside using
> myobject->Write()
>
> i am wondering if it exists a type T... which has the method Write
> implemented for a an integer or a float, etc...
>
> the goal would be to do :
>
> TheTypeThatISearchFor myvariable;
>
> myvariable->Write();
>
> if it exists, what is this type ?
>
> thank you very much
>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers_at_cern.ch              Phone: +41 22 7679248
WWW:    http://fons.rademakers.org           Fax:   +41 22 7669640
Received on Thu Jul 22 2010 - 21:58:06 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 22 2010 - 23:50:01 CEST