Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8897)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8898)
@@ -432,11 +432,12 @@
     // data file will be processed. In any case there are no interleaved
     // calibration events in such data, so this is fine.
+    // We allow only cosmics triggered events to pass (before prescaling)
     MFTriggerPattern fcalped;
     fcalped.SetInverted();
     fcalped.SetDefault(kTRUE);
-    //    ftp.RequireCalibration();
-    fcalped.DenyCalibration();
-    fcalped.DenyPedestal();
-    //    ftp.DenyPinDiode();
+    fcalped.DenyAll();
+    fcalped.AllowTriggerLvl1();
+    fcalped.AllowTriggerLvl2();
+    //fcalped.AllowSumTrigger();
 
     // This will skip interleaved events with a cal- or ped-trigger
@@ -505,4 +506,6 @@
     // without artifially calibration events
     //
+    // Deny or allow is done before prescaling.
+    //
     MFTriggerPattern fped;
     fped.SetDefault(kTRUE);
@@ -510,7 +513,6 @@
     if (!extractor1->HasLoGain())
     {
+        fped.DenyAll();
         fped.RequirePedestal();
-        fped.DenyTriggerLvl1();
-        fped.DenyTriggerLvl2();
     }
 
@@ -565,8 +567,11 @@
     MExtractBlindPixel      bldext;
 
+    // Execute for all events with the calibration trigger. If no
+    // trigger pattern is available do not execute it
+    // The selection is done before prescaling.
     MFTriggerPattern        fcalib("CalibFilter");
     fcalib.SetDefault(kFALSE);
+    fcalib.DenyAll();
     fcalib.RequireCalibration();
-    //fcalib.DenyPedestal(); // This should never happen!
 
     MCalibrationChargeCalc  chcalc;
@@ -769,4 +774,6 @@
     if (fIsInterlaced)
     {
+        // The task list is executed for all events with the calibration
+        // trigger
         tlist2.AddToList(&fcalib);     // MFTriggerPattern
         tlist2.AddToList(&tlist4);
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 8897)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 8898)
@@ -19,5 +19,5 @@
 !   Author(s): Markus Gaug, 02/2004 <mailto:markus@ifae.es>
 !
-!   Copyright: MAGIC Software Development, 2000-2007
+!   Copyright: MAGIC Software Development, 2000-2008
 !
 !
@@ -1715,8 +1715,12 @@
     // anyway. So we set the default such that the MContinue ccalib
     // will never be executed.
+    // We allow to have only calibration events before Prescaling.
+    // We require that the calibration events have not been prescaled (why?)
     MTriggerPatternDecode     trgpat;
     MFTriggerPattern          fcalib("CalibFilter");
     fcalib.SetDefault(kFALSE);
     fcalib.DenyCalibration(MFTriggerPattern::kPrescaled);
+    fcalib.DenyAll();
+    fcalib.AllowCalibration();
 
     MContinue                 ccalib(&fcalib,"ContTrigPattern");
@@ -1831,7 +1835,7 @@
 
     //
-    // Apply a filter against cosmics
-    // (will have to be needed in the future
-    // when the calibration hardware-trigger is working)
+    // Apply a filter against cosmics (this is for the old times in which
+    // the calibration events where triggered by level 1 and for
+    // sanity against empty trigger events)
     //
     MFCosmics cosmics;
Index: trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8897)
+++ trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8898)
@@ -1096,9 +1096,12 @@
     // data file will be processed. In any case there are no interleaved
     // calibration events in such data, so this is fine.
+    // The selection is done with the trigger bits before prescaling
     MTriggerPatternDecode decode;
     MFTriggerPattern fcalib("CalibFilter");
     fcalib.SetDefault(kTRUE);
-    fcalib.DenyCalibration();
-    fcalib.DenyPedestal();
+    fcalib.DenyAll();
+    fcalib.AllowTriggerLvl1();
+    fcalib.AllowTriggerLvl2();
+    //fcalib.AllowSumTrigger();
 
     tlist.AddToList(&decode);
@@ -1130,12 +1133,9 @@
 
     //------------------------------
+    // Require that before the Prescaling we had only a pedestal trigger
     MFTriggerPattern ftp2("PedestalFilter");
     ftp2.SetDefault(kTRUE);
+    ftp2.DenyAll();
     ftp2.RequirePedestal();
-    ftp2.DenyCalibration();
-
-    // NEW!
-    ftp2.DenyTriggerLvl1();
-    ftp2.DenyTriggerLvl2();
 
     if (!fSequence.IsMonteCarlo() && (!fExtractor || !fExtractor->HasLoGain()))
