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
12 changes: 4 additions & 8 deletions .github/workflows/test_dependency_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
- uses: actions/checkout@v4
- name: build
run: |
# LD_LIBRARY_PATH needs to be set HERE in order to propagate to CTest now. (I don't like this!)
# CTest needs the LD_LIBRARY_PATH set so that ROOT can find the dictionaries for Podio IO.
# (Remember that ROOT won't use RPath for this purpose)
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=`pwd` \
-DUSE_PYTHON=ON \
Expand Down Expand Up @@ -43,29 +47,21 @@ jobs:

- name: JTest
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
# Note that podio needs to be on the LD_LIBRARY_PATH, not merely someone's RPath, because
# Cling needs to be able to find the libpodioDict*
ctest --test-dir build --output-on-failure -R jana-plugin-jtest-tests
- name: jana-unit-tests
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build --output-on-failure -R jana-unit-tests
- name: TimesliceExample with simple (physics event) topology
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build --output-on-failure -R jana-example-timeslices-simple-tests
- name: TimesliceExample with complex (timeslice) topology
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build --output-on-failure -R jana-example-timeslices-complex-tests
- name: Janadot
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build --output-on-failure -R jana-plugin-janadot-tests
- name: Other examples
run: |
export LD_LIBRARY_PATH=/app/podio/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build --output-on-failure -R "jana-example-dst-tests|jana-example-tutorial-tests|jana-example-eventgroup-tests|jana-example-unit-tests|jana-example-podio-tests"


Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test_platform_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
#os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
os: [ubuntu-24.04]

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on for available platforms
runs-on: ${{ matrix.os }}
Expand All @@ -25,13 +25,12 @@ jobs:
- name: deps
run: |
sudo apt-get update
sudo apt-get install -y libzmq3-dev libxerces-c-dev python3-dev
sudo apt-get install -y cppzmq-dev libxerces-c-dev python3-dev
- name: cmake
run: |
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
cmake ../ -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/Linux \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_CXX_STANDARD=20 \
-DUSE_PYTHON=ON \
-DUSE_ROOT=OFF \
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ else()
endif()

if (${USE_ZEROMQ})
find_package(ZeroMQ REQUIRED)
find_package(cppzmq REQUIRED)
endif()

if (${USE_XERCES})
Expand Down Expand Up @@ -192,7 +192,7 @@ else()
message(STATUS "USE_ROOT Off")
endif()
if (${USE_ZEROMQ})
message(STATUS "USE_ZEROMQ On")
message(STATUS "USE_ZEROMQ On --> " ${cppzmq_DIR})
else()
message(STATUS "USE_ZEROMQ Off")
endif()
Expand Down
34 changes: 0 additions & 34 deletions cmake/FindZeroMQ.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/JANAConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if(USE_ROOT)
endif()
set(USE_ZEROMQ @USE_ZEROMQ@)
if(USE_ZEROMQ)
find_dependency(ZeroMQ REQUIRED)
find_dependency(cppzmq REQUIRED)
endif()

# Provide user with shared libraries by default if JANA was built with them.
Expand Down
2 changes: 0 additions & 2 deletions cmake/MakeConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/AddJanaLibrary.cmake"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/AddJanaTest.cmake"
DESTINATION "lib/JANA/cmake")

install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindZeroMQ.cmake"
DESTINATION "lib/JANA/cmake")
22 changes: 21 additions & 1 deletion src/libraries/JANA/JFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright 2023, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#include <JANA/JException.h>
#include <JANA/JLogger.h>
#include <JANA/JFactory.h>
#include <JANA/JEvent.h>
#include <JANA/JEventSource.h>
Expand Down Expand Up @@ -240,13 +242,31 @@ void JFactory::Create(const JEvent& event) {
throw JException("Invalid callback style");
}
}
catch (JException& ex) {
// Save everything already created even if we throw an exception
// This is so that we leave everything in a valid state just in case someone tries to catch the exception recover,
// such as EICrecon. (Remember that a missing collection in the podio frame will segfault if anyone tries to write that frame)
// Note that the collections themselves won't know that they exited early

LOG_DEBUG(GetLogger()) << "Exception in JFactory::Create, prefix=" << GetPrefix()
<< ", message=" << ex.GetMessage();
mStatus = Status::Excepted;
mException = std::current_exception();
for (auto* output : GetOutputs()) {
output->LagrangianStore(*event.GetFactorySet(), JDatabundle::Status::Excepted);
}
for (auto* output : GetVariadicOutputs()) {
output->LagrangianStore(*event.GetFactorySet(), JDatabundle::Status::Excepted);
}
throw;
}
catch (...) {
// Save everything already created even if we throw an exception
// This is so that we leave everything in a valid state just in case someone tries to catch the exception recover,
// such as EICrecon. (Remember that a missing collection in the podio frame will segfault if anyone tries to write that frame)
// Note that the collections themselves won't know that they exited early

LOG << "Exception in JFactory::Create, prefix=" << GetPrefix();
LOG_DEBUG(GetLogger()) << "Exception in JFactory::Create, prefix=" << GetPrefix();
mStatus = Status::Excepted;
mException = std::current_exception();
for (auto* output : GetOutputs()) {
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/JANA/JLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ inline std::ostream& operator<<(std::ostream& s, JLogger::Level l) {
case JLogger::Level::INFO: return s << "info";
case JLogger::Level::WARN: return s << "warn";
case JLogger::Level::ERROR: return s << "error";
case JLogger::Level::FATAL: return s << "fatal";
case JLogger::Level::FATAL: return s << "critical";
default: return s << "off";
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/libraries/JANA/Services/JParameterManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,21 @@ inline void JParameterManager::Parse(const std::string& in, JLogger::Level& out)
else if (std::strcmp(token.c_str(), "warn") == 0) {
out = JLogger::Level::WARN;
}
else if (std::strcmp(token.c_str(), "warning") == 0) {
out = JLogger::Level::WARN;
}
else if (std::strcmp(token.c_str(), "error") == 0) {
out = JLogger::Level::ERROR;
}
else if (std::strcmp(token.c_str(), "err") == 0) {
out = JLogger::Level::ERROR;
}
else if (std::strcmp(token.c_str(), "fatal") == 0) {
out = JLogger::Level::FATAL;
}
else if (std::strcmp(token.c_str(), "critical") == 0) {
out = JLogger::Level::FATAL;
}
else if (std::strcmp(token.c_str(), "off") == 0) {
out = JLogger::Level::OFF;
}
Expand Down
Loading