Index: /trunk/MagicSoft/Mars/mbase/MContinue.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MContinue.cc	(revision 5909)
+++ /trunk/MagicSoft/Mars/mbase/MContinue.cc	(revision 5910)
@@ -55,4 +55,6 @@
 // --------------------------------------------------------------------------
 //
+// Default constructor.
+//
 // Use this constructor if a rule (see MF for more details) shell be used.
 // MContinue will create a MF object and use it as a filter for the
@@ -67,4 +69,7 @@
 // is added to the tasklist in front of MContinue.
 //
+// Use the default constructor (or an empty rule) if you want to read the
+// rule from a resource file.
+//
 MContinue::MContinue(const TString rule, const char *name, const char *title)
 {
@@ -147,4 +152,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Propagate display to filter (if set)
+//
 void MContinue::SetDisplay(MStatusDisplay *d)
 {
@@ -155,4 +164,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Propagate log stream to filter (if set)
+//
 void MContinue::SetLogStream(MLog *lg)
 {
@@ -181,11 +194,62 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// If a filter is setup, call its 'IsInverted' to invert its meaning
+// (boolean "not")
+//
 void MContinue::SetInverted(Bool_t i)
 {
-    GetFilter()->SetInverted(i);
-}
-
+    if (GetFilter())
+        GetFilter()->SetInverted(i);
+}
+
+// --------------------------------------------------------------------------
+//
+// If a filter is setup, its IsInverted status is returned. If now filter
+// has been setup yet, kFALSE is returned.
+//
 Bool_t MContinue::IsInverted() const
 {
-    return GetFilter()->IsInverted();
-}
+    return GetFilter() ? GetFilter()->IsInverted() : kFALSE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Check for corresponding entries in resource file and setup filters.
+// Avoid trailing 0's!
+//
+// Example:
+//   test.C:
+//     MContinue cont("", "MyContinue");
+//
+//   test.rc:
+//     MyContinue.Condition: {0} && {1}
+//     MyContinue.Inverted: yes
+//     MyContinue.0: MHillas.fSize>1000
+//     MyContinue.1: MHillas.fSize<10000
+//
+// For more details see MF::ReadEnv
+//
+Int_t MContinue::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
+{
+    MF *f = new MF;
+    f->SetName(fName);
+
+    const Bool_t rc = f->ReadEnv(env, prefix, print);
+    if (rc!=kTRUE)
+    {
+        delete f;
+        return rc;
+    }
+
+    if (TestBit(kIsOwner))
+        delete GetFilter();
+
+    SetBit(kIsOwner);
+    MTask::SetFilter(f);
+
+    f->SetName(Form("MF:%s", fName.Data()));
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/mbase/MContinue.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MContinue.h	(revision 5909)
+++ /trunk/MagicSoft/Mars/mbase/MContinue.h	(revision 5910)
@@ -25,4 +25,5 @@
     MTaskList *fTaskList;  //! pointer to the present tasklist
 
+    // MTask
     Int_t PreProcess(MParList *list);
     Int_t Process() { return kCONTINUE; }
@@ -39,6 +40,8 @@
     Bool_t IsInverted() const;
 
+    // MParContainer
     void SetDisplay(MStatusDisplay *d);
     void SetLogStream(MLog *lg);
+    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
 
     ClassDef(MContinue, 1) //Task returning kCONTINUE
