Skip to content

Commit

Permalink
Merge branch 'main' into 562-detailed-trajectory-information-writer
Browse files Browse the repository at this point in the history
  • Loading branch information
DraTeots committed Apr 15, 2023
2 parents fee13ac + cb427ab commit 56de198
Show file tree
Hide file tree
Showing 269 changed files with 5,206 additions and 5,030 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Autogenerated file
src/services/io/podio/datamodel_glue.h
src/services/io/podio/datamodel_includes.h

# Indirectory builds
include/*
Expand Down
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ find_package(JANA REQUIRED)
message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 CMake : ${JANA_DIR}")
message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 includes: ${JANA_INCLUDE_DIR}")
message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 library : ${JANA_LIBRARY}")
add_compile_definitions(HAVE_PODIO)
# TODO: NWB: Do this correctly in JANA via target_compile_definitions for v2.1.1
# TODO: NWB: Maybe we want these to be prefixed, e.g. JANA2_HAVE_PODIO

# PODIO, EDM4HEP, EDM4EIC event models
find_package(podio REQUIRED)
Expand Down Expand Up @@ -116,14 +119,10 @@ set(EICRECON_VERBOSE_CMAKE OFF)

# Add CMake additional functionality:
include(cmake/print_functions.cmake) # Helpers to print fancy headers, file names, etc
include(cmake/print_subdirectory_tree.cmake) # Prints processed subdirectories
include(cmake/jana_plugin.cmake) # Add common settings for plugins
list (APPEND CMAKE_MODULE_PATH ${EICRECON_SOURCE_DIR}/cmake) # Find Find<Modules>.cmake


# ------------------------------------------------------------------
print_grand_header(" B U I L D E I C R E C O N P A R T S ")
# ------------------------------------------------------------------
add_subdirectory( src/services )
add_subdirectory( src/algorithms )
add_subdirectory( src/benchmarks )
Expand All @@ -134,14 +133,6 @@ add_subdirectory( src/scripts )
add_subdirectory( src/tests )
add_subdirectory( src/utilities )



# Print what we had built
print_header("CMake processed subdirectories:")
print_subdirectory_tree()
message(STATUS "\n-------------------------------")


# Install all cmake helpers
include(CMakePackageConfigHelpers)
configure_package_config_file(cmake/EICreconConfig.cmake.in cmake/EICreconConfig.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/EICrecon)
Expand Down
26 changes: 26 additions & 0 deletions cmake/FindFastJet.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# - Locate FastJet library
# Defines:
#
# FASTJET_FOUND
# FASTJET_INCLUDE_DIR
# FASTJET_INCLUDE_DIRS (not cached)
# FASTJET_LIBRARY
# FASTJET_LIBRARIES (not cached)
# FASTJET_LIBRARY_DIRS (not cached)

find_path(FASTJET_INCLUDE_DIR fastjet/version.hh
HINTS $ENV{FASTJET_ROOT}/include ${FASTJET_ROOT_DIR}/include)

find_library(FASTJET_LIBRARY NAMES fastjet
HINTS $ENV{FASTJET_ROOT}/lib ${FASTJET_ROOT_DIR}/lib)

# handle the QUIETLY and REQUIRED arguments and set FASTJET_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FastJet DEFAULT_MSG FASTJET_INCLUDE_DIR FASTJET_LIBRARY)

mark_as_advanced(FASTJET_FOUND FASTJET_INCLUDE_DIR FASTJET_LIBRARY)

set(FASTJET_INCLUDE_DIRS ${FASTJET_INCLUDE_DIR})
set(FASTJET_LIBRARIES ${FASTJET_LIBRARY})
get_filename_component(FASTJET_LIBRARY_DIRS ${FASTJET_LIBRARY} PATH)
30 changes: 19 additions & 11 deletions cmake/jana_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ endmacro()
macro(plugin_glob_all _name)

# But... GLOB here makes this file just hot pluggable
file(GLOB LIB_SRC_FILES *.cc *.cpp *.c)
file(GLOB PLUGIN_SRC_FILES *.cc *.cpp *.c)
file(GLOB HEADER_FILES *.h *.hh *.hpp)
file(GLOB LIB_SRC_FILES CONFIGURE_DEPENDS *.cc *.cpp *.c)
file(GLOB PLUGIN_SRC_FILES CONFIGURE_DEPENDS *.cc *.cpp *.c)
file(GLOB HEADER_FILES CONFIGURE_DEPENDS *.h *.hh *.hpp)

# We need plugin relative path for correct headers installation
string(REPLACE ${EICRECON_SOURCE_DIR}/src "" PLUGIN_RELATIVE_PATH ${PROJECT_SOURCE_DIR})
Expand Down Expand Up @@ -149,13 +149,6 @@ macro(plugin_glob_all _name)
message(STATUS "plugin_glob_all:${_name}: PLUGIN_RLTV_PATH ${PLUGIN_RELATIVE_PATH}")
endif()

# To somehow control GLOB lets at least PRINT files we are going to compile:
message(STATUS "Source files:")
print_file_names(" " ${PLUGIN_SRC_FILES}) # Prints source files
message(STATUS "Plugin-main file is: ${PLUGIN_CC_FILE}")
message(STATUS "Header files:")
print_file_names(" " ${HEADER_FILES}) # Prints header files

endmacro()


Expand Down Expand Up @@ -199,7 +192,6 @@ endmacro()
macro(plugin_add_irt _name)
if(NOT IRT_FOUND)
find_package(IRT REQUIRED)
set(IRT_INCLUDE_DIR ${IRT_DIR}/../../include)
endif()
plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${IRT_INCLUDE_DIR})
plugin_link_libraries(${PLUGIN_NAME} IRT)
Expand Down Expand Up @@ -249,3 +241,19 @@ macro(plugin_add_cern_root _name)
#plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} EDM4EIC::edm4eic algorithms_digi_library algorithms_tracking_library ROOT::EG)
plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} ROOT::EG)
endmacro()


# Adds FastJet for a plugin
macro(plugin_add_fastjet _name)

if(NOT FASTJET_FOUND)
find_package(FastJet REQUIRED)
endif()

# Add include directories
plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${FASTJET_INCLUDE_DIRS} )

# Add libraries
plugin_link_libraries(${PLUGIN_NAME} ${FASTJET_LIBRARIES})

endmacro()
25 changes: 0 additions & 25 deletions cmake/print_subdirectory_tree.cmake

This file was deleted.

1 change: 0 additions & 1 deletion docs/design/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Recommended CMake for a plugin:
cmake_minimum_required(VERSION 3.16)
get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
print_header(">>>> P L U G I N : ${PLUGIN_NAME} <<<<") # Fancy printing
# Function creates ${PLUGIN_NAME}_plugin and ${PLUGIN_NAME}_library targets
# Setting default includes, libraries and installation paths
Expand Down
112 changes: 0 additions & 112 deletions docs/get-started/edpm.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/get-started/eic-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ cd ~/eic

curl --location https://get.epic-eic.org | bash
./eic-shell

# or, if /cvmfs is available:

singularity exec /cvmfs/singularity.opensciencegrid.org/eicweb/jug_xl:nightly eic-shell
~~~~

_n.b. if on the JLab CUE you should do module load singularity/3.9.5 first_
Expand Down
1 change: 0 additions & 1 deletion docs/howto/make_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ cmake_minimum_required(VERSION 3.16)
# Automatically set plugin name the same as the direcotry name
# Don't forget string(REPLACE " " "_" PLUGIN_NAME ${PLUGIN_NAME}) if this dir has spaces in its name
get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
print_header(">>>> P L U G I N : ${PLUGIN_NAME} <<<<") # Fancy printing
# Function creates ${PLUGIN_NAME}_plugin and ${PLUGIN_NAME}_library targets
# Setting default includes, libraries and installation paths
Expand Down
21 changes: 5 additions & 16 deletions docs/howto/use_singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,9 @@

Eic image require singularity \> 3.0

The [oficial installation instructions](https://sylabs.io/guides/3.0/user-guide/installation.html) have many steps.
If you use Debian sid, you may be able to install `singularity-container`. If you use Ubuntu or Red Hat, the `deb` and `rpm` packages at https://github.com/sylabs/singularity/releases/ may be useful.

If you use ubuntu (mint, whatever compatible), there is a
[debian repo with 3.10.3 version](https://packages.debian.org/source/sid/singularity-container),
which works pretty nicely (You will have to install dependencies, it will print them\...)

```bash
sudo apt install containernetworking-plugins
wget http://ftp.fi.debian.org/debian/pool/main/s/singularity-container/singularity-container_3.10.3+ds1-1_amd64.deb
sudo dpkg -i singularity-container_3.10.3+ds1-1_amd64.deb
```

Please don\'t install NeuroDebian repo (first in google search) as its singularity v2.6
and eic image require singularity \> 3.0.
The [official installation instructions](https://docs.sylabs.io/guides/latest/user-guide/quick_start.html#quick-installation-steps) may be useful for other operating systems.

## Install work environment

Expand All @@ -31,10 +20,10 @@ laptops). It also creates eic\_shell with the right environment setup,
prepares the current dir to work with detector or etc.

```bash
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh | bash
curl -L https://get.epic-eic.org | bash
```

**install.sh** checks if it is run on BNL or JLab farms, so existing
This checks if it is run on BNL or JLab farms, so existing
CVMFS images are used and installation is almost instant. On local
systems singularity images will be downloaded.

Expand All @@ -43,7 +32,7 @@ singularity images are being copied, disable CVMFS behaviour, and other
parameters:

```bash
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh
curl -L https://get.epic-eic.org > install.sh
chmod +x install.sh
./install.sh --help
```
Expand Down
2 changes: 0 additions & 2 deletions src/algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.16)

print_header(">>>> D I R E C T O R Y : algorithms <<<<") # Fancy printing

add_subdirectory( calorimetry )
add_subdirectory( tracking )
add_subdirectory( digi )
Expand Down
1 change: 0 additions & 1 deletion src/algorithms/calorimetry/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.16)

set(PLUGIN_NAME "algorithms_calorimetry")
print_header(">>>> P L U G I N : ${PLUGIN_NAME} <<<<") # Fancy printing

# Function creates ${PLUGIN_NAME}_plugin and ${PLUGIN_NAME}_library targets
# Setting default includes, libraries and installation paths
Expand Down
Loading

0 comments on commit 56de198

Please sign in to comment.