Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5309)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5310)
@@ -1727,4 +1727,7 @@
     tlist.PrintStatistics();
 
+    if (!fCalibrationPINDiode.IsValid())
+        SetUsePINDiode(kFALSE);
+
     DisplayResult(plist);
 
Index: trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 5309)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 5310)
@@ -134,5 +134,5 @@
 }
 
-Int_t MSequence::SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path, Bool_t raw) const
+Int_t MSequence::SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path, char *id, Bool_t raw) const
 {
     TString d(path);
@@ -146,11 +146,18 @@
     }
 
+    cout << d << endl;
+
     for (int i=0; i<arr.GetSize(); i++)
     {
+        // R. DeLosReyes and T. Bretz
+        // Changes to read the DAQ numbering format. Changes takes place
+        // between runs 35487 and 00035488 (2004_08_30)
+        const char *fmt = arr[i]>35487 ? "%08d_%s_*_E" : "%05d_%s_*_E";
+
         TString n;
 
         // Create file name
         n =  fNight.GetStringFmt("%Y%m%d_");
-        n += Form("%05d_*_E", arr[i]);
+        n += Form(fmt, arr[i], id);
         n += raw ? ".raw" : ".root";
 
@@ -249,7 +256,7 @@
 // Return the number of files added.
 //
-Int_t MSequence::SetupPedRuns(MDirIter &iter, const char *path, Bool_t raw) const
-{
-    return SetupRuns(iter, fPedRuns, path, raw);
+Int_t MSequence::SetupPedRuns(MDirIter &iter, const char *path, char *id, Bool_t raw) const
+{
+    return SetupRuns(iter, fPedRuns, path, id, raw);
 }
 
@@ -262,7 +269,7 @@
 // Return the number of files added.
 //
-Int_t MSequence::SetupDatRuns(MDirIter &iter, const char *path, Bool_t raw) const
-{
-    return SetupRuns(iter, fDatRuns, path, raw);
+Int_t MSequence::SetupDatRuns(MDirIter &iter, const char *path, char *id, Bool_t raw) const
+{
+    return SetupRuns(iter, fDatRuns, path, id, raw);
 }
 
@@ -275,7 +282,7 @@
 // Return the number of files added.
 //
-Int_t MSequence::SetupAllRuns(MDirIter &iter, const char *path, Bool_t raw) const
-{
-    return SetupRuns(iter, fRuns, path, raw);
+Int_t MSequence::SetupAllRuns(MDirIter &iter, const char *path, char *id, Bool_t raw) const
+{
+    return SetupRuns(iter, fRuns, path, id, raw);
 }
 
@@ -288,6 +295,6 @@
 // Return the number of files added.
 //
-Int_t MSequence::SetupCalRuns(MDirIter &iter, const char *path, Bool_t raw) const
-{
-    return SetupRuns(iter, fCalRuns, path, raw);
-}
+Int_t MSequence::SetupCalRuns(MDirIter &iter, const char *path, char *id, Bool_t raw) const
+{
+    return SetupRuns(iter, fCalRuns, path, id, raw);
+}
Index: trunk/MagicSoft/Mars/mjobs/MSequence.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 5309)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 5310)
@@ -36,5 +36,5 @@
 
     void Split(TString &runs, TArrayI &data) const;
-    Int_t SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path, Bool_t raw=kFALSE) const;
+    Int_t SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path, char *id, Bool_t raw=kFALSE) const;
 
 public:
@@ -53,8 +53,8 @@
     Bool_t IsValid() const { return fSequence!=(UInt_t)-1; }
 
-    Int_t SetupPedRuns(MDirIter &iter, const char *path=0, Bool_t raw=kFALSE) const;
-    Int_t SetupDatRuns(MDirIter &iter, const char *path=0, Bool_t raw=kFALSE) const;
-    Int_t SetupAllRuns(MDirIter &iter, const char *path=0, Bool_t raw=kFALSE) const;
-    Int_t SetupCalRuns(MDirIter &iter, const char *path=0, Bool_t raw=kFALSE) const;
+    Int_t SetupPedRuns(MDirIter &iter, const char *path=0, char *id="P", Bool_t raw=kFALSE) const;
+    Int_t SetupDatRuns(MDirIter &iter, const char *path=0, char *id="D", Bool_t raw=kFALSE) const;
+    Int_t SetupAllRuns(MDirIter &iter, const char *path=0, char *id="?", Bool_t raw=kFALSE) const;
+    Int_t SetupCalRuns(MDirIter &iter, const char *path=0, char *id="C", Bool_t raw=kFALSE) const;
 
     Int_t GetNumAllRuns() const { return fRuns.GetSize(); }
