Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5235)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5236)
@@ -26,4 +26,9 @@
      - implemented option kNoStorage for neither reading nor writing 
        the F0-files to disk.
+
+   * mjobs/MJCalibration.[h,cc]
+     - implemented option SetTimeAndCharge() in order to use the 
+       extractor deriving from MExtractTimeAndCharge, like e.g. the 
+       digital filter.
 
 
Index: /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5235)
+++ /trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5236)
@@ -200,5 +200,5 @@
 //
 MJCalibration::MJCalibration(const char *name, const char *title) 
-    : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL),
+    : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 
       fColor(MCalibrationCam::kNONE), fDisplayType(kDataCheckDisplay),
       fGeometry("MGeomCamMagic")
@@ -1637,9 +1637,12 @@
 
     MTaskEnv taskenv2("ExtractTime");
-    taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : &timespline);
-
-    if (IsRelTimes())
-        tlist.AddToList(&taskenv2);
-
+    if (!IsTimeAndCharge())
+      {
+        taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : &timespline);
+    
+        if (IsRelTimes())
+          tlist.AddToList(&taskenv2);
+      }
+    
     //
     // FIXME: This is not yet implemented in the classes!!!
@@ -1839,55 +1842,64 @@
 Bool_t MJCalibration::WriteEventloop(MEvtLoop &evtloop) const
 {
-    if (fPathOut.IsNull())
-        return kTRUE;
-
-    const TString oname(GetOutputFile());
-
-    *fLog << inf << "Writing to file: " << oname << endl;
-
-    TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9);
-    if (!file.IsOpen())
-    {
-        *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
+
+  if (IsNoStorage())
+    return kTRUE;
+
+  if (fPathOut.IsNull())
+    return kTRUE;
+  
+  const TString oname(GetOutputFile());
+  
+  *fLog << inf << "Writing to file: " << oname << endl;
+  
+  TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9);
+  if (!file.IsOpen())
+    {
+      *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
+      return kFALSE;
+    }
+  
+  if (evtloop.Write(fName)<=0)
+    {
+      *fLog << err << "Unable to write MEvtloop to " << oname << endl;
         return kFALSE;
     }
-
-    if (evtloop.Write(fName)<=0)
-    {
-        *fLog << err << "Unable to write MEvtloop to " << oname << endl;
-        return kFALSE;
-    }
-
-    return kTRUE;
+  
+  return kTRUE;
 }
 
 Bool_t MJCalibration::WriteTasks(MTask *t1, MTask *t2) const
 {
-    if (fPathOut.IsNull())
-        return kTRUE;
-
-    const TString oname(GetOutputFile());
-
-    *fLog << inf << "Writing to file: " << oname << endl;
-
-    TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9);
-    if (!file.IsOpen())
-    {
-        *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
-        return kFALSE;
-    }
-
-    if (t1 && t1->Write()<=0)
-    {
-        *fLog << err << "Unable to write " << t1->GetName() << " to " << oname << endl;
-        return kFALSE;
-    }
-    if (t2 && t2->Write()<=0)
-    {
-        *fLog << err << "Unable to write " << t2->GetName() << " to " << oname << endl;
-        return kFALSE;
-    }
-
+
+  if (IsNoStorage())
     return kTRUE;
+
+  if (fPathOut.IsNull())
+    return kTRUE;
+  
+  const TString oname(GetOutputFile());
+
+  *fLog << inf << "Writing to file: " << oname << endl;
+  
+  TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9);
+  if (!file.IsOpen())
+    {
+      *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
+      return kFALSE;
+    }
+  
+  if (t1 && t1->Write()<=0)
+    {
+      *fLog << err << "Unable to write " << t1->GetName() << " to " << oname << endl;
+      return kFALSE;
+    }
+  
+  if (t2 && t2->Write()<=0)
+    {
+      *fLog << err << "Unable to write " << t2->GetName() << " to " << oname << endl;
+      return kFALSE;
+    }
+  
+  return kTRUE;
 }
 
Index: /trunk/MagicSoft/Mars/mjobs/MJCalibration.h
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCalibration.h	(revision 5235)
+++ /trunk/MagicSoft/Mars/mjobs/MJCalibration.h	(revision 5236)
@@ -121,9 +121,9 @@
       kNoStorage,
       kHistsStorage
-    }; 
+    };                                                 // Possible flags for the storage of results
   
   Byte_t fStorage;                                     // Bit-field for chosen storage type
 
-  enum { kRelTimes, kDataCheck, kDebug, kIntensity };  // Possible flags
+  enum { kRelTimes, kDataCheck, kDebug, kIntensity, kTimeAndCharge };  // Possible flags
 
   Byte_t fFlags;                                       // Bit-field for the flags
@@ -134,8 +134,9 @@
   Bool_t IsUsePINDiode  () const { return TESTBIT(fDevices,kUsePINDiode);   }
 
-  Bool_t IsRelTimes     () const { return TESTBIT(fFlags,kRelTimes);  }
-  Bool_t IsDataCheck    () const { return TESTBIT(fFlags,kDataCheck); }
-  Bool_t IsDebug        () const { return TESTBIT(fFlags,kDebug);     }
-  Bool_t IsIntensity    () const { return TESTBIT(fFlags,kIntensity); }
+  Bool_t IsRelTimes     () const { return TESTBIT(fFlags,kRelTimes);       }
+  Bool_t IsDataCheck    () const { return TESTBIT(fFlags,kDataCheck);      }
+  Bool_t IsDebug        () const { return TESTBIT(fFlags,kDebug);          }
+  Bool_t IsIntensity    () const { return TESTBIT(fFlags,kIntensity);      }
+  Bool_t IsTimeAndCharge() const { return TESTBIT(fFlags,kTimeAndCharge);  }  
 
   Bool_t IsNoStorage    () const { return TESTBIT(fStorage,kNoStorage);    }
@@ -195,4 +196,5 @@
   void SetDebug             ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kDebug)     : CLRBIT(fFlags,kDebug); }
   void SetIntensity         ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); }
+  void SetTimeAndCharge      ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kTimeAndCharge) : CLRBIT(fFlags,kTimeAndCharge); }  
   
   // Devices
