Changeset 11030 for trunk


Ignore:
Timestamp:
06/16/11 10:33:16 (13 years ago)
Author:
Daniela Dorner
Message:
added configuration parameters
File:
1 edited

Legend:

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

    r11029 r11030  
    3131
    3232// things to be done/checked/changed
    33 // * do not use --database, but sth like --database-scheduler
    34 //   to be independent of the configuration database
     33// * --schedule-database should be required
    3534// * move definition of config parameters to AutoScheduler class
    3635//   + read in from config
     36// * in some (all?) loops iterator over vector can be replaced by counter
    3737
    3838// other things to do
     
    157157    string fDatabase;
    158158    string fDBName;
     159    int fDurationCalRun; //unit: minutes
     160    int fDurationPedRun; //unit: minutes
     161    int fDurationRepos; //unit: minutes
    159162
    160163    int Schedule()
     
    162165        bool error = false;
    163166
    164         time_duration runtimec(0, 3, 0);
    165         time_duration runtimep(0, 3, 0);
     167        time_duration runtimec(0, fDurationCalRun, 0);
     168        time_duration runtimep(0, fDurationPedRun, 0);
     169        time_duration repostime(0, fDurationRepos, 0);
    166170        time_duration mintime(1, 0, 0);
    167         time_duration repostime(0, 5, 0);
    168         //ptime startsched=microsec_clock::local_time();
    169171
    170172        const ptime startsched(microsec_clock::local_time());
     
    716718    {
    717719        fDatabase = conf.Get<string>("schedule-database");
     720        fDurationCalRun = conf.Get<int>("duration-cal-run");
     721        fDurationPedRun = conf.Get<int>("duration-ped-run");
     722        fDurationRepos  = conf.Get<int>("duration-repos");
    718723
    719724        return true;
     
    809814                                           ,  "Database link as in\n\t[user:[password]@][server][:port][/database]\nOverwrites options from the default configuration file.")
    810815        ("mintime",           var<int>(),     "minimum observation time")
     816        ("duration-cal-run",  var<int>()
     817#if BOOST_VERSION >= 104200
     818         ->required()
     819#endif
     820                                           ,     "duration of calibration run [min]")
     821        ("duration-ped-run",  var<int>()
     822#if BOOST_VERSION >= 104200
     823         ->required()
     824#endif
     825                                           ,     "duration of pedestal run [min]")
     826        ("duration-repos",    var<int>()
     827#if BOOST_VERSION >= 104200
     828         ->required()
     829#endif
     830                                           ,     "duration of repositioning [min]")
    811831        ;
    812832
Note: See TracChangeset for help on using the changeset viewer.