Changeset 15157 for trunk


Ignore:
Timestamp:
03/26/13 17:18:41 (12 years ago)
Author:
tbretz
Message:
Fixed a problem which could cause the fadctrl after a successsfull configuration to go first to WritingData (old file still open), Connected (old file closed) and WritingData again (new file open). Now it will only go to WritingData when the new file has been opened.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventBuilderWrapper.h

    r15099 r15157  
    10691069    }
    10701070
     1071    bool IsRunFileOpen()
     1072    {
     1073        return fLastOpened==fRunNumber-1;
     1074    }
     1075
    10711076    bool IncreaseRunNumber(uint32_t run)
    10721077    {
  • trunk/FACT++/src/fadctrl.cc

    r15105 r15157  
    15931593            }
    15941594
    1595             return GetNumFilesOpen()>0 ? FAD::State::kWritingData : FAD::State::kConnected;
     1595            return GetNumFilesOpen()>0 && IsRunFileOpen() ? FAD::State::kWritingData : FAD::State::kConnected;
    15961596        }
    15971597
     
    16911691
    16921692        T::AddStateName(FAD::State::kWritingData, "WritingData",
    1693                         "The event builder has an open file (that does not mean that new events are currently received)");
     1693                        "The event builder has an open file which belongs to the last run started (that does not mean that new events are currently received)");
    16941694
    16951695        // FAD Commands
Note: See TracChangeset for help on using the changeset viewer.