Changeset 8765 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 10/27/07 21:59:05 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 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 -
trunk/MagicSoft/Mars/mbase/MTime.h
r8551 r8765 94 94 Bool_t SetSqlTimeStamp(const char *str); 95 95 void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0); 96 void SetCorsikaTime(Float_t time); 96 97 Bool_t SetStringFmt(const char *time, const char *fmt, const char *loc=0); 97 98 Bool_t UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns);
Note:
See TracChangeset
for help on using the changeset viewer.