Changeset 12034


Ignore:
Timestamp:
09/08/11 15:11:37 (14 years ago)
Author:
lyard
Message:
merged waiting run and logging states
File:
1 edited

Legend:

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

    r12033 r12034  
    11091109    Message(str);
    11101110
    1111     if (GetCurrentState() != kSM_Logging)
     1111    if (GetCurrentState() != kSM_Logging && GetCurrentState() != kSM_WaitingRun )
    11121112        return;
    11131113    //open the log and report files
     
    12341234    ofstream* targetRunFile = NULL;
    12351235    RunNumberType* cRunNumber = NULL;
    1236     if (GetCurrentState() == kSM_Logging)
     1236    if (GetCurrentState() == kSM_Logging || GetCurrentState() == kSM_WaitingRun)
    12371237    {
    12381238        list<RunNumberType>::reverse_iterator rit;
     
    17731773     //we must check if we should group this service subscription to a single fits file before we replace the / by _
    17741774    bool hasGrouping = false;
    1775     if (!sub.runFile.IsOpen() && (GetCurrentState() == kSM_Logging))
     1775    if (!sub.runFile.IsOpen() && ((GetCurrentState() == kSM_Logging) || (GetCurrentState() == kSM_WaitingRun)))
    17761776    {//will we find this service in the grouping list ?
    17771777        for (set<string>::const_iterator it=fGrouping.begin(); it!=fGrouping.end(); it++)
     
    18211821    }
    18221822    //do the actual file open
    1823     if (!sub.runFile.IsOpen() && (GetCurrentState() == kSM_Logging) && sub.runNumber != 0)
     1823    if (!sub.runFile.IsOpen() && (GetCurrentState() == kSM_WaitingRun || GetCurrentState() == kSM_Logging) && sub.runNumber != 0)
    18241824    {//buffer for the run file have already been allocated when doing the Nightly file
    18251825        string fileNameOnly;
     
    21962196        Debug("Going to the Ready state...");
    21972197   }
    2198    if (GetCurrentState() == kSM_Logging)
     2198   if (GetCurrentState() == kSM_Logging || GetCurrentState() == kSM_WaitingRun)
    21992199       StopRunPlease();
    22002200   //it may be that dim tries to write a dimInfo while we're closing files. Prevent that
Note: See TracChangeset for help on using the changeset viewer.