Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 6025)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 6026)
@@ -22,4 +22,9 @@
  2005/01/26 Abelardo Moralejo
 
+   * macros/mccalibrate.C
+     - removed creation and writing out of MSrcPosCam. It is more 
+       flexible to add it in starmc2.C if needed (for wobble mode for
+       instance).
+
    * mtemp/mpadova/macros/RanForestDISP.C
      - added possibility to set the number of hadrons read in for the 
@@ -30,5 +35,6 @@
 
    * macros/starmc2.C
-     - added missing container MImagePar
+     - added missing container MImagePar. Added possibility to set the
+       source position on the camera (for the wobble mode).
 
 
Index: /trunk/MagicSoft/Mars/macros/mccalibrate.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/mccalibrate.C	(revision 6025)
+++ /trunk/MagicSoft/Mars/macros/mccalibrate.C	(revision 6026)
@@ -44,19 +44,22 @@
   // ------------- user change -----------------
   TString* CalibrationFilename;
-  CalibrationFilename = new TString("../gammas_nonoise/Gamma_zbin0_0*.root");  // File to be used for the calibration (must be a camera file without added noise)
-
-  Char_t* AnalysisFilename = "Gamma_zbin9_90_7_1740to1749_w0.root";  // File to be analyzed
-
-  Char_t* OutFilename      = "calibrated_data.root";  // Output file name
-
-
-  MExtractSignal    sigextract;  
+
+  CalibrationFilename = new TString("/data1/magic/mc_data/root/Period021_0.73_mirror/gammas_nonoise/Gamma_*root");  // File to be used for the calibration (must be a camera file without added noise)
+
+  Char_t* AnalysisFilename = "/data1/magic/mc_data/root/Period021_0.73_mirror/gammas_wobble/used/Proton_*.root";  // File to be analyzed
+
+  Char_t* OutFilename      = "calibrated_gamma.root";  // Output file name
+
+
+  //  MExtractSignal    sigextract;  
   // (other extraction methods can be used)
-
-  sigextract.SetSaturationLimit(240);
+  //  sigextract.SetSaturationLimit(240);
   // Defines when to switch to low gain
-
   // Define FADC slices to be integrated in high and low gain:
-  sigextract.SetRange(5, 10, 5, 10);
+  //  sigextract.SetRange(5, 10, 5, 10);
+
+  MExtractFixedWindowPeakSearch sigextract;
+  sigextract.SetWindows(6, 6, 4);
+
 
   // ---------------------------------------------------------------------
@@ -70,8 +73,4 @@
 
   plist.AddToList(&tlist);
-
-  MSrcPosCam src;
-  src.SetReadyToSave();
-  plist.AddToList(&src);
 
   MBadPixelsCam badpix;
@@ -150,5 +149,4 @@
   write.AddContainer("MMcTrigHeader",       "RunHeaders");
   write.AddContainer("MRawRunHeader",       "RunHeaders");
-  write.AddContainer("MSrcPosCam",          "RunHeaders");
 
 
Index: /trunk/MagicSoft/Mars/macros/starmc2.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/starmc2.C	(revision 6025)
+++ /trunk/MagicSoft/Mars/macros/starmc2.C	(revision 6026)
@@ -63,4 +63,8 @@
 
   MSrcPosCam src;
+  //
+  // FOR WOBBLE MODE!! Set source position on camera here.
+  //  src.SetX(120.);  // units: mm
+
   src.SetReadyToSave();
 
@@ -94,6 +98,5 @@
   //
   write1.AddContainer("MRawRunHeader", "RunHeaders");
-  write1.AddContainer("MMcRunHeader",  "RunHeaders", kFALSE); 
-  write1.AddContainer("MSrcPosCam",    "RunHeaders");
+  write1.AddContainer("MMcRunHeader",  "RunHeaders", kFALSE);
   write1.AddContainer("MGeomCam",      "RunHeaders", kFALSE);
   write1.AddContainer("MMcConfigRunHeader",  "RunHeaders", kFALSE);
@@ -105,4 +108,5 @@
   write1.AddContainer("MPointingPos",  "Events", kFALSE);
   write1.AddContainer("MMcTrig",       "Events", kFALSE);
+  write1.AddContainer("MSrcPosCam",    "Events", kFALSE);
   write1.AddContainer("MRawEvtHeader", "Events");
   write1.AddContainer("MHillas",       "Events");
@@ -117,5 +121,4 @@
       write2.AddContainer("MRawRunHeader", "RunHeaders");
       write2.AddContainer("MMcRunHeader",  "RunHeaders", kFALSE);
-      write2.AddContainer("MSrcPosCam",    "RunHeaders");
       write2.AddContainer("MGeomCam",      "RunHeaders", kFALSE);
       write2.AddContainer("MMcConfigRunHeader",  "RunHeaders", kFALSE);
@@ -127,4 +130,5 @@
       write2.AddContainer("MPointingPos",  "Events", kFALSE);
       write2.AddContainer("MMcTrig",       "Events", kFALSE);
+      write2.AddContainer("MSrcPosCam",    "Events", kFALSE);
       write2.AddContainer("MRawEvtHeader", "Events");
       write2.AddContainer("MHillas",       "Events");
@@ -166,5 +170,5 @@
   evtloop.SetParList(&plist);
 
-  if (!evtloop.Eventloop())
+  if (!evtloop.Eventloop(10000))
     return;
 
