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
20 changes: 10 additions & 10 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
path: |
install/
configs/
Expand All @@ -45,16 +45,16 @@ jobs:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
- name: Fix binary permissions
run: chmod +x install/bin/timeslice_merger
run: chmod +x install/bin/timeframe_builder
- name: EDM4hep merging from XRootD
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "eic_xl:nightly"
run: |
# EDM4hep smoke test using built binary
./install/bin/timeslice_merger --config configs/config_ci.yml \
./install/bin/timeframe_builder --config configs/config_ci.yml \
--output merged_ci_18x275.edm4hep.root \
--source:signal:input_files root://dtn-eic.jlab.org//volatile/eic/EPIC/FULL/25.12.0/epic_craterlake/DIS/NC/18x275/minQ2=1000/pythia8NCDIS_18x275_minQ2=1000_beamEffects_xAngle=-0.025_hiDiv_1.0074.edm4hep.root \
--source:hadron_beamgas:input_files root://dtn-eic.jlab.org//volatile/eic/EPIC/FULL/25.12.0/epic_craterlake/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/275GeV/pythia8.306-1.0_ProtonBeamGas_275GeV_run001.0000.edm4hep.root \
Expand All @@ -78,16 +78,16 @@ jobs:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
- name: Fix binary permissions
run: chmod +x install/bin/timeslice_merger
run: chmod +x install/bin/timeframe_builder
- name: HepMC3 merging from XRootD
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "eic_xl:nightly"
run: |
# HepMC3 smoke test using built binary
./install/bin/timeslice_merger --config configs/config_ci.yml \
./install/bin/timeframe_builder --config configs/config_ci.yml \
--output merged_ci_18x275.hepmc3.tree.root \
--source:signal:input_files root://dtn-eic.jlab.org//volatile/eic/EPIC/EVGEN/DIS/NC/18x275/minQ2=1000/pythia8NCDIS_18x275_minQ2=1000_beamEffects_xAngle=-0.025_hiDiv_1.hepmc3.tree.root \
--source:minbias:input_files root://dtn-eic.jlab.org//volatile/eic/EPIC/EVGEN/SIDIS/pythia6-eic/1.0.0/18x275/q2_0to1/pythia_ep_noradcor_18x275_q2_0.000000001_1.0_run1.ab.hepmc3.tree.root \
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Download build binaries
uses: actions/download-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
- name: Download HepMC3 events
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
- name: Download build binaries
uses: actions/download-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
- name: Download EPIC simulated events
uses: actions/download-artifact@v4
with:
Expand All @@ -173,7 +173,7 @@ jobs:
- name: Download build binaries
uses: actions/download-artifact@v4
with:
name: timeslice-merger-binaries
name: timeframe-builder-binaries
- name: Download EDM4hep merged events
uses: actions/download-artifact@v4
with:
Expand Down
45 changes: 11 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(TimesliceMerger VERSION 1.0.0)
project(TimeframeBuilder VERSION 1.0.0)

# Set C++ standard
set(CMAKE_CXX_STANDARD 20)
Expand Down Expand Up @@ -27,30 +27,30 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${ROOT_INCLUDE_DIRS})

# Create the standalone executable
add_executable(timeslice_merger
add_executable(timeframe_builder
src/DataSource.cc
src/EDM4hepDataSource.cc
src/DataHandler.cc
src/EDM4hepDataHandler.cc
src/TimesliceMerger.cc
src/TimeframeBuilder.cc
src/CommandLineParser.cc
src/timeslice_merger_main.cc
src/timeframe_builder_main.cc
)

# Conditionally add HepMC3 sources if HepMC3 is found
if(HepMC3_FOUND)
message(STATUS "HepMC3 found - enabling HepMC3 backend support")
target_sources(timeslice_merger PRIVATE
target_sources(timeframe_builder PRIVATE
src/HepMC3DataSource.cc
src/HepMC3DataHandler.cc
)
target_compile_definitions(timeslice_merger PRIVATE HAVE_HEPMC3)
target_compile_definitions(timeframe_builder PRIVATE HAVE_HEPMC3)
else()
message(STATUS "HepMC3 not found - HepMC3 backend will not be available")
endif()

# Link against ROOT, PODIO and EDM4HEP
target_link_libraries(timeslice_merger
target_link_libraries(timeframe_builder
${ROOT_LIBRARIES}
podio::podioRootIO
EDM4HEP::edm4hep
Expand All @@ -60,43 +60,20 @@ target_link_libraries(timeslice_merger

# Conditionally link HepMC3 if found
if(HepMC3_FOUND)
target_link_libraries(timeslice_merger HepMC3::HepMC3)
target_link_libraries(timeframe_builder HepMC3::HepMC3)
# WriterRootTree lives in the optional rootIO component
if(TARGET HepMC3::rootIO)
target_link_libraries(timeslice_merger HepMC3::rootIO)
target_link_libraries(timeframe_builder HepMC3::rootIO)
endif()
endif()

# Create test executable for file format verification
add_executable(test_file_format
src/test_file_format.cc
)

# Link against ROOT only for basic format test
target_link_libraries(test_file_format
${ROOT_LIBRARIES}
)

# Create Podio API test executable
add_executable(test_podio_format
src/test_podio_format.cc
)

# Link against ROOT, PODIO and EDM4HEP for Podio API test
target_link_libraries(test_podio_format
${ROOT_LIBRARIES}
podio::podioRootIO
EDM4HEP::edm4hep
EDM4HEP::edm4hepDict
)

# Add ROOT compilation flags
#target_compile_definitions(timeslice_merger PRIVATE ${ROOT_CXX_FLAGS})
#target_compile_definitions(timeframe_builder PRIVATE ${ROOT_CXX_FLAGS})

# Set install prefix if not specified
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "Installation directory" FORCE)
endif()

# Install the executables
install(TARGETS timeslice_merger test_file_format test_podio_format DESTINATION bin)
install(TARGETS timeframe_builder DESTINATION bin)
Loading