Ignore:
Timestamp:
10/27/07 21:59:05 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r8551 r8765  
    426426
    427427    fMjd = mjd+1;
     428}
     429
     430// --------------------------------------------------------------------------
     431//
     432// Set MTime to time expressed as float (yymmdd.ffff)
     433//  for details see MAstro::Yymmdd2Mjd
     434//
     435void MTime::SetCorsikaTime(Float_t t)
     436{
     437    const UInt_t   yymmdd = (UInt_t)TMath::Floor(t);
     438    const UInt_t   mjd    = MAstro::Yymmdd2Mjd(yymmdd);
     439    const Double_t frac   = fmod(t, 1)*kDay; // [ms] Fraction of day
     440    const UInt_t   ns     = (UInt_t)fmod(frac*1e6, 1000000);
     441
     442    SetMjd(mjd, (ULong_t)TMath::Floor(frac), ns);
    428443}
    429444
Note: See TracChangeset for help on using the changeset viewer.