Re: Writing TTimeStamp to file

From: Corey Reed <cjreed_at_nikhef.nl>
Date: Mon, 12 Dec 2011 22:47:56 -0800


Hi,

Nevermind; found the solution:

directory->WriteObject(timestamp,"TimeStampName");

Thanks anyway.

On 12/12/2011 10:18 PM, Corey Reed wrote:
> Hi,
>
> My searching didn't turn up a thread on this issue, so I thought I would
> ask.
>
> Could someone remind me of the preferred method for writing objects like
> a TTimeStamp to a file?
>
> It doesn't inherit from TObject, so there's no Write function.
>
> I tried using TParameter<TTimeStamp>, but this fails to compile because
> TTimeStamp doesn't define a *= nor a += operator:
>
> /home/cjreed/root_v5.30.02/include/TParameter.h: In member function
> ‘Int_t TParameter<AParamType>::Merge(TCollection*) [with AParamType =
> TTimeStamp, Int_t = int]’:
> /home/cjreed/work/iceSoft/script/makeWaves_C_ACLiC_dict.cxx:402:87:
> instantiated from here
> /home/cjreed/root_v5.30.02/include/TParameter.h:109:13: error: no match
> for ‘operator*=’ in
> ‘((TParameter<TTimeStamp>*)this)->TParameter<TTimeStamp>::fVal *=
> c->TParameter<AParamType>::GetVal [with AParamType = TTimeStamp]()’
> /home/cjreed/root_v5.30.02/include/TParameter.h:111:13: error: no match
> for ‘operator+=’ in
> ‘((TParameter<TTimeStamp>*)this)->TParameter<TTimeStamp>::fVal +=
> c->TParameter<AParamType>::GetVal [with AParamType = TTimeStamp]()’
>
>
> Thanks!
>
> - Corey
>
Received on Tue Dec 13 2011 - 07:52:20 CET

This archive was generated by hypermail 2.2.0 : Tue Dec 13 2011 - 11:50:01 CET