From aca7bdc2e8ca52e96dd5a06a1c4561ede407c11f Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Thu, 2 May 2024 00:30:32 -0400 Subject: [PATCH] TimesliceExample finally runs on Podio v0.99 --- .github/workflows/ccpp-docker.yml | 59 ++++++++++++++++++- .../TimesliceExample/MyTimesliceSplitter.h | 2 +- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp-docker.yml b/.github/workflows/ccpp-docker.yml index 204d7a572..b6941577b 100644 --- a/.github/workflows/ccpp-docker.yml +++ b/.github/workflows/ccpp-docker.yml @@ -7,8 +7,8 @@ on: branches: [ master ] jobs: - build: - name: Build JANA2 with all options enabled + jana2_env_everything_except_cuda: + name: Build JANA2 with all dependencies except CUDA runs-on: ubuntu-latest container: image: nbrei/jana2_env_everything_except_cuda @@ -60,3 +60,58 @@ jobs: $GITHUB_WORKSPACE/Linux/bin/jana -Pplugins=TimesliceExample -Pjana:nevents=100 timeslices.root + jana2_with_eicrecon: + name: Build JANA2 within eic-shell + runs-on: ubuntu-latest + container: + image: eicweb/jug_xl:latest + + # Build Docker container and run the entrypoint.sh script in it + steps: + + - uses: actions/checkout@v4 + + - name: cmake + run: | + mkdir -p $GITHUB_WORKSPACE/build + cd $GITHUB_WORKSPACE/build + cmake ../ -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/Linux \ + -DUSE_PYTHON=ON \ + -DUSE_ROOT=ON \ + -DUSE_PODIO=ON \ + -DUSE_XERCES=ON \ + -DXercesC_DIR=/usr \ + -DUSE_ZEROMQ=ON \ + -Dpodio_DIR=/app/podio/install/lib/cmake/podio/ + - name: make + run: | + cd $GITHUB_WORKSPACE/build + make + - name: make install + run: | + cd $GITHUB_WORKSPACE/build + make install + - name: JTest + run: | + echo "--- Running JTest plugin -----------------------" + export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/Linux/plugins + $GITHUB_WORKSPACE/Linux/bin/jana -PPLUGINS=JTest -Pjana:nevents=100 + - name: jana-unit-tests + run: | + echo "--- Running jana-unit-tests ------------------------------" + export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/Linux/plugins + $GITHUB_WORKSPACE/Linux/bin/jana-unit-tests + - name: TimesliceExample with simple (physics event) topology + run: | + echo "--- Running TimesliceExample with simple topology ------------------------------" + export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/Linux/plugins + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/Linux/lib:/app/podio/install/lib:$LD_LIBRARY_PATH + $GITHUB_WORKSPACE/Linux/bin/jana -Pplugins=TimesliceExample -Pjana:nevents=100 events.root + - name: TimesliceExample with complex (timeslice) topology + run: | + echo "--- Running TimesliceExample with complex topology ------------------------------" + export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/Linux/plugins + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/Linux/lib:/app/podio/install/lib:$LD_LIBRARY_PATH + $GITHUB_WORKSPACE/Linux/bin/jana -Pplugins=TimesliceExample -Pjana:nevents=100 timeslices.root + + diff --git a/src/examples/TimesliceExample/MyTimesliceSplitter.h b/src/examples/TimesliceExample/MyTimesliceSplitter.h index ac4249334..96b658a9f 100644 --- a/src/examples/TimesliceExample/MyTimesliceSplitter.h +++ b/src/examples/TimesliceExample/MyTimesliceSplitter.h @@ -36,7 +36,7 @@ struct MyTimesliceSplitter : public JEventUnfolder { event_clusters_out->push_back(m_timeslice_clusters_in()->at(child_idx)); auto event_info_out = std::make_unique(); - event_info_out->push_back(EventInfo(event_nr, timeslice_nr, 0)); + event_info_out->push_back(MutableEventInfo(event_nr, timeslice_nr, 0)); LOG_DEBUG(GetLogger()) << "MyTimesliceSplitter: Timeslice " << parent.GetEventNumber() << ", Event " << child.GetEventNumber()