Index: trunk/FACT++/src/fitsdump.cc
===================================================================
--- trunk/FACT++/src/fitsdump.cc	(revision 19945)
+++ trunk/FACT++/src/fitsdump.cc	(revision 19946)
@@ -68,4 +68,5 @@
 private:
     string fFilename;
+    bool fStream;
 
     // Convert CCfits::ValueType into a human readable string
@@ -105,5 +106,5 @@
 //!        the ostream where to redirect the outputs
 //
-FitsDumper::FitsDumper(const string &fname, const string &tablename) : factfits(fname, tablename), fFilename(fname)
+FitsDumper::FitsDumper(const string &fname, const string &tablename) : factfits(fname, tablename), fFilename(fname), fStream(false)
 {
 }
@@ -568,8 +569,8 @@
     const size_t last = limit ? first + limit : size_t(-1);
 
-    while (GetRow(first++))
+    while (GetRow(first++, !fStream))
     {
         const size_t row = GetRow();
-        if (row==GetNumRows() || row==last)
+        if ((!fStream && row==GetNumRows()) || row==last)
             break;
 
@@ -831,8 +832,8 @@
     const size_t last = limit ? first + limit : size_t(-1);
 
-    while (GetRow(first++))
+    while (GetRow(first++, !fStream))
     {
         const size_t row = GetRow();
-        if (row==GetNumRows() || row==last)
+        if ((!fStream && row==GetNumRows()) || row==last)
             break;
 
@@ -862,8 +863,8 @@
     const size_t last = limit ? first + limit : size_t(-1);
 
-    while (GetRow(first++))
+    while (GetRow(first++, !fStream))
     {
         const size_t row = GetRow();
-        if (row==GetNumRows() || row==last)
+        if ((!fStream && row==GetNumRows()) || row==last)
             break;
 
@@ -1002,8 +1003,8 @@
     uint64_t counter = 0;
 
-    while (GetRow(first++))
+    while (GetRow(first++, !fStream))
     {
         const size_t row = GetRow();
-        if (row==GetNumRows() || row==last)
+        if ((!fStream && row==GetNumRows()) || row==last)
             break;
 
@@ -1083,4 +1084,6 @@
 int FitsDumper::Exec(Configuration& conf)
 {
+    fStream = conf.Get<bool>("stream");
+
     if (conf.Get<bool>("autocal"))
         resetCalibration();
@@ -1291,4 +1294,5 @@
         ("%,%",         vars<string>(),         "Format for the output (currently not available in root-mode)")
         ("force",       po_switch(),            "Force reading the fits file even if END key is missing")
+        ("stream",      po_switch(),            "Stream reading the fits file (ignore the row count in the header)")
         ("first",       var<size_t>(size_t(0)), "First number of row to read")
         ("limit",       var<size_t>(size_t(0)), "Limit for the maximum number of rows to read (0=unlimited)")
