Re: [ROOT] Time Graphs.

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Tue May 23 2000 - 11:58:09 MEST


Hi Steve,

I wrote a small macro to show how the time on axis is used right now in
ROOT (will hopefully be added soon by Rene in the tutorials). This can
be improved in many ways. I still think that a class hierarchy should be
used only for high level treatements. For the low-level implementation,
we should stick with simple standards, i.e. UTC time and C functions for
time manipulation (in time.h). Of course, all kind of conversions may be
used.
It is clear that using older dates is something interesting.
For the treatement of time in Virgo, we use GPS time. It is split in
two, the integer and the fractional part, both with 9 digits. We still
use at a higher level a double containing a combination of these, even
if this reduces the precision to the microsecond level.
You see that precision is something very important.
So precision is important for recent dates (hence GPS or UTC), not so
important for older dates (do not need a millisecond precision, hence
some other format).

For me, it is not so important what design we use for the Time classes.
What is important is
 1- that it is simple to use and convert to or from different formats
 2- that at a low level, some kind of very standard format is used (UTC
for example for recent dates or the future, something else for older
dates)

Hope this triggers some more discussion...

Cheers

Damir

Steve Lautenschlager wrote:
> 
> Hi Damir,
> 
> My Date class can handle all dates from about 4000BC to 9999 AD correctly
> and perform various conversions between them.  I have adapted it for ROOT
> from various other Date classes floating around the web.  I will have a look
> at it and clean it up a bit before posting it to the mailing list in the
> next few days.
> 
> Hmm.  I think it might be fairly straight forward to add handling of hours
> and seconds to my date class.  Though it increases the size of the class by
> 4 to 8 bytes which is not desirable if you only need day precision.  I'm not
> sure how one would implement fractions of seconds.  This sounds like an
> interesting design problem.  I would be interested in hearing your thoughts.
>   I think it may require a small heirarchy of inheriting classes.
> 
> Cheers,
> Steve
> 

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET