Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Framework/Core/src/LifetimeHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "Framework/FairMQDeviceProxy.h"
#include "Framework/Formatters.h"
#include "Framework/DeviceState.h"
#include "Framework/DataTakingContext.h"
#include "Framework/Signpost.h"

#include "Headers/DataHeader.h"
Expand Down Expand Up @@ -421,6 +422,11 @@ ExpirationHandler::Handler LifetimeHelpers::enumerate(ConcreteDataMatcher const&
dh.payloadSize = sizeof(counter_t);
dh.payloadSerializationMethod = gSerializationMethodNone;
dh.tfCounter = timestamp;
try {
dh.runNumber = atoi(services.get<DataTakingContext>().runNumber.c_str());
} catch (...) {
dh.runNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dh.runNumber = 0;
dh.runNumber = -1;

@davidrohr something like this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably I would rather reserve a range of ~100 invalid positive numbers with meaning, like we have a range for unanchored MC. You can discuss the range with @ehellbar and RC.
Then, the invalid runNumber check would also need to check for that range. And if we get an error with a number from that range, it is clear how it happened.

}
dh.firstTForbit = timestamp * orbitMultiplier + orbitOffset;
DataProcessingHeader dph{timestamp, 1};
services.get<CallbackService>().call<CallbackService::Id::NewTimeslice>(dh, dph);
Expand Down