Changeset 12877 for trunk/FACT++


Ignore:
Timestamp:
02/08/12 23:10:21 (13 years ago)
Author:
tbretz
Message:
Added force option.
File:
1 edited

Legend:

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

    r12850 r12877  
    8383 //   int  WriteRow(ostream &, const vector<MyColumn*> &, const vector<int> &, unsigned char *, const vector<pair<int, int> >&) const;
    8484
    85     bool OpenFile(const string &);        /// Open a file
     85    bool OpenFile(const string &, bool);        /// Open a file
    8686    bool OpenTable(const string &);       /// Open a table
    8787
     
    178178//! Loads the fits file based on the current parameters
    179179//
    180 bool FitsDumper::OpenFile(const string &filename)
     180bool FitsDumper::OpenFile(const string &filename, bool force)
    181181{
    182182    if (fFile)
     
    187187
    188188    try {
    189         fFile = new fits(filename);
     189        fFile = new fits(filename, force);
    190190    }
    191191    catch (std::runtime_error e)
     
    464464    if (conf.Has("fitsfile"))
    465465    {
    466         if (!OpenFile(conf.Get<string>("fitsfile")))
     466        if (!OpenFile(conf.Get<string>("fitsfile"), conf.Get<bool>("force")))
    467467            return -1;
    468468    }
     
    14001400        ("tstart,a",    po_switch(),                "Give the mjdStart from reading the file data")
    14011401        ("tstop,b",     po_switch(),                "Give the mjdStop from reading the file data")
     1402        ("force",       po_switch(),                "Force reading the fits file even if END key is missing")
    14021403#ifdef PLOTTING_PLEASE
    14031404        ("graph,g",     po_switch(),                "Plot the columns instead of dumping them")
Note: See TracChangeset for help on using the changeset viewer.