Index: trunk/FACT++/src/Configuration.cc
===================================================================
--- trunk/FACT++/src/Configuration.cc	(revision 11482)
+++ trunk/FACT++/src/Configuration.cc	(revision 11483)
@@ -528,4 +528,5 @@
         ("print-unknown",       "Print unrecognized options.")
         ("print-options",       "Print options as passed to program.")
+        ("print-wildcards",     "Print all options registered with wildcards.")
         ("dont-check",          "Do not check validity of options from files and database.")
         ("dont-check-files",    "Do not check validity of options from files.")
@@ -591,10 +592,16 @@
         //for (int j=0; j<options[i].value.size(); j++)
         //    cout << "\t = " << options[i].value[j];
-
-        //cout << "/" << options[i].position_key;
         //cout << "/" << options[i].original_tokens[0];
-        //cout << "/" << options[i].unregistered << endl;
+
+        ostringstream com;
+
+        if (opt.position_key>=0)
+            com << " [position=" << opt.position_key << "]";
         if (opt.unregistered)
-            cout << "   # option unknown";
+            com << " [unregistered]";
+
+        if (!com.str().empty())
+            cout << "  # " << com.str();
+
         cout << endl;
     }
@@ -963,9 +970,11 @@
 //!         options from the default configuration-file and options
 //!         from the environment.
-//!  - (15) Finally all options which were found and flagged as unrecognized,
+//!  - (15) Find all options which were found and flagged as unrecognized,
 //!         because they are not in the user-defined list of described
 //!         options, are collected and stored in the corresponding
 //!         data-members.
-//!  - (16) Before the function returns it check for \b --print-options
+//!  - (16) Find all options which where registered with wildcards and
+//!         store the list in fWildcardOptions.
+//!  - (17) Before the function returns it check for \b --print-options
 //!         and \b --print-unknown and performs the corresponding actions.
 //!
@@ -1058,5 +1067,5 @@
     const string globalfile = path.parent_path().string()+"/fact++.rc";
 
-    cerr << "Reading options from '" << globalfile << "'." << endl;
+    cerr << "Reading global  options from '" << globalfile << "'." << endl;
 
     ifstream gfile(globalfile.c_str());
@@ -1073,5 +1082,5 @@
     {
         fDefaultFile = getfiles["default"].as<string>();
-        cerr << "Reading options from '" << fDefaultFile << "'." << endl;
+        cerr << "Reading default options from '" << fDefaultFile << "'." << endl;
     }
 
@@ -1109,5 +1118,5 @@
     {
         fPriorityFile = getfiles["config"].as<string>();
-        cerr << "Reading options from '" << fPriorityFile << "'." << endl;
+        cerr << "Reading config options from '" << fPriorityFile << "'." << endl;
     }
 
@@ -1208,11 +1217,68 @@
     // ------------------------ (16) -------------------------
 
+    CreateWildcardOptions();
+
+    // ------------------------ (17) -------------------------
+
     if (result.count("print-options"))
         PrintOptions();
 
+    if (result.count("print-wildcards"))
+        PrintWildcardOptions();
+
     if (result.count("print-unknown"))
         PrintUnknown();
 
     return fVariables;
+}
+
+// --------------------------------------------------------------------------
+//
+//! Create a list of all options which were registered using wildcards
+//!
+void Configuration::CreateWildcardOptions()
+{
+    po::options_description opts;
+
+    for (int i=0; i<2; i++)
+    {
+        opts.add(fOptionsCommandline[i]);
+        opts.add(fOptionsConfigfile[i]);
+        opts.add(fOptionsEnvironment[i]);
+        opts.add(fOptionsDatabase[i]);
+    }
+
+    fWildcardOptions.clear();
+
+    typedef map<string,po::variable_value> Vars;
+    typedef vector<boost::shared_ptr<po::option_description>> Descs;
+
+    const Descs &desc = opts.options();
+
+    for (Vars::const_iterator io=fVariables.begin(); io!=fVariables.end(); io++)
+    {
+        for (Descs::const_iterator id=desc.begin(); id!=desc.end(); id++)
+            if ((*id)->match(io->first, false, false, false)==po::option_description::approximate_match)
+                fWildcardOptions[io->first] = (*id)->long_name();
+    }
+}
+
+// --------------------------------------------------------------------------
+//
+//! Print a list of all options which were registered using wildcards and
+//! have not be registered subsequently by access.
+//!
+void Configuration::PrintWildcardOptions() const
+{
+    cout << "Options registered with wildcards and not yet accessed:" << endl;
+
+    size_t max = 0;
+    for (map<string,string>::const_iterator it=fWildcardOptions.begin(); it!=fWildcardOptions.end(); it++)
+        if (it->second.length()>max)
+            max = it->second.length();
+
+    cout.setf(ios_base::left);
+    for (map<string,string>::const_iterator it=fWildcardOptions.begin(); it!=fWildcardOptions.end(); it++)
+        cout << setw(max+1) << it->second << " : " << it->first <<endl;
 }
 
