Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Framework/include/QualityControl/TaskRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class TaskRunner : public framework::Task
/// \brief Callback for CallbackService::Id::Start (DPL) a.k.a. RUN transition (FairMQ)
void start(framework::ServiceRegistryRef services);
/// \brief Callback for CallbackService::Id::Stop (DPL) a.k.a. STOP transition (FairMQ)
void stop() override;
void stop(framework::ServiceRegistryRef services);
/// \brief Callback for CallbackService::Id::Reset (DPL) a.k.a. RESET DEVICE transition (FairMQ)
void reset();

Expand Down
7 changes: 4 additions & 3 deletions Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void TaskRunner::init(InitContext& iCtx)
// registering state machine callbacks
try {
iCtx.services().get<CallbackService>().set<CallbackService::Id::Start>([this, services = iCtx.services()]() mutable { start(services); });
iCtx.services().get<CallbackService>().set<CallbackService::Id::Stop>([this, services = iCtx.services()]() { stop(services); });
iCtx.services().get<CallbackService>().set<CallbackService::Id::Reset>([this]() { reset(); });
iCtx.services().get<CallbackService>().set<CallbackService::Id::Stop>([this]() { stop(); });
} catch (o2::framework::RuntimeErrorRef& ref) {
ILOG(Error) << "Error during initialization: " << o2::framework::error_from_ref(ref).what << ENDM;
}
Expand Down Expand Up @@ -320,9 +320,10 @@ void TaskRunner::start(ServiceRegistryRef services)
}
}

void TaskRunner::stop()
void TaskRunner::stop(ServiceRegistryRef services)
{
try {
mActivity = o2::quality_control::core::computeActivity(services, mActivity);
if (mCycleOn) {
mTask->endOfCycle();
mCycleNumber++;
Expand Down Expand Up @@ -414,7 +415,7 @@ void TaskRunner::endOfActivity()

auto now = getCurrentTimestamp();
mTimekeeper->updateByCurrentTimestamp(now);
mTimekeeper->setEndOfActivity(0, mTaskConfig.fallbackActivity.mValidity.getMax(), now, activity_helpers::getCcdbEorTimeAccessor(mActivity.mId)); // TODO: get end of run from ECS/BK if possible
mTimekeeper->setEndOfActivity(mActivity.mValidity.getMax(), mTaskConfig.fallbackActivity.mValidity.getMax(), now, activity_helpers::getCcdbEorTimeAccessor(mActivity.mId));

mTask->endOfActivity(mObjectsManager->getActivity());
mObjectsManager->removeAllFromServiceDiscovery();
Expand Down
Loading