Changeset 18568


Ignore:
Timestamp:
09/03/16 20:39:51 (8 years ago)
Author:
tbretz
Message:
Implemented function SetupFits to be able to read from a fits file.
Location:
trunk/Mars/mbase
Files:
2 edited

Legend:

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

    r9268 r18568  
    4040
    4141#include <fstream>
     42
     43#include "fits.h"
    4244
    4345#include "MLog.h"
     
    156158    return rc;
    157159}
     160
     161Bool_t MParameterD::SetupFits(fits &fin)
     162{
     163    return fin.SetRefAddress(Form("%s.fVal", fName.Data()), fVal);
     164}
     165
     166Bool_t MParameterDerr::SetupFits(fits &fin)
     167{
     168    if (!fin.SetRefAddress(Form("%s.fErr", fName.Data()), fErr))
     169        return kFALSE;
     170    return MParameterD::SetupFits(fin);
     171}
     172
     173Bool_t MParameterI::SetupFits(fits &fin)
     174{
     175    return fin.SetRefAddress(Form("%s.fVal", fName.Data()), fVal);
     176}
  • trunk/Mars/mbase/MParameters.h

    r9268 r18568  
    2121
    2222    void Print(Option_t *o="") const;
     23    Bool_t SetupFits(fits &fin);
    2324
    2425    Double_t *GetPtr() { return &fVal; }
     
    4243
    4344    void Print(Option_t *o="") const;
     45    Bool_t SetupFits(fits &fin);
    4446
    4547    ClassDef(MParameterDerr, 2) // Container to hold a generalized parameters (double) and its Error
     
    6062
    6163    void Print(Option_t *o="") const;
     64    Bool_t SetupFits(fits &fin);
    6265
    6366    Int_t *GetPtr() { return &fVal; }
Note: See TracChangeset for help on using the changeset viewer.