Changeset 8765 for trunk/MagicSoft/Mars/mbase/MTime.cc
- Timestamp:
- 10/27/07 21:59:05 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r8551 r8765 426 426 427 427 fMjd = mjd+1; 428 } 429 430 // -------------------------------------------------------------------------- 431 // 432 // Set MTime to time expressed as float (yymmdd.ffff) 433 // for details see MAstro::Yymmdd2Mjd 434 // 435 void 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); 428 443 } 429 444
Note:
See TracChangeset
for help on using the changeset viewer.