Changeset 10066 for trunk/Cosy


Ignore:
Timestamp:
12/01/10 09:35:50 (14 years ago)
Author:
tbretz
Message:
Propagate the TPoint file name to the output in telesto.
Location:
trunk/Cosy
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosy/Changelog

    r10034 r10066  
    11                                                                  -*-*- END -*-*-
    2  2010/10/22 (La Palma)
     2 2010/12/01 Thomas Bretz
     3
     4   * tpoint/TPointGui.[h,cc]:
     5     - propagate filename to output
     6     - better formating of output
     7
     8   * tpoint/TPointStar.[h,cc]:
     9     - now derived from TNamed to be able to store the filename
     10
     11
     12
     13 2010/10/22 Thomas Bretz (La Palma)
    314
    415   * devdrv/dkc.cc:
     
    1122
    1223
    13  2010/10/21 (La Palma)
     24 2010/10/21 Thomas Bretz (La Palma)
    1425
    1526   * catalog/SlaPlanets.[h,cc]:
  • trunk/Cosy/tpoint/TPointGui.cc

    r10028 r10066  
    671671    }
    672672
     673    TPointStar set(fname);
     674
    673675    while (1)
    674676    {
    675         TPointStar set;
    676 
    677677        fin >> set;  // Read data from file [deg], it is stored in [rad]
    678678        if (!fin)
     
    907907
    908908    gLog << all << endl << "Sets with Residual exceeding " << fLimit << "deg:" << endl;
     909    gLog << "   StarAz  StarEl      RawAz   RawEl      Mag Residual  Filename" << endl;
    909910
    910911    //
     
    946947
    947948        if (resi>fLimit) // 0.13
    948             gLog << all << " " << orig << "  <" << resi << ">" << endl;
     949            gLog << all << " " << orig << "  <" << Form("%5.3f", resi) << ">  " << orig.GetName() << endl;
    949950
    950951        proaz.Fill(za.Az(), set0.GetResidual(&err));
  • trunk/Cosy/tpoint/TPointStar.cc

    r8823 r10066  
    1212using namespace std;
    1313
     14void TPointStar::Init(const char *name, const char *title)
     15{
     16    fName  = name  ? name  : "TPointStar";
     17    fTitle = title ? title : "A set of TPoints";
     18}
     19
    1420TPointStar::TPointStar(Double_t sel, Double_t saz, Double_t rel, Double_t raz) :
    1521    fStarAz(saz*TMath::DegToRad()),
     
    1824    fRawEl(rel*TMath::DegToRad()), fMag(-25)
    1925{
     26    Init();
    2027}
    2128
     
    137144{
    138145    out << Form("%8.3f", set.fStarAz*TMath::RadToDeg()) << " ";
    139     out << Form("%8.3f", set.fStarEl*TMath::RadToDeg()) << " ";
     146    out << Form("%7.3f", set.fStarEl*TMath::RadToDeg()) << "  ";
    140147    out << Form("%8.3f", set.fRawAz*TMath::RadToDeg()) << " ";
    141     out << Form("%8.1f", set.fRawEl*TMath::RadToDeg()) << " ";
    142     out << set.fMag;
     148    out << Form("%7.3f", set.fRawEl*TMath::RadToDeg()) << "  ";
     149    out << Form("%6.3f", set.fMag);
    143150
    144151    return out;
  • trunk/Cosy/tpoint/TPointStar.h

    r9952 r10066  
    22#define COSY_TPointStar
    33
    4 #ifndef ROOT_TObject
    5 #include <TObject.h>
     4#ifndef ROOT_TNamed
     5#include <TNamed.h>
    66#endif
    77
     
    1414class MPointing;
    1515
    16 class TPointStar : public TObject
     16class TPointStar : public TNamed
    1717{
    1818    friend istream &operator>>(istream &fin,  TPointStar &set);
     
    2626
    2727    Double_t fMag;
     28
     29    void Init(const char *name=0, const char *title=0);
    2830public:
    29     TPointStar(Double_t sel=0, Double_t saz=0, Double_t rel=0, Double_t raz=0);/*
    30         fStarAz(saz*TMath::DegToRad()),
    31         fStarEl(sel*TMath::DegToRad()),
    32         fRawAz(raz*TMath::DegToRad()),
    33         fRawEl(rel*TMath::DegToRad()), fMag(-25)
    34     {
    35     }*/
    36 
    37     Double_t GetMag() const { return fMag; }
    38     Double_t GetResidual(Double_t *err=0) const;
    39     //Double_t GetResidual() const;
    40 
    41     void operator=(TPointStar &set)
     31    TPointStar(const char *name, const char *title=0) { Init(name, title); }
     32    TPointStar(Double_t sel=0, Double_t saz=0, Double_t rel=0, Double_t raz=0);
     33    TPointStar(const TPointStar &set) : TNamed(set)
    4234    {
    4335        fStarAz = set.fStarAz;
     
    4739        fMag    = set.fMag;
    4840    }
     41
     42    Double_t GetMag() const { return fMag; }
     43    Double_t GetResidual(Double_t *err=0) const;
     44    //Double_t GetResidual() const;
    4945
    5046    Double_t GetDEl() const;//     { return (fRawEl-fStarEl)*TMath::RadToDeg(); }
Note: See TracChangeset for help on using the changeset viewer.