Index: trunk/FACT++/src/Configuration.h
===================================================================
--- trunk/FACT++/src/Configuration.h	(revision 11482)
+++ trunk/FACT++/src/Configuration.h	(revision 11483)
@@ -33,4 +33,6 @@
     std::vector<std::string> fUnknownDatabase;      /// Storage container for unrecognized options retrieved from the database
 
+    std::map<std::string, std::string> fWildcardOptions;  /// Options which were registered using wildcards
+
     std::string fPriorityFile;  /// File name of the priority configuration file (overwrites option from the databse)
     std::string fDefaultFile;   /// File name of the default configuration file (usually {program}.rc)
@@ -56,4 +58,7 @@
             val=comp;
     }
+
+    /// Helper for Parse to create list of used wildcard options
+    void CreateWildcardOptions();
 
     // Helper functions for PrintOptions and GetOptions
@@ -112,4 +117,7 @@
     void PrintOptions() const;
     void PrintUnknown() const;
+    void PrintWildcardOptions() const;
+
+    const std::map<std::string,std::string> &GetWildcardOptions() const { return fWildcardOptions; }
 
     std::multimap<std::string, std::string> GetOptions() const;
@@ -118,31 +126,32 @@
     const po::variables_map &Parse(int argc, const char **argv);
 
-    bool HasVersion() const
+    bool HasVersion()
     {
         return Has("version");
     }
 
-    bool HasHelp() const
+    bool HasHelp()
     {
         return Has("help") || Has("help-config") || Has("help-env") || Has("help-database");
     }
 
-    bool HasPrint() const
+    bool HasPrint()
     {
         return Has("print-all") || Has("print") || Has("print-default") ||
             Has("print-database") || Has("print-config") ||
             Has("print-environment") || Has("print-unknown") ||
-            Has("print-options");
+            Has("print-options") || Has("print-wildcards");
     }
 
     // Simplified access to the parsed options
     template<class T>
-        T Get(const std::string &var) const { return fVariables[var].as<T>(); }
-    template<class T>
-        std::vector<T> Vec(const std::string &var) const { return Has(var) ? fVariables[var].as<std::vector<T>>() : std::vector<T>(); }
-    bool Has(const std::string &var) const { return fVariables.count(var)>0; }
+        T Get(const std::string &var) { fWildcardOptions.erase(var); return fVariables[var].as<T>(); }
+    bool Has(const std::string &var) { fWildcardOptions.erase(var); return fVariables.count(var)>0; }
+
+    template<class T>
+        std::vector<T> Vec(const std::string &var) { return Has(var) ? fVariables[var].as<std::vector<T>>() : std::vector<T>(); }
 
     template<class T, class S>
