From 7395a6f37fe07c0b97d915e96e379006becc6a3d Mon Sep 17 00:00:00 2001 From: Chris Pinkenburg Date: Fri, 26 Jun 2026 13:21:05 -0400 Subject: [PATCH 1/3] fix crash is input file contains no data events --- offline/framework/fun4allraw/SingleTriggeredInput.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/offline/framework/fun4allraw/SingleTriggeredInput.cc b/offline/framework/fun4allraw/SingleTriggeredInput.cc index f2d3b34ef1..434aaac876 100644 --- a/offline/framework/fun4allraw/SingleTriggeredInput.cc +++ b/offline/framework/fun4allraw/SingleTriggeredInput.cc @@ -729,6 +729,15 @@ void SingleTriggeredInput::FillPool() if (!FilesDone()) { int eventvectorsize = FillEventVector(); + // this seems a unique signature for raw data files which only contain the + // begin and end run event but no data events. FillEventVector() returns -1 + // and since no events were read the m_PacketEventDeque is empty + if (eventvectorsize < 0 && m_PacketEventDeque.empty()) + { + std::cout << Name() << ": No data Events in input file " << FileName() << std::endl; + AllDone(1); + return; + } if (eventvectorsize != 0) { if (Gl1Input()->m_bclkdiffarray_map.empty()) @@ -1226,7 +1235,6 @@ int SingleTriggeredInput::ReadEvent() size_t size = m_PacketEventDeque.begin()->second.size(); std::cout << "deque size: " << size << std::endl; } - auto* ref_evt = m_PacketEventDeque.begin()->second.front(); RunNumber(ref_evt->getRunNumber()); From 9171015afe8801b42ed748b6c1a9adec3ba42ecd Mon Sep 17 00:00:00 2001 From: Chris Pinkenburg Date: Fri, 26 Jun 2026 13:21:39 -0400 Subject: [PATCH 2/3] check for runnumber flag and do not call EndRun if it does not exist --- offline/framework/fun4all/Fun4AllServer.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/offline/framework/fun4all/Fun4AllServer.cc b/offline/framework/fun4all/Fun4AllServer.cc index 9dc68afbb0..41e4dd6924 100644 --- a/offline/framework/fun4all/Fun4AllServer.cc +++ b/offline/framework/fun4all/Fun4AllServer.cc @@ -1105,7 +1105,14 @@ int Fun4AllServer::EndRun(const int runno) int Fun4AllServer::End() { recoConsts *rc = recoConsts::instance(); - EndRun(rc->get_IntFlag("RUNNUMBER")); // call SubsysReco EndRun methods for current run + if (rc->FlagExist("RUNNUMBER")) + { + EndRun(rc->get_IntFlag("RUNNUMBER")); // call SubsysReco EndRun methods for current run + } + else + { + std::cout << PHWHERE << " No RUNNUMBER Int Flag set, not calling EndRun() for registered modules" << std::endl; + } int i = 0; std::vector>::iterator iter; gROOT->cd(default_Tdirectory.c_str()); From 7c2cf3216d31715150d8ef890ba97669b88f8a79 Mon Sep 17 00:00:00 2001 From: Chris Pinkenburg Date: Fri, 26 Jun 2026 17:53:23 -0400 Subject: [PATCH 3/3] remove dep on libboost_filesystem.so --- offline/framework/fun4all/Makefile.am | 1 - simulation/g4simulation/g4main/Makefile.am | 1 - 2 files changed, 2 deletions(-) diff --git a/offline/framework/fun4all/Makefile.am b/offline/framework/fun4all/Makefile.am index 8f9d9e2019..30ca180fcb 100644 --- a/offline/framework/fun4all/Makefile.am +++ b/offline/framework/fun4all/Makefile.am @@ -66,7 +66,6 @@ libfun4all_la_SOURCES = \ libfun4all_la_LIBADD = \ libSubsysReco.la \ libTDirectoryHelper.la \ - -lboost_filesystem \ -lFROG \ -lffaobjects \ -lphool \ diff --git a/simulation/g4simulation/g4main/Makefile.am b/simulation/g4simulation/g4main/Makefile.am index bff8a37125..c7412330f8 100644 --- a/simulation/g4simulation/g4main/Makefile.am +++ b/simulation/g4simulation/g4main/Makefile.am @@ -36,7 +36,6 @@ libg4testbench_la_LDFLAGS = \ libg4testbench_la_LIBADD = \ libphg4hit.la \ - -lboost_filesystem \ -lffamodules \ -lfun4all \ -lg4decayer \