Changeset 19946
- Timestamp:
- 04/13/20 17:47:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fitsdump.cc
r19174 r19946 68 68 private: 69 69 string fFilename; 70 bool fStream; 70 71 71 72 // Convert CCfits::ValueType into a human readable string … … 105 106 //! the ostream where to redirect the outputs 106 107 // 107 FitsDumper::FitsDumper(const string &fname, const string &tablename) : factfits(fname, tablename), fFilename(fname) 108 FitsDumper::FitsDumper(const string &fname, const string &tablename) : factfits(fname, tablename), fFilename(fname), fStream(false) 108 109 { 109 110 } … … 568 569 const size_t last = limit ? first + limit : size_t(-1); 569 570 570 while (GetRow(first++ ))571 while (GetRow(first++, !fStream)) 571 572 { 572 573 const size_t row = GetRow(); 573 if ( row==GetNumRows() || row==last)574 if ((!fStream && row==GetNumRows()) || row==last) 574 575 break; 575 576 … … 831 832 const size_t last = limit ? first + limit : size_t(-1); 832 833 833 while (GetRow(first++ ))834 while (GetRow(first++, !fStream)) 834 835 { 835 836 const size_t row = GetRow(); 836 if ( row==GetNumRows() || row==last)837 if ((!fStream && row==GetNumRows()) || row==last) 837 838 break; 838 839 … … 862 863 const size_t last = limit ? first + limit : size_t(-1); 863 864 864 while (GetRow(first++ ))865 while (GetRow(first++, !fStream)) 865 866 { 866 867 const size_t row = GetRow(); 867 if ( row==GetNumRows() || row==last)868 if ((!fStream && row==GetNumRows()) || row==last) 868 869 break; 869 870 … … 1002 1003 uint64_t counter = 0; 1003 1004 1004 while (GetRow(first++ ))1005 while (GetRow(first++, !fStream)) 1005 1006 { 1006 1007 const size_t row = GetRow(); 1007 if ( row==GetNumRows() || row==last)1008 if ((!fStream && row==GetNumRows()) || row==last) 1008 1009 break; 1009 1010 … … 1083 1084 int FitsDumper::Exec(Configuration& conf) 1084 1085 { 1086 fStream = conf.Get<bool>("stream"); 1087 1085 1088 if (conf.Get<bool>("autocal")) 1086 1089 resetCalibration(); … … 1291 1294 ("%,%", vars<string>(), "Format for the output (currently not available in root-mode)") 1292 1295 ("force", po_switch(), "Force reading the fits file even if END key is missing") 1296 ("stream", po_switch(), "Stream reading the fits file (ignore the row count in the header)") 1293 1297 ("first", var<size_t>(size_t(0)), "First number of row to read") 1294 1298 ("limit", var<size_t>(size_t(0)), "Limit for the maximum number of rows to read (0=unlimited)")
Note:
See TracChangeset
for help on using the changeset viewer.