Changeset 11818


Ignore:
Timestamp:
08/06/11 16:38:12 (13 years ago)
Author:
tbretz
Message:
Added ReadFits.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DataCalib.cc

    r11810 r11818  
    112112}
    113113
    114 bool DataCalib::ReadFits(const string &str)
     114bool DataCalib::ReadFits(const string &str, MessageImp &msg)
    115115{
    116116    try
     
    122122        if (file.GetStr("TELESCOP")!="FACT")
    123123        {
    124             Error("Reading "+str+" failed: Not a valid FACT file (TELESCOP not FACT in header)");
     124            msg.Error("Reading "+str+" failed: Not a valid FACT file (TELESCOP not FACT in header)");
    125125            return false;
    126126        }
     
    128128        if (!file.HasKey("STEP"))
    129129        {
    130             Error("Reading "+str+" failed: Is not a DRS calib file (STEP not found in header)");
     130            msg.Error("Reading "+str+" failed: Is not a DRS calib file (STEP not found in header)");
    131131            return false;
    132132        }
     
    134134        if (file.GetNumRows()!=1)
    135135        {
    136             Error("Reading "+str+" failed: Number of rows in table is not 1.");
     136            msg.Error("Reading "+str+" failed: Number of rows in table is not 1.");
    137137            return false;
    138138        }
     
    154154        if (!file.GetNextRow())
    155155        {
    156             Error("Reading data from "+str+" failed.");
     156            msg.Error("Reading data from "+str+" failed.");
    157157            return false;
    158158        }
     
    166166    catch (const runtime_error &e)
    167167    {
    168         Error("Exception reading "+str+": "+e.what());
     168        msg.Error("Exception reading "+str+": "+e.what());
    169169        return false;
    170170    }
  • trunk/FACT++/src/DataCalib.h

    r11811 r11818  
    2828    DimDescribedService &fDim; // DimService through which statistics updates are transmitted
    2929
    30     bool ReadFits(const string &fname);
    3130    void WriteFits();
    3231
     
    4544    static void Apply(int16_t *val, const int16_t *start, uint32_t roi);
    4645    static void Apply(float *vec, int16_t *val, const int16_t *start, uint32_t roi);
     46
     47    static bool ReadFits(const string &fname, MessageImp &msg);
    4748};
    4849
Note: See TracChangeset for help on using the changeset viewer.