Index: trunk/MagicSoft/Mars/macros/calibration.C
===================================================================
--- trunk/MagicSoft/Mars/macros/calibration.C	(revision 6248)
+++ trunk/MagicSoft/Mars/macros/calibration.C	(revision 6249)
@@ -69,6 +69,6 @@
 #include "MJPedestal.h"
 #include "MJCalibration.h"
-#include "MJExtractCalibTest.h"
-#include "MJCalibrateSignalFromOutside.h"
+#include "MJCalibTest.h"
+#include "MJCalibrateSignal.h"
 #include "MRunIter.h"
 #include "MStatusDisplay.h"
@@ -85,6 +85,7 @@
 static TString outpath = ".";
 //static TString inpath  = "/home/rootdata/Calib/2004_07_06";
-//static TString inpath  = "/home/rootdata/Calib/2004_09_22";
-static TString inpath  = "/.magic/magicserv01/MAGIC/rootdata/2004_12_18";
+//static TString inpath  = "/home/rootdata/Calib/2004_11_11";
+//static TString inpath  = "/home/rootdata/Calib/2004_12_18";
+static TString inpath  = "/home/rootdata/Calib/2004_09_21";
 static TString badfile;
 //static TString badfile = "badpixels_only0_388_559.dat";
@@ -92,4 +93,5 @@
 // the default pedestal run for the calibration
 //
+//static const Int_t   pedrun  = 43915;
 static const Int_t   pedrun  = 38995;
 //
@@ -130,5 +132,5 @@
 // Tell if you want to test the result afterwards
 //
-static Bool_t useTest = kFALSE;
+static Bool_t useTest = kTRUE;
 //
 // Tell if you want to test the intensity calibration
@@ -147,5 +149,5 @@
 // to the extractor-TDAS
 // 
-static Int_t extractorflag = 33;
+static Int_t extractorflag = 34;
 //
 Int_t calibration(const UInt_t extflag=extractorflag, const Int_t prun=pedrun, 
@@ -153,4 +155,6 @@
                   const Int_t drun1=datrun1, const Int_t drun2=datrun2)
 {
+
+  cout << extractorflag << endl;
 
   MExtractor *extractor = getExtractor(extflag==33 ? 32 : extflag);
@@ -329,5 +333,5 @@
     {
       
-      MJExtractCalibTest testloop;
+      MJCalibTest testloop;
       
       // If you want to see the data-check plots only, choose:
@@ -341,6 +345,5 @@
       testloop.SetBadPixels(calloop.GetBadPixels());
       
-      if (!testloop.Process(pedloop1.GetPedestalCam(),calloop.GetCalibrationCam(),calloop.GetQECam(),
-			    calloop.GetRelTimeCam()))
+      if (!testloop.ProcessFile(pedloop1.GetPedestalCam()))
         return 3;
       
@@ -368,16 +371,18 @@
     }
   
-  MJCalibrateSignalFromOutside calibloop;
-
-  calibloop.SetExtractor(extractor);
+  MJCalibrateSignal calibloop;
+
+  //  calibloop.SetExtractor(extractor);
   calibloop.SetInput(&druns);
   calibloop.SetPathOut(outpath);
   if (useDisplay)
     calibloop.SetDisplay(display);
-  calibloop.SetBadPixels(calloop.GetBadPixels());
-  calibloop.SetNoStorage(!useStorage);
+  //  calibloop.SetBadPixels(calloop.GetBadPixels());
+  //  calibloop.SetNoStorage(!useStorage);
   calibloop.SetInterlaced(useInterlaced);
   
-  if (!calibloop.ProcessFile(pedloop1.GetPedestalCam(),timeandcharge ? pedloop2.GetPedestalCam() : pedloop1.GetPedestalCam(), calloop.GetCalibrationCam(),calloop.GetQECam(), calloop.GetRelTimeCam()))
+  if (!calibloop.ProcessFile(pedloop1.GetPedestalCam(),
+                             timeandcharge ? pedloop2.GetPedestalCam() : pedloop1.GetPedestalCam(), 
+                             timeandcharge ? pedloop2.GetPedestalCam() : pedloop1.GetPedestalCam()))
     return 5;
 
@@ -390,5 +395,4 @@
   if (debug)
     gObjectTable->Print();
-
 
   return 0;
@@ -478,5 +482,5 @@
     gLog << "                             and write out the pixels as ascii tables" << endl;
     gLog << "     --useInterlaced     Use the program to calibrate data with the interlaced cal. events" << endl;
-    gLog << "     --useTest           Use the class MJExtractCalibTest to test the calibration on itself" << endl;
+    gLog << "     --useTest           Use the class MJCalibTest to test the calibration on itself" << endl;
     gLog << "     --skipBlindPix      Skip the blind pixel calibration"             << endl;
     gLog << "     --skipPINDiode      Skip the PIN Diode   calibration"             << endl;
