Skip to content
Snippets Groups Projects

Update HLT1 PbPb sequence for 2024 ion run

Merged Benjamin Audurier requested to merge baudurie_ion_2024 into 2024-patches
Compare and Show latest version
18 files
+ 67
72
Compare changes
  • Side-by-side
  • Inline
Files
18
@@ -54,31 +54,6 @@ StatusCode AllenUpdater::initialize()
return StatusCode::SUCCESS;
}
StatusCode AllenUpdater::start()
{
auto sc = Service::start();
if (!sc.isSuccess()) return sc;
if (m_triggerEventLoop.value()) {
m_taskArena = std::make_unique<tbb::task_arena>(2, 1);
}
return sc;
}
StatusCode AllenUpdater::stop()
{
if (m_taskArena) {
// this is our "threads.join()" alternative
while (!m_evtProc->empty())
std::this_thread::sleep_for(std::chrono::milliseconds(100));
m_taskArena->terminate(); // non blocking
m_taskArena.reset();
}
return Service::stop();
}
void AllenUpdater::registerConsumer(string const& id, unique_ptr<Allen::NonEventData::Consumer> c)
{
auto it = m_pairs.find(id);
@@ -145,12 +120,7 @@ void AllenUpdater::update(gsl::span<unsigned const> odin_data)
// Run the "fake" event loop to produce the new data
if (m_triggerEventLoop.value()) {
EventContext ctx(m_evtProc->createEventContext());
m_evtProc->push(std::move(ctx));
auto result = m_evtProc->pop();
for (; !result; result = m_evtProc->pop())
std::this_thread::sleep_for(std::chrono::milliseconds(10));
auto&& [sc, context] = std::move(*result);
auto sc = m_evtProc->nextEvent(1);
if (!sc.isSuccess()) {
throw GaudiException {"Failed to process event for conditions update", name(), StatusCode::FAILURE};
}
Loading