Index: trunk/MagicSoft/Mars/mjobs/MJMerpp.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJMerpp.cc	(revision 9019)
+++ trunk/MagicSoft/Mars/mjobs/MJMerpp.cc	(revision 9020)
@@ -129,11 +129,11 @@
     // write.AddContainer("MTimeDAQ",           "DAQ");
 
-    if (fReportRun<=0)
+    if (fReportRun==(UInt_t)-1)
         return 0;
 
-    const TString f1 = fReportRun>0  ? Form("MReportRun.fRunNumber==%d",  fReportRun)  : "";
-    const TString f2 = fReportFile>0 ? Form("MReportRun.fFileNumber==%d", fReportFile) : "";
-
-    const TString f = Form(fReportRun>0 && fReportFile>0 ? "%s && %s" : "%s%s",
+    const TString f1 = fReportRun>0   ? Form("MReportRun.fRunNumber==%ud",  fReportRun)  : "";
+    const TString f2 = fReportFile>=0 ? Form("MReportRun.fFileNumber==%ud", fReportFile) : "";
+
+    const TString f = Form(fReportRun>0 && fReportFile>=0 ? "%s && %s" : "%s%s",
                            f1.Data(), f2.Data());
 
@@ -355,11 +355,9 @@
             return 6;
 
-        // FIXME: When to do what???
-        /*
-            if (fHeaderRun)
-                SetConstrainRunRep(run, file);
-            else
-                SetConstrainHeader(seq.GetTelescope(), run, file);
-        */
+        // FIXME: check runcallisto
+        if (fHeaderRun==0)                 // extract valid range from summary file
+            SetConstrainRunRep(run, file); // (this is not guranteed to work :-( )
+        else                               // check for the correct header
+            SetConstrainHeader(seq.GetTelescope(), run, file);
 
         SetTime(MTime(), MTime()); // Raise error if set?
Index: trunk/MagicSoft/Mars/mjobs/MJMerpp.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJMerpp.h	(revision 9019)
+++ trunk/MagicSoft/Mars/mjobs/MJMerpp.h	(revision 9020)
@@ -28,5 +28,5 @@
 
     UInt_t   fReportRun;
-    UInt_t   fReportFile;
+     Int_t   fReportFile;
 
     TString  fOnly;
@@ -60,5 +60,5 @@
     void SetConstrainHeader(Short_t tel, Int_t run, Int_t file)
     { fTelescope=tel; fHeaderRun=run; fHeaderFile=file; }
-    void SetConstrainRunRep(Int_t run, Int_t file)
+    void SetConstrainRunRep(UInt_t run, Int_t file)
     { fReportRun=run; fReportFile=file; }
     void SetTime(const MTime &start, const MTime &stop)
