Add run start and stop times to the Run data products
This is a long-standing issue that was last looked at in November...
The art::Run class provides a way to store the run start and stop times, but artdaq is not currently making use of this function.
This functionality should be added.
#3 Updated by Kurt Biery over 6 years ago
- Status changed from Assigned to Resolved
The setting of the beginTime is done in the RawEventQueueReader class. This class is used to pull RawEvents off the queue between the EventStore and the art thread in the EventBuilders. The time is now set for Run, SubRun, and Event principals.
The time value that is used id the UNIX system time (number of seconds since 1970).
The setting of the endTime in the Run and SubRun principals is done in NetMonInput_source when the first endSubRun message is received. There are comments in the NetMonInput_source.cc code that describe a couple of additional options that were tried but did not work.
The net result of this change is that the Run and SubRun principals in each file have the correct run start and subrun start times, respectively. The end time for both are simply the end time of the subrun (since we can't know in advance when the end of the run will happen).
There is a new utility function in artdaq/Version/TimeUtils.h to convert the UNIX time to a string (convertUNIXTimeToString).
This task took longer than the original estimate of 4 hours. (more like 8-10 hours, just counting time spent this week)