Skip to content

Commit

Permalink
Merge pull request #328 from JeffersonLab/nbrei_release_candidate
Browse files Browse the repository at this point in the history
Cut release 2.3.1
  • Loading branch information
nathanwbrei committed Aug 1, 2024
2 parents a76d04a + 1657dd4 commit 4b95840
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 36 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/eicshell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/jana_home \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE \
-DCMAKE_CXX_STANDARD=20 \
-DUSE_PYTHON=ON \
-DUSE_ROOT=ON \
Expand All @@ -45,26 +45,31 @@ jobs:
with:
platform-release: "jug_xl:nightly"
run: |
$GITHUB_WORKSPACE/jana_home/bin/jana \
-Pjana:plugin_path=$GITHUB_WORKSPACE/jana_home/plugins \
-Pplugins=JTest \
-Pjana:nevents=100
export JANA_HOME=$GITHUB_WORKSPACE
export JANA_PLUGIN_PATH=$JANA_HOME/plugins
export LD_LIBRARY_PATH=$JANA_HOME/lib:$LD_LIBRARY_PATH
$GITHUB_WORKSPACE/bin/jana -Pplugins=JTest -Pjana:nevents=100
- name: Run jana-unit-tests
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
run: |
$GITHUB_WORKSPACE/jana_home/bin/jana-unit-tests
export JANA_HOME=$GITHUB_WORKSPACE
export JANA_PLUGIN_PATH=$JANA_HOME/plugins
export LD_LIBRARY_PATH=$JANA_HOME/lib:$LD_LIBRARY_PATH
$GITHUB_WORKSPACE/bin/jana-unit-tests
- name: Run TimesliceExample with simple (physics event) topology
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
run: |
echo "--- Running TimesliceExample with simple topology ------------------------------"
$GITHUB_WORKSPACE/jana_home/bin/jana \
-Pjana:plugin_path=$GITHUB_WORKSPACE/jana_home/plugins \
export JANA_HOME=$GITHUB_WORKSPACE
export JANA_PLUGIN_PATH=$JANA_HOME/plugins
export LD_LIBRARY_PATH=$JANA_HOME/lib:$LD_LIBRARY_PATH
$GITHUB_WORKSPACE/bin/jana \
-Pplugins=TimesliceExample \
-Pjana:nevents=100 \
events.root
Expand All @@ -75,7 +80,10 @@ jobs:
platform-release: "jug_xl:nightly"
run: |
echo "--- Running TimesliceExample with simple topology ------------------------------"
$GITHUB_WORKSPACE/jana_home/bin/jana -Pjana:plugin_path=$GITHUB_WORKSPACE/jana_home/plugins -Pplugins=TimesliceExample -Pjana:nevents=100 timeslices.root
export JANA_HOME=$GITHUB_WORKSPACE
export JANA_PLUGIN_PATH=$JANA_HOME/plugins
export LD_LIBRARY_PATH=$JANA_HOME/lib:$LD_LIBRARY_PATH
$GITHUB_WORKSPACE/bin/jana -Pplugins=TimesliceExample -Pjana:nevents=100 timeslices.root
- name: Compile EICrecon
Expand All @@ -84,9 +92,12 @@ jobs:
platform-release: "jug_xl:nightly"
run: |
echo "--- Compiling EICrecon ---"
export JANA_HOME=$GITHUB_WORKSPACE
export LD_LIBRARY_PATH=$JANA_HOME/lib:$LD_LIBRARY_PATH
cd ..
git clone https://github.com/eic/EICrecon
cd EICrecon
cmake -S . -B build -DJANA_DIR=$GITHUB_WORKSPACE/jana_home/lib/cmake/JANA
cmake -S . -B build -DJANA_DIR=$JANA_HOME/lib/cmake/JANA
cmake --build build --target install -- -j8
- name: Generate EICrecon input data
Expand All @@ -108,5 +119,8 @@ jobs:
setup: "/opt/detector/epic-main/bin/thisepic.sh"
run: |
echo "--- Running EICrecon ---"
eicrecon sim_e_1GeV_20GeV_craterlake.edm4hep.root
export JANA_HOME=$GITHUB_WORKSPACE
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/../EICrecon/lib:$JANA_HOME/lib:$LD_LIBRARY_PATH
export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/../EICrecon/lib/EICrecon/plugins
../EICrecon/bin/eicrecon sim_e_1GeV_20GeV_craterlake.edm4hep.root
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Makefile
/bin/
/include/
/lib/
/plugins/

