Changeset 16956 for trunk/FACT++


Ignore:
Timestamp:
07/18/13 13:05:54 (11 years ago)
Author:
tbretz
Message:
Added a check that the new night-as-int is never decreased; improved log output.
File:
1 edited

Legend:

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

    r16834 r16956  
    127127
    128128        // Get current night
    129         const uint32_t night = Time().NightAsInt();
     129        const Time now;
     130
     131        const uint32_t night = now.NightAsInt();
    130132        if (night==fNightAsInt)
    131133            return true;
     134
     135        if (night<fNightAsInt)
     136        {
     137            fMsg.Warn("New night "+to_string(night)+" ["+now.GetAsStr()+"] before current night "+to_string(night)+"... keeping old one.");
     138            fMsg.Warn("Please check the system clock.");
     139            return true;
     140        }
    132141
    133142        // Check for run numbers
     
    161170            str << "First night...";
    162171        else
    163             str << "Night has changd from " << fNightAsInt << "... new";
    164         str << " run-number is " << night << "-" << setfill('0') << setw(3) << fRunNumber << " [" << (fPath.empty()?".":fPath) << "]";
     172            str << "Night has changed from " << fNightAsInt << " [" << now << "]... ";
     173        str << " next run-number is " << night << "-" << setfill('0') << setw(3) << fRunNumber << " [" << (fPath.empty()?".":fPath) << "]";
    165174        fMsg.Message(str);
    166175
Note: See TracChangeset for help on using the changeset viewer.