Skip to content

Commit

Permalink
Add an Overlay algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed May 14, 2024
1 parent c463932 commit 2387535
Show file tree
Hide file tree
Showing 5 changed files with 672 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ set(PACKAGE_VERSION_PATCH 0)

set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")

find_package(ROOT REQUIRED COMPONENTS RIO Tree)
SET(CMAKE_CXX_FLAGS "-fPIC -Wall -Wextra -Wpedantic ${CMAKE_CXX_FLAGS}")

find_package(EDM4HEP REQUIRED)
find_package(k4FWCore REQUIRED)
find_package(Gaudi REQUIRED)
find_package(k4FWCore REQUIRED)
find_package(DD4hep REQUIRED)
find_package(k4SimGeant4 REQUIRED)
find_package(ROOT REQUIRED COMPONENTS RIO Tree)
# find_package(k4SimGeant4 REQUIRED)

include(GNUInstallDirs)

Expand Down
39 changes: 39 additions & 0 deletions k4Reco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,42 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]

set(sources Overlay/components/OverlayTiming.cpp
)
gaudi_add_module(k4RecoPlugins
SOURCES ${sources}
LINK Gaudi::GaudiKernel
Gaudi::GaudiAlgLib
k4FWCore::k4FWCore
k4FWCore::k4Interface
EDM4HEP::edm4hep
DD4hep::DDRec
DD4hep::DDCore
)
target_include_directories(k4RecoPlugins PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

add_executable(test Overlay/test/test.cpp)
target_link_libraries(test PRIVATE EDM4HEP::edm4hep podio::podioRootIO)

# install(TARGETS k4RecoPlugins
# EXPORT ${CMAKE_PROJECT_NAME}Targets
# RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib
# PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/@{CMAKE_PROJECT_NAME}"
# COMPONENT dev)

include(CTest)

set(GAUDI_GENCONF_DIR "genConfDir")

function(set_test_env _testname)
set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}:$<TARGET_FILE_DIR:k4RecoPlugins>:$<TARGET_FILE_DIR:ROOT::Core>:$<TARGET_FILE_DIR:k4FWCore::k4FWCore>:$<TARGET_FILE_DIR:EDM4HEP::edm4hep>:$<TARGET_FILE_DIR:podio::podio>:$ENV{LD_LIBRARY_PATH}
PYTHONPATH=${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}/${GAUDI_GENCONF_DIR}:$<TARGET_FILE_DIR:k4FWCore::k4FWCore>/../python:$ENV{PYTHONPATH}
PATH=$<TARGET_FILE_DIR:k4FWCore::k4FWCore>/../bin:$ENV{PATH}
K4PROJECTTEMPLATE=${CMAKE_CURRENT_LIST_DIR}/
)
endfunction()
Loading

0 comments on commit 2387535

Please sign in to comment.