Index: branches/MarsWobble/fact/analysis/callisto.C
===================================================================
--- branches/MarsWobble/fact/analysis/callisto.C	(revision 18160)
+++ branches/MarsWobble/fact/analysis/callisto.C	(revision 18278)
@@ -1,5 +1,8 @@
 #include "MLogManip.h"
 
-int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", const char *delays="resources/delays-20150217.txt")
+int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output",
+//             TString drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits",
+             const char *drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits",
+             const char *delays="resources/delays-20150217.txt")
 {
     // ======================================================
@@ -107,5 +110,4 @@
     }
 
-    TString timfile = drs.GetFileName(0, MSequence::kFitsDat);
     TString drs1024 = drs.GetFileName(0, MSequence::kFitsDrs);
     TString pedfile = seq.GetFileName(0, MSequence::kFitsPed);
@@ -115,15 +117,19 @@
     gLog << "DRS calib     300: " << drsfile << '\n';
     gLog << "DRS calib    1024: " << drs1024 << "\n\n";
+    gLog << "DRS calib    Time: " << drstime << "\n\n";
+
+    MDrsCalibrationTime drscalibtime;
+    if (!drscalibtime.ReadFits(drstime)))
+        return 5;
 
     MDrsCalibration drscalib300;
     if (!drscalib300.ReadFits(drsfile.Data()))
-        return 5;
+        return 6;
 
     MDrsCalibration drscalib1024;
     if (!drscalib1024.ReadFits(drs1024.Data()))
-        return 6;
+        return 7;
 
     gLog << all;
-    gLog << "Time calibration : " << timfile << '\n';
     gLog << "Pedestal     file: " << pedfile << '\n';
     gLog << "Light Pulser file: " << calfile << '\n' << endl;
@@ -135,5 +141,5 @@
     {
         gLog << err << "ERROR - Sequence valid but without files." << endl;
-        return 7;
+        return 8;
     }
     iter.Print();
@@ -195,10 +201,10 @@
     // hrate.DefaultLabelY("ERROR");
 
-    MDrsCalibrationTime timecam;
+//    MDrsCalibrationTime timecam;
 
     gStyle->SetOptFit(kTRUE);
 
     // ======================================================
-
+/*
     gLog << endl;
     gLog.Separator("Processing DRS timing calibration run");
@@ -240,5 +246,5 @@
     if (!loop0.GetDisplay())
         return 9;
-
+*/
     /*
      MHDrsCalibrationT *t = (MHDrsCalibrationT*)plist4.FindObject("MHDrsCalibrationT");
@@ -258,5 +264,5 @@
     plist1.AddToList(&drscalib300);
     plist1.AddToList(&badpixels);
-    plist1.AddToList(&timecam);
+    plist1.AddToList(&drscalibtime);
 
     MEvtLoop loop1("DetermineCalConst");
@@ -348,9 +354,9 @@
     tlist1.AddToList(&fill1d);
 
-    if (!loop1.Eventloop(max1))
-        return 10;
-
-    if (!loop1.GetDisplay())
-        return 11;
+    //if (!loop1.Eventloop(max1))
+    //    return 10;
+
+    //if (!loop1.GetDisplay())
+    //    return 11;
 
     if (delays)
@@ -363,5 +369,5 @@
         }
 
-        timecam.SetDelays(g);
+        drscalibtime.SetDelays(g);
     }
 
@@ -377,5 +383,5 @@
     plist3.AddToList(&drscalib300);
     plist3.AddToList(&badpixels);
-    plist3.AddToList(&timecam);
+    plist3.AddToList(&drscalibtime);
 
     MEvtLoop loop3("DetermineRndmPed");
@@ -451,5 +457,5 @@
     plist4.AddToList(&drscalib300);
     plist4.AddToList(&badpixels);
-    plist4.AddToList(&timecam);
+    plist4.AddToList(&drscalibtime);
 
     MEvtLoop loop4("DetermineExtractedPed");
@@ -519,5 +525,5 @@
     plist5.AddToList(&drscalib300);
     plist5.AddToList(&badpixels);
-    plist5.AddToList(&timecam);
+    plist5.AddToList(&drscalibtime);
 
     MEvtLoop loop5("CalibratingData");
Index: branches/MarsWobble/fact/analysis/callisto_data.C
===================================================================
--- branches/MarsWobble/fact/analysis/callisto_data.C	(revision 18160)
+++ branches/MarsWobble/fact/analysis/callisto_data.C	(revision 18278)
@@ -90,17 +90,21 @@
     // -------------------------------------------------------
 
-    TFile file(drstime);
-    if (file.IsZombie())
+    MDrsCalibrationTime timecam;
+    if (!timecam.ReadFits(drstime))
     {
-        gLog << err << "ERROR - Could not open " << drstime << endl;
+        gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl;
         return 21;
     }
 
-    MDrsCalibrationTime *timecam = 0;
-    file.GetObject("MDrsCalibrationTime", timecam);
-    if (!timecam)
+    if (delays)
     {
-        gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl;
-        return 22;
+        TGraph g(delays);
+        if (g.GetN()!=1440)
+        {
+            gLog << err << "Error reading file " << delays << endl;
+            return 22;
+        }
+
+        timecam.SetDelays(g);
     }
 
@@ -203,5 +207,5 @@
     plist5.AddToList(&drscalib300);
     plist5.AddToList(&badpixels);
-    plist5.AddToList(timecam);
+    plist5.AddToList(&timecam);
 
     MEvtLoop loop5("CalibratingData");
