Index: trunk/MagicSoft/Mars/mbase/MContinue.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MContinue.cc	(revision 5986)
+++ trunk/MagicSoft/Mars/mbase/MContinue.cc	(revision 5994)
@@ -241,5 +241,5 @@
 //     MyContinue.0: MHillas.fSize>1000
 //     MyContinue.1: MHillas.fSize<10000
-//   or
+//   or (the syntax might change in the future!)
 //     MyContinue.Condition: <MMyClass>
 //     MMyClass.Variable1: ...
@@ -250,4 +250,5 @@
 Int_t MContinue::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
 {
+    MFilter *f = 0;
     if (IsEnvDefined(env, prefix, "Condition", print))
     {
@@ -256,10 +257,13 @@
         if (txt.BeginsWith("<") && txt.EndsWith(">"))
         {
-            *fLog << err << "NOT YET IMPLEMENTED..." << endl;
-            return kERROR;
+            const TString name = txt(1, txt.Length()-2);
+            f = (MFilter*)GetNewObject(name, MFilter::Class());
+            if (!f)
+                return kERROR;
         }
     }
 
-    MF *f = new MF;
+    if (!f)
+        f = new MF;
     f->SetName(fName);
 
Index: trunk/MagicSoft/Mars/mbase/MContinue.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MContinue.h	(revision 5986)
+++ trunk/MagicSoft/Mars/mbase/MContinue.h	(revision 5994)
@@ -30,4 +30,5 @@
     Int_t PostProcess();
 
+    // MContinue
     enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15), kAllowEmpty = BIT(16) };
 
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 5986)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 5994)
@@ -465,4 +465,132 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Return the pointer to the TClass (from the root dictionary) which
+// corresponds to the class with name name.
+//
+// Make sure, that a new object of this type can be created.
+//
+// In case of failure return NULL
+//
+TClass *MParContainer::GetConstructor(const char *name) const
+{
+    //
+    // try to get class from root environment
+    //
+    TClass *cls = gROOT->GetClass(name);
+    Int_t rc = 0;
+    if (!cls)
+        rc =1;
+    else
+    {
+        if (!cls->Property())
+            rc = 5;
+        if (!cls->Size())
+            rc = 4;
+        if (!cls->IsLoaded())
+            rc = 3;
+        if (!cls->HasDefaultConstructor())
+            rc = 2;
+    }
+
+    if (!rc)
+        return cls;
+
+    *fLog << err << dbginf << GetDescriptor() << " - Cannot create new instance of class '" << name << "': ";
+    switch (rc)
+    {
+    case 1:
+        *fLog << "gROOT->GetClass() returned NULL." << endl;
+        return NULL;
+    case 2:
+        *fLog << "no default constructor." << endl;
+        return NULL;
+    case 3:
+        *fLog << "not loaded." << endl;
+        return NULL;
+    case 4:
+        *fLog << "zero size." << endl;
+        return NULL;
+    case 5:
+        *fLog << "no property." << endl;
+        return NULL;
+    }
+
+    *fLog << "rtlprmft." << endl;
+
+    return NULL;
+}
+
+// --------------------------------------------------------------------------
+//
+// Return a new object of class 'name'. Make sure that the object
+// derives from the class base.
+//
+// In case of failure return NULL
+//
+// The caller is responsible of deleting the object!
+//
+MParContainer *MParContainer::GetNewObject(const char *name, TClass *base) const
+{
+    TClass *cls = GetConstructor(name);
+    if (!cls || !base)
+        return NULL;
+
+    if (!cls->InheritsFrom(base))
+    {
+        *fLog << " - Class doesn't inherit from " << base->GetName() << endl;
+        return NULL;
+    }
+
+    //
+    // create the parameter container of the the given class type
+    //
+    TObject *obj = (TObject*)cls->New();
+    if (!obj)
+    {
+        *fLog << " - Class has no default constructor." << endl;
+        *fLog << " - An abstract member functions of a base class is not overwritten." << endl;
+        return NULL;
+    }
+
+    return (MParContainer*)obj;
+}
+
+// --------------------------------------------------------------------------
+//
+// Return a new object of class 'name'. Make sure that the object
+// derives from the class base.
+//
+// In case of failure return NULL
+//
+// The caller is responsible of deleting the object!
+//
+MParContainer *MParContainer::GetNewObject(const char *name, const char *base) const
+{
+    TClass *cls = GetConstructor(name);
+    if (!cls || !base)
+        return NULL;
+
+    if (!cls->InheritsFrom(base))
+    {
+        *fLog << " - Class doesn't inherit from " << base << endl;
+        return NULL;
+    }
+
+    //
+    // create the parameter container of the the given class type
+    //
+    TObject *obj = (TObject*)cls->New();
+    if (!obj)
+    {
+        *fLog << " - Class has no default constructor." << endl;
+        *fLog << " - An abstract member functions of a base class is not overwritten." << endl;
+        return NULL;
+    }
+
+    return (MParContainer*)obj;
+}
+
 TMethodCall *MParContainer::GetterMethod(const char *name) const
 {
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 5986)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 5994)
@@ -53,4 +53,6 @@
 
     Bool_t  fReadyToSave; // should be set to true if the contents of the container is changed somehow
+
+    TClass *GetConstructor(const char *name) const;
 
 public:
@@ -140,4 +142,7 @@
     const char *GetEnvValue(const TEnv &env, TString prefix, const char *dflt) const;
 
+    MParContainer *GetNewObject(const char *name, const char *base) const;
+    MParContainer *GetNewObject(const char *name, TClass *base=MParContainer::Class()) const;
+
     ClassDef(MParContainer, 0)  //The basis for all parameter containers
 };
Index: trunk/MagicSoft/Mars/mbase/MTaskEnv.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskEnv.cc	(revision 5986)
+++ trunk/MagicSoft/Mars/mbase/MTaskEnv.cc	(revision 5994)
@@ -100,62 +100,7 @@
 MTask *MTaskEnv::GetTask(const char *name) const
 {
-    //
-    // try to get class from root environment
-    //
-    TClass *cls = gROOT->GetClass(name);
-    Int_t rc = 0;
-    if (!cls)
-        rc =1;
-    else
-    {
-        if (!cls->Property())
-            rc = 5;
-        if (!cls->Size())
-            rc = 4;
-        if (!cls->IsLoaded())
-            rc = 3;
-        if (!cls->HasDefaultConstructor())
-            rc = 2;
-    }
-
-    if (rc)
-    {
-        *fLog << err << dbginf << "Cannot create new instance of class '" << name << "': ";
-        switch (rc)
-        {
-        case 1:
-            *fLog << "gROOT->GetClass() returned NULL." << endl;
-            return NULL;
-        case 2:
-            *fLog << "no default constructor." << endl;
-            return NULL;
-        case 3:
-            *fLog << "not loaded." << endl;
-            return NULL;
-        case 4:
-            *fLog << "zero size." << endl;
-            return NULL;
-        case 5:
-            *fLog << "no property." << endl;
-            return NULL;
-        }
-    }
-
-    if (!cls->InheritsFrom(MTask::Class()))
-    {
-        *fLog << " - Class doesn't inherit from MTask." << endl;
+    MTask *task = (MTask*)GetNewObject(name, MTask::Class());
+    if (!task)
         return NULL;
-    }
-
-    //
-    // create the parameter container of the the given class type
-    //
-    MTask *task = (MTask*)cls->New();
-    if (!task)
-    {
-        *fLog << " - Class has no default constructor." << endl;
-        *fLog << " - An abstract member functions of a base class is not overwritten." << endl;
-        return NULL;
-    }
 
     task->SetName(fName);
