Ignore:
Timestamp:
06/03/11 15:57:10 (13 years ago)
Author:
lyard
Message:
Added automatic reset at noon
File:
1 edited

Legend:

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

    r10906 r10907  
    923923        fPreviousSize = 0;
    924924        bool statWarning = false;
     925        bool resetDone = false;
    925926        //loop-wait for broadcast
    926927        while (fContinueMonitoring)
     
    931932                RemoveOldestRunNumber();
    932933            }
     934            //check if daily files should be closed and reopened.
     935            if (Time().h() == 12 && !resetDone)
     936            {
     937                int cState = GetCurrentState();
     938                GoToReadyPlease();
     939                //it's noon: no run number should survive
     940                //this I'm not too sure about...
     941//                while (fRunNumber.size() > 0)
     942//                    RemoveOldestRunNumber();
     943
     944                if (cState >= kSM_NightlyOpen)
     945                    StartPlease();
     946                if (cState >= kSM_WaitingRun)
     947                    NightlyToWaitRunPlease();
     948                if (cState >= kSM_Logging)
     949                    StartRunPlease();
     950
     951                resetDone = true;
     952            }
     953            else
     954                resetDone = false;
    933955            if (fStatsPeriodDuration == 0.0f)
    934956            {
Note: See TracChangeset for help on using the changeset viewer.