# Doxygen generated files
docs/html/*
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT implicit hints

project(jana2 VERSION 2.3.0)
project(jana2 VERSION 2.3.1)

set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Enable -fPIC for all targets

Expand Down
7 changes: 7 additions & 0 deletions docs/Download.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ title: JANA: Multi-threaded HENP Event Reconstruction
- [See online doxygen documentation](http://www.jlab.org/JANA/jana_doc_latest/index.html)
- [Download doxygen documentation](http://www.jlab.org/JANA/jana_doc_latest.tar.gz)

### 2.3.1
This release fixes a bug which caused the `janadot` plugin to stop producing output. It also drops support for Podio <= 00-17 by replacing the user-provided `PodioTypeMap` with the built-in `PodioT::collection_type`.

- [See release on GitHub](https://github.com/JeffersonLab/JANA2/releases/tag/v2.3.1)
- [See online doxygen documentation](http://www.jlab.org/JANA/jana_doc_2.3.1/index.html)
- [Download doxygen documentation](http://www.jlab.org/JANA/jana_doc_2.3.1.tar.gz)

### 2.3.0
- [See release on GitHub](https://github.com/JeffersonLab/JANA2/releases/tag/v2.3.0)
- [See online doxygen documentation](http://www.jlab.org/JANA/jana_doc_2.3.0/index.html)
Expand Down
2 changes: 1 addition & 1 deletion src/examples/SubeventExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ add_executable(SubeventExample ${SubeventExample_SOURCES})

target_link_libraries(SubeventExample jana2)
set_target_properties(SubeventExample PROPERTIES PREFIX "" OUTPUT_NAME "SubeventExample")
install(TARGETS SubeventExample DESTINATION programs)
install(TARGETS SubeventExample DESTINATION bin)


2 changes: 1 addition & 1 deletion src/libraries/JANA/Engine/JScheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void JScheduler::checkin_unprotected(JArrow* assignment, JArrowMetrics::Status l
}


JArrow* JScheduler::checkout(int arrow_index) {
JArrow* JScheduler::checkout(size_t arrow_index) {
// Note that this lets us check out Inactive arrows, whereas checkout_unprotected() does not. This because we are called by JApplicationInspector
// whereas checkout_unprotected is called by JWorker. This is because JArrowProcessingController::request_pause shuts off the topology
// instead of shutting off the workers, which in hindsight might have been the wrong choice.
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/JANA/Engine/JScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class JScheduler {

/// Lets a Worker, test case, or user request a specific arrow. Returns nullptr if arrow can not be
/// checked up because it's no longer active or because it's already at its max parallelism.
JArrow* checkout(int arrow_index);
JArrow* checkout(size_t arrow_index);

/// Logger is public so that somebody else can configure it
JLogger logger;
Expand Down
35 changes: 29 additions & 6 deletions src/libraries/JANA/JEventSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ class JEventSource : public jana::omni::JComponent, public jana::omni::JHasOutpu
// Skip these events due to nskip
event->SetEventNumber(m_event_count); // Default event number to event count
auto previous_origin = event->GetJCallGraphRecorder()->SetInsertDataOrigin( JCallGraphRecorder::ORIGIN_FROM_SOURCE); // (see note at top of JCallGraphRecorder.h)
CallWithJExceptionWrapper("JEventSource::GetEvent", [&](){
GetEvent(event);
});
GetEvent(event);
event->GetJCallGraphRecorder()->SetInsertDataOrigin( previous_origin );
m_event_count += 1;
return Result::FailureTryAgain; // Reject this event and recycle it
Expand All @@ -298,9 +296,7 @@ class JEventSource : public jana::omni::JComponent, public jana::omni::JHasOutpu
event->SetSequential(false);
event->GetJCallGraphRecorder()->Reset();
auto previous_origin = event->GetJCallGraphRecorder()->SetInsertDataOrigin( JCallGraphRecorder::ORIGIN_FROM_SOURCE); // (see note at top of JCallGraphRecorder.h)
CallWithJExceptionWrapper("JEventSource::GetEvent", [&](){
GetEvent(event);
});
GetEvent(event);
for (auto* output : m_outputs) {
output->InsertCollection(*event);
}
Expand Down Expand Up @@ -335,6 +331,33 @@ class JEventSource : public jana::omni::JComponent, public jana::omni::JHasOutpu
return Result::Success;
}
}
catch (JException& ex) {
if (ex.function_name.empty()) ex.function_name = "JEventSource::GetEvent";
if (ex.type_name.empty()) ex.type_name = m_type_name;
if (ex.instance_name.empty()) ex.instance_name = m_prefix;
if (ex.plugin_name.empty()) ex.plugin_name = m_plugin_name;
throw ex;
}
catch (std::exception& e){
auto ex = JException(e.what());
ex.exception_type = JTypeInfo::demangle_current_exception_type();
ex.nested_exception = std::current_exception();
ex.function_name = "JEventSource::GetEvent";
ex.type_name = m_type_name;
ex.instance_name = m_prefix;
ex.plugin_name = m_plugin_name;
throw ex;
}
catch (...) {
auto ex = JException("Unknown exception");
ex.exception_type = JTypeInfo::demangle_current_exception_type();
ex.nested_exception = std::current_exception();
ex.function_name = "JEventSource::GetEvent";
ex.type_name = m_type_name;
ex.instance_name = m_prefix;
ex.plugin_name = m_plugin_name;
throw ex;
}
}

/// Calls the optional-and-discouraged user-provided FinishEvent virtual method, enforcing
Expand Down
3 changes: 0 additions & 3 deletions src/libraries/JANA/JFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ void JFactory::Create(const std::shared_ptr<const JEvent>& event) {
}

void JFactory::DoInit() {
if (GetApplication() == nullptr) {
throw JException("JFactory::DoInit(): Null JApplication pointer");
}
if (mStatus == Status::Uninitialized) {
CallWithJExceptionWrapper("JFactory::Init", [&](){ Init(); });
mStatus = Status::Unprocessed;
Expand Down
1 change: 0 additions & 1 deletion src/libraries/JANA/JFactorySet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ bool JFactorySet::Add(JMultifactory *multifactory) {

auto helpers = multifactory->GetHelpers();
for (auto fac : helpers->GetAllFactories()) {
fac->SetApplication(multifactory->GetApplication());
Add(fac);
}
helpers->mIsFactoryOwner = false;
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/JANA/JMultifactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,12 @@ void JMultifactory::SetCollection(std::string tag, std::unique_ptr<typename JFac

template <typename T>
void JMultifactoryHelper<T>::Process(const std::shared_ptr<const JEvent> &event) {
mMultiFactory->SetApplication(this->GetApplication());
mMultiFactory->Execute(event);
}

#if JANA2_HAVE_PODIO
template <typename T>
void JMultifactoryHelperPodio<T>::Process(const std::shared_ptr<const JEvent> &event) {
mMultiFactory->SetApplication(this->GetApplication());
mMultiFactory->Execute(event);
}
#endif // JANA2_HAVE_PODIO
Expand Down
14 changes: 7 additions & 7 deletions src/libraries/JANA/JVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
#define JANA2_HAVE_ROOT @JANA2_HAVE_ROOT@
#define JANA2_HAVE_XERCES @JANA2_HAVE_XERCES@

#define JANA2_COMMIT_HASH "@JVERSION_COMMIT_HASH@"
#define JANA2_COMMIT_DATE "@JVERSION_COMMIT_DATE@"
#define JANA2_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"


struct JVersion {

static const uint64_t major = @jana2_VERSION_MAJOR@;
static const uint64_t minor = @jana2_VERSION_MINOR@;
static const uint64_t patch = @jana2_VERSION_PATCH@;

inline static const std::string last_commit_hash = "@JVERSION_COMMIT_HASH@";
inline static const std::string last_commit_date = "@JVERSION_COMMIT_DATE@";
inline static const std::string installdir = "@CMAKE_INSTALL_PREFIX@";

static const bool is_unknown = @JVERSION_UNKNOWN@;
static const bool is_release = @JVERSION_RELEASE@;
static const bool is_modified = @JVERSION_MODIFIED@;
Expand All @@ -29,9 +29,9 @@ struct JVersion {
static constexpr uint64_t GetMinorNumber() { return minor; }
static constexpr uint64_t GetPatchNumber() { return patch; }

static std::string GetCommitHash() { return last_commit_hash; }
static std::string GetCommitDate() { return last_commit_date; }
static std::string GetInstallDir() { return installdir; }
static std::string GetCommitHash() { return JANA2_COMMIT_HASH; }
static std::string GetCommitDate() { return JANA2_COMMIT_DATE; }
static std::string GetInstallDir() { return JANA2_INSTALL_PREFIX; }

static constexpr bool HasPodio() { return JANA2_HAVE_PODIO; }
static constexpr bool HasROOT() { return JANA2_HAVE_ROOT; }
Expand Down
19 changes: 17 additions & 2 deletions src/libraries/JANA/Services/JComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,28 @@ void JComponentManager::initialize_components() {

// Factories
for (auto* fac : dummy_fac_set.GetAllFactories()) {
fac->DoInit();
try {
// Run Init() on each factory in order to capture any parameters
// (and eventually services) that are retrieved via GetApplication().
fac->DoInit();
}
catch (...) {
// Swallow any exceptions!
// Everything in dummy_fac_set will be destroyed immediately after this.
// The same exception will be thrown from a fresh factory
// set once processing begins, unless the factory is never used.
}
fac->Summarize(m_summary);
}

// Multifactories
for (auto* fac : dummy_fac_set.GetAllMultifactories()) {
fac->DoInit();
try {
fac->DoInit();
}
catch (...) {
// Swallow any exceptions! See above.
}
fac->Summarize(m_summary);
}
}
Expand Down

0 comments on commit 4b95840

Please sign in to comment.