Changeset 12442 for trunk/FACT++/src


Ignore:
Timestamp:
11/07/11 03:21:44 (13 years ago)
Author:
lyard
Message:
added autostart option
File:
1 edited

Legend:

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

    r12431 r12442  
    384384    vector<string> backLogBuffer;
    385385    bool shouldBackLog;
     386    bool fShouldAutoStart;
     387    bool fAutoStarted;
    386388public:
    387389    int Write(const Time &time, const std::string &txt, int qos=kMessage);
     
    863865
    864866     fRunNumberService = NULL;
    865 
     867     fShouldAutoStart = false;
     868     fAutoStarted = false;
    866869     if(fDebugIsOn)
    867870     {
     
    952955void DataLogger::infoHandler()
    953956{
     957    if (!fAutoStarted && fShouldAutoStart)
     958    {
     959        fAutoStarted = true;
     960        SetCurrentState(StartPlease());
     961    }
    954962    DimInfo* I = getInfo();
    955963
     
    22782286    //configure if the number of subscriptions and fits files is on or off.
    22792287    fNumSubAndFitsIsOn = !conf.Get<bool>("no-numsubs-service");
    2280 
     2288    //should we open the daily files at startup ?
     2289    if (conf.Has("start-daily-files"))
     2290        if (conf.Get<bool>("start-daily-files"))
     2291        {
     2292            fShouldAutoStart = true;
     2293        }
    22812294    return -1;
    22822295}
     
    23532366        ("no-filename-service", po_bool(),       "Disable update of filename service")
    23542367        ("no-numsubs-service",  po_bool(),       "Disable update of number-of-subscriptions service")
     2368        ("start-daily-files",   po_bool(),       "Starts the logger in DailyFileOpen instead of Ready")
    23552369        ;
    23562370
Note: See TracChangeset for help on using the changeset viewer.