-    T Get(const std::string &var, const S &val) const
+    T Get(const std::string &var, const S &val)
     {
         std::ostringstream str;
@@ -152,5 +161,5 @@
 
     template<class T>
-    bool Has(const std::string &var, const T &val) const
+    bool Has(const std::string &var, const T &val)
     {
         std::ostringstream str;
@@ -160,5 +169,5 @@
 
     template<class T, class S>
-    T GetDef(const std::string &var, const S &val) const
+    T GetDef(const std::string &var, const S &val)
     {
         return Has(var, val) ? Get<T>(var, val) : Get<T>(var+"default");
@@ -166,11 +175,11 @@
 
     template<class T>
-    bool HasDef(const std::string &var, const T &val) const
+    bool HasDef(const std::string &var, const T &val)
     {
         return Has(var, val) ? true : Has(var+"default");
     }
-
-    template<class T>
-    std::map<std::string, T> GetMap(const std::string &var) const
+/*
+    template<class T>
+    std::map<std::string, T> GetMap(const std::string &var)
     {
         const size_t len = var.length();
@@ -186,5 +195,5 @@
 
     template<class T>
-    std::vector<std::string> GetKeys(const std::string &var) const
+    std::vector<std::string> GetKeys(const std::string &var)
     {
         const size_t len = var.length();
@@ -198,5 +207,5 @@
         return rc;
     }
-
+*/
     const std::string &GetName() const { return fName; }
 };
Index: trunk/FACT++/src/Main.h
===================================================================
--- trunk/FACT++/src/Main.h	(revision 11482)
+++ trunk/FACT++/src/Main.h	(revision 11483)
@@ -2,4 +2,5 @@
 #define FACT_MAIN
 
+#include <map>
 #include <thread>
 #include <functional>
@@ -41,5 +42,5 @@
 
 template<class T, class S>
-int Main(const Configuration &conf, bool dummy=false)
+int Main(Configuration &conf, bool dummy=false)
 {
     static T shell(conf.GetName().c_str(),
@@ -70,10 +71,30 @@
     io_service.Write(now, "| Start:    "+now.GetAsStr("%c"));
     io_service.Write(now, "\\----------------------- Options ------------------------");
-    const multimap<string,string> map = conf.GetOptions();
-    for (multimap<string,string>::const_iterator it=map.begin(); it!=map.end(); it++)
+    const multimap<string,string> mmap = conf.GetOptions();
+    for (multimap<string,string>::const_iterator it=mmap.begin(); it!=mmap.end(); it++)
         io_service.Write(now, ": "+it->first+(it->second.empty()?"":" = ")+it->second);
     io_service.Write(now, "\\------------------- Evaluating options -----------------");
+    const int rc = io_service.EvalOptions(conf);
 
-    const int rc = io_service.EvalConfiguration(conf);
+    const map<string,string> &wco = conf.GetWildcardOptions();
+    if (wco.size()>0)
+    {
+        io_service.Write(now, "------------- Unrecognized wildcard options -------------", MessageImp::kWarn);
+
+        size_t max = 0;
+        for (map<string,string>::const_iterator it=wco.begin(); it!=wco.end(); it++)
+            if (it->second.length()>max)
+                max = it->second.length();
+
+        for (map<string,string>::const_iterator it=wco.begin(); it!=wco.end(); it++)
+        {
+            ostringstream str;
+            str.setf(ios_base::left);
+            str << setw(max+1) << it->second << " : " << it->first;
+            io_service.Write(now, str.str(), MessageImp::kWarn);
+        }
+        return 127;
+    }
+
     io_service.Message("==================== Starting main loop =================");
     if (rc>=0)
Index: trunk/FACT++/src/biasctrl.cc
===================================================================
--- trunk/FACT++/src/biasctrl.cc	(revision 11482)
+++ trunk/FACT++/src/biasctrl.cc	(revision 11483)
@@ -537,5 +537,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         SetEndpoint(conf.Get<string>("addr"));
Index: trunk/FACT++/src/datalogger.cc
===================================================================
--- trunk/FACT++/src/datalogger.cc	(revision 11482)
+++ trunk/FACT++/src/datalogger.cc	(revision 11483)
@@ -2336,5 +2336,5 @@
 //! @param conf the configuration object that should be used
 //!
-int DataLogger::EvalConfiguration(const Configuration& conf)
+int DataLogger::EvalOptions(Configuration& conf)
 {
     fDebugIsOn = conf.Get<bool>("debug");
Index: trunk/FACT++/src/drivectrl.cc
===================================================================
--- trunk/FACT++/src/drivectrl.cc	(revision 11482)
+++ trunk/FACT++/src/drivectrl.cc	(revision 11483)
@@ -1,2 +1,4 @@
+#include <boost/bind.hpp>
+
 #include "FACT.h"
 #include "Dim.h"
@@ -410,5 +412,5 @@
     {
         boost::asio::async_read_until(*this, fBuffer, '\n',
-                                      bind(&ConnectionDrive::HandleReceivedReport, this,
+                                      boost::bind(&ConnectionDrive::HandleReceivedReport, this,
                                                   dummy::error, dummy::bytes_transferred));
     }
@@ -421,5 +423,5 @@
 
         fKeepAlive.expires_from_now(boost::posix_time::seconds(10));
-        fKeepAlive.async_wait(bind(&ConnectionDrive::HandleKeepAlive,
+        fKeepAlive.async_wait(boost::bind(&ConnectionDrive::HandleKeepAlive,
                                           this, dummy::error));
     }
@@ -834,5 +836,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         SetEndpoint(conf.Get<string>("addr"));
Index: trunk/FACT++/src/fadctrl.cc
===================================================================
--- trunk/FACT++/src/fadctrl.cc	(revision 11482)
+++ trunk/FACT++/src/fadctrl.cc	(revision 11483)
@@ -1790,5 +1790,5 @@
 
     template<class V>
-    bool CheckConfigVal(const Configuration &conf, V max, const string &name, const string &sub)
+    bool CheckConfigVal(Configuration &conf, V max, const string &name, const string &sub)
     {
         if (!conf.HasDef(name, sub))
@@ -1810,5 +1810,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         // ---------- General setup ---------
Index: trunk/FACT++/src/fscctrl.cc
===================================================================
--- trunk/FACT++/src/fscctrl.cc	(revision 11482)
+++ trunk/FACT++/src/fscctrl.cc	(revision 11483)
@@ -506,5 +506,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         SetEndpoint(conf.Get<string>("addr"));
Index: trunk/FACT++/src/ftmctrl.cc
===================================================================
--- trunk/FACT++/src/ftmctrl.cc	(revision 11482)
+++ trunk/FACT++/src/ftmctrl.cc	(revision 11483)
@@ -1971,5 +1971,5 @@
 
     template<class V>
-    bool CheckConfigVal(const Configuration &conf, V max, const string &name, const string &sub)
+    bool CheckConfigVal(Configuration &conf, V max, const string &name, const string &sub)
     {
         if (!conf.HasDef(name, sub))
@@ -1991,5 +1991,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         // ---------- General setup ----------
Index: trunk/FACT++/src/mcp.cc
===================================================================
--- trunk/FACT++/src/mcp.cc	(revision 11482)
+++ trunk/FACT++/src/mcp.cc	(revision 11483)
@@ -179,4 +179,5 @@
     int Reset(const EventImp &evt)
     {
+        fRunType = "";
         return kStateIdle;
         /*
@@ -200,6 +201,10 @@
     }
 
+    string fRunType;
+
     int StartRun(const EventImp &evt)
     {
+        Message("Starting configuration '"+evt.GetString()+"' for new run.");
+        fRunType = evt.GetString();
         return kStateConfiguring1;
     }
@@ -225,5 +230,5 @@
                 if (fStatusLog.second!=30/*kSM_WaitForRun*/)
                     Dim::SendCommand("DATA_LOGGER/WAIT_FOR_RUN_NUMBER");
-                Dim::SendCommand("FTM_CONTROL/CONFIGURE", "data");
+                Dim::SendCommand("FTM_CONTROL/CONFIGURE", fRunType);
                 return kStateConfiguring2;
             }
@@ -236,5 +241,5 @@
                     return GetCurrentState();
 
-                Dim::SendCommand("FAD_CONTROL/CONFIGURE", "data");
+                Dim::SendCommand("FAD_CONTROL/CONFIGURE", fRunType);
                 return kStateConfiguring3;
             }
@@ -248,6 +253,5 @@
                 Message("START DATA TAKING");
                 Fatal("Distribute run-number to start datalogger!");
-                Fatal("fadctrl should go out of Configured after first event received!");
-                Fatal("Must configure if FTM should be started or not?");
+                //Fatal("Must configure if FTM should be started or not?");
                 Dim::SendCommand("FTM_CONTROL/START_RUN");
                 return kStateConfigured;
@@ -329,5 +333,5 @@
 
 
-        AddEvent("START", kStateIdle)
+        AddEvent("START", "C", kStateIdle)
             (bind(&StateMachineMCP::StartRun, this, placeholders::_1))
             ("");
@@ -352,5 +356,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         //SetEndpoint(conf.Get<string>("addr"));
@@ -401,5 +405,5 @@
 
 template<class T>
-int RunShell(const Configuration &conf)
+int RunShell(Configuration &conf)
 {
     return Main<T, StateMachineMCP>(conf);
Index: trunk/FACT++/src/scheduler.cc
===================================================================
--- trunk/FACT++/src/scheduler.cc	(revision 11482)
+++ trunk/FACT++/src/scheduler.cc	(revision 11483)
@@ -691,5 +691,5 @@
     }
 
-    int EvalConfiguration(const Configuration &conf)
+    int EvalOptions(Configuration &conf)
     {
         fDatabase       = conf.Get<string>("schedule-database");
