Skip to content

Commit 3f8e858

Browse files
committed
DPL: attempt at adding the run number to timers and enumerations
1 parent ca4e47c commit 3f8e858

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Framework/Core/src/LifetimeHelpers.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "Framework/FairMQDeviceProxy.h"
2626
#include "Framework/Formatters.h"
2727
#include "Framework/DeviceState.h"
28+
#include "Framework/DataTakingContext.h"
2829
#include "Framework/Signpost.h"
2930

3031
#include "Headers/DataHeader.h"
@@ -421,6 +422,11 @@ ExpirationHandler::Handler LifetimeHelpers::enumerate(ConcreteDataMatcher const&
421422
dh.payloadSize = sizeof(counter_t);
422423
dh.payloadSerializationMethod = gSerializationMethodNone;
423424
dh.tfCounter = timestamp;
425+
try {
426+
dh.runNumber = atoi(services.get<DataTakingContext>().runNumber.c_str());
427+
} catch (...) {
428+
dh.runNumber = 0;
429+
}
424430
dh.firstTForbit = timestamp * orbitMultiplier + orbitOffset;
425431
DataProcessingHeader dph{timestamp, 1};
426432
services.get<CallbackService>().call<CallbackService::Id::NewTimeslice>(dh, dph);

0 commit comments

Comments
 (0)