Ignore:
Timestamp:
07/20/11 10:27:17 (13 years ago)
Author:
tbretz
Message:
Added a registry for wildcarded options to detect unaccessed options; for this EvalConfiguration(const Configuration&) has been changed to EvalOptions(Configuration&)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/mcp.cc

    r11481 r11483  
    179179    int Reset(const EventImp &evt)
    180180    {
     181        fRunType = "";
    181182        return kStateIdle;
    182183        /*
     
    200201    }
    201202
     203    string fRunType;
     204
    202205    int StartRun(const EventImp &evt)
    203206    {
     207        Message("Starting configuration '"+evt.GetString()+"' for new run.");
     208        fRunType = evt.GetString();
    204209        return kStateConfiguring1;
    205210    }
     
    225230                if (fStatusLog.second!=30/*kSM_WaitForRun*/)
    226231                    Dim::SendCommand("DATA_LOGGER/WAIT_FOR_RUN_NUMBER");
    227                 Dim::SendCommand("FTM_CONTROL/CONFIGURE", "data");
     232                Dim::SendCommand("FTM_CONTROL/CONFIGURE", fRunType);
    228233                return kStateConfiguring2;
    229234            }
     
    236241                    return GetCurrentState();
    237242
    238                 Dim::SendCommand("FAD_CONTROL/CONFIGURE", "data");
     243                Dim::SendCommand("FAD_CONTROL/CONFIGURE", fRunType);
    239244                return kStateConfiguring3;
    240245            }
     
    248253                Message("START DATA TAKING");
    249254                Fatal("Distribute run-number to start datalogger!");
    250                 Fatal("fadctrl should go out of Configured after first event received!");
    251                 Fatal("Must configure if FTM should be started or not?");
     255                //Fatal("Must configure if FTM should be started or not?");
    252256                Dim::SendCommand("FTM_CONTROL/START_RUN");
    253257                return kStateConfigured;
     
    329333
    330334
    331         AddEvent("START", kStateIdle)
     335        AddEvent("START", "C", kStateIdle)
    332336            (bind(&StateMachineMCP::StartRun, this, placeholders::_1))
    333337            ("");
     
    352356    }
    353357
    354     int EvalConfiguration(const Configuration &conf)
     358    int EvalOptions(Configuration &conf)
    355359    {
    356360        //SetEndpoint(conf.Get<string>("addr"));
     
    401405
    402406template<class T>
    403 int RunShell(const Configuration &conf)
     407int RunShell(Configuration &conf)
    404408{
    405409    return Main<T, StateMachineMCP>(conf);
Note: See TracChangeset for help on using the changeset viewer.