Changeset 12937 for trunk/Mars


Ignore:
Timestamp:
02/24/12 09:57:00 (13 years ago)
Author:
tbretz
Message:
Added GetNightAsInt
Location:
trunk/Mars/mbase
Files:
2 edited

Legend:

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

    r12797 r12937  
    229229{
    230230    SetMjd(MAstro::GetMagicPeriodStart(p));
     231}
     232
     233UInt_t MTime::GetNightAsInt() const
     234{
     235    UShort_t y;
     236    Byte_t m, d;
     237
     238    MAstro::Mjd2Ymd(fMjd+0.5, y, m, d);
     239
     240    return UInt_t(y)*10000 + UInt_t(m)*100 + d;
    231241}
    232242
  • trunk/Mars/mbase/MTime.h

    r12797 r12937  
    128128    Double_t GetMoonPeriod() const;
    129129    Int_t    GetMagicPeriod() const;
     130    UInt_t   GetNightAsInt() const;
    130131    Long_t   GetTime() const { return (Long_t)fTime; } // [ms] Time of Day returned in the range [-11h, 13h)
    131132    void     GetTime(Byte_t &h, Byte_t &m, Byte_t &s, UShort_t &ms) const;
Note: See TracChangeset for help on using the changeset viewer.