Changeset 11486 for trunk/Mars


Ignore:
Timestamp:
07/20/11 17:57:34 (13 years ago)
Author:
tbretz
Message:
Added support for FITS files in readdaq.
Location:
trunk/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r11461 r11486  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2011/07/20 Thomas Bretz
     22
     23   * readdaq.cc:
     24     - added support for FITS files
     25
     26
    2027
    2128 2011/07/19 Thomas Bretz
  • trunk/Mars/readdaq.cc

    r9141 r11486  
    1515#include "MRawEvtData.h"
    1616#include "MRawCrateArray.h"
    17 #include "MRawFileRead.h"
     17#include "MRawFitsRead.h"
    1818
    1919
     
    4848    gLog << all << endl;
    4949    gLog << "Sorry the usage is:" << endl;
    50     gLog << "   readdaq [-h] [-?] [-vn] [-dec] [-a0] inputfile[.raw]" << endl << endl;
     50    gLog << "   readdaq [-h] [-?] [-vn] [-dec] [-a0] inputfile[.raw|.fits]" << endl << endl;
    5151    gLog << "     input file:   Magic DAQ binary file." << endl;
    5252    gLog.Usage();
     
    103103    TString kNamein = arg.GetArgumentStr(0);
    104104 
    105     if (!kNamein.EndsWith(".raw") && !kNamein.EndsWith(".raw.gz"))
     105    if (!kNamein.EndsWith(".raw")  && !kNamein.EndsWith(".raw.gz") &&
     106        !kNamein.EndsWith(".fits") && !kNamein.EndsWith(".fits.gz"))
    106107        kNamein += ".raw";
    107108
     
    162163    // be created by MRawFileRead::PreProcess
    163164    //
    164     MRawFileRead read(kNamein);
    165     read.SetForce(kForce);
    166     read.SetForceMode(kForceMode);
    167     tasks.AddToList(&read);
     165    MRawFileRead *read = MRawFitsRead::IsFits(kNamein) ? new MRawFitsRead(kNamein) : new MRawFileRead(kNamein);
     166    read->SetBit(kCanDelete);
     167    read->SetForce(kForce);
     168    read->SetForceMode(kForceMode);
     169    tasks.AddToList(read);
    168170
    169171    MPrint print0;
Note: See TracChangeset for help on using the changeset viewer.