Changeset 7550


Ignore:
Timestamp:
03/01/06 10:05:14 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7549 r7550  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/03/01 Thomas Bretz
     21
     22   * mastro/MAstro.cc, mbase/MTime.cc:
     23     - added a comment in GetMagicPeriod
     24
     25   * mpointing/MPointingPos.cc:
     26     - added new member function GetString
     27     - moved code from Print to GetString
     28
     29
     30
    2031 2006/02/28 Daniela Dorner
    2132
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r7489 r7550  
    572572//   GetMagicPeriod(t.GetMjd());
    573573//
     574// To get a floating point magic period use
     575//   GetMoonPeriod(mjd)-284
     576//
    574577Int_t MAstro::GetMagicPeriod(Double_t mjd)
    575578{
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r7461 r7550  
    171171//   GetMagicPeriod(t.GetMjd());
    172172//
     173// To get a floating point magic period use
     174//   GetMoonPeriod()-284
    173175//
    174176//  see MAstro::GetMagicPeriod
  • trunk/MagicSoft/Mars/mpointing/MPointingPos.cc

    r7517 r7550  
    4646#include "MTime.h"
    4747#include "MAstro.h"
     48#include "MString.h"
    4849#include "MObservatory.h"
    4950#include "MPointingDev.h"
     
    8586}
    8687
    87 void MPointingPos::Print(Option_t *o) const
     88TString MPointingPos::GetString(Option_t *o) const
    8889{
    8990    TString opt(o);
     
    9293        opt = "radeczdaz";
    9394
    94     *fLog << GetDescriptor() << ":";
     95    TString rc;
    9596
    9697    if (opt.Contains("ra", TString::kIgnoreCase))
    97         *fLog << " Ra=" << MAstro::GetStringHor(fRa);
     98        rc += MString::Form(" Ra=%s", MAstro::GetStringHor(fRa).Data());
     99
    98100    if (opt.Contains("ha", TString::kIgnoreCase))
    99         *fLog << " Ha=" << MAstro::GetStringHor(fHa);
     101        rc += MString::Form(" Ha=%s", MAstro::GetStringHor(fHa).Data());
     102
    100103    if (opt.Contains("dec", TString::kIgnoreCase))
    101         *fLog << " Dec=" << MAstro::GetStringDeg(fDec);
     104        rc += MString::Form(" Dec=%s", MAstro::GetStringDeg(fDec).Data());
     105
    102106    if (opt.Contains("zd", TString::kIgnoreCase))
    103         *fLog << " Zd=" << MAstro::GetStringDeg(fZd);
     107        rc += MString::Form(" Zd=%s", MAstro::GetStringDeg(fZd).Data());
     108
    104109    if (opt.Contains("az", TString::kIgnoreCase))
    105         *fLog << " Az=" << MAstro::GetStringDeg(fAz);
     110        rc += MString::Form(" Az=%s", MAstro::GetStringDeg(fAz).Data());
    106111
    107112    if (fTitle!=gsDefTitle)
    108         *fLog << " <" << fTitle << ">";
     113        rc += MString::Form(" <%s>", fTitle.Data());
    109114
    110     *fLog << endl;
     115    return rc.Strip(TString::kBoth);
    111116}
     117
     118void MPointingPos::Print(Option_t *o) const
     119{
     120    *fLog << GetDescriptor() << ": " << GetString(o) << endl;
     121}
  • trunk/MagicSoft/Mars/mpointing/MPointingPos.h

    r7517 r7550  
    3939    }
    4040
     41    Bool_t IsInitialized() const { return !(fZd==0 && fAz==0 && fRa==0 && fHa==0 && fDec==0); }
     42
    4143    void Print(Option_t *o="") const;
     44
     45    TString GetString(Option_t *o="") const;
    4246
    4347    void SetLocalPosition(Double_t zd, Double_t az) { fZd=zd; fAz=az; }
Note: See TracChangeset for help on using the changeset viewer.