diff --git a/.gitignore b/.gitignore index f578f3b11eb6af2d90ff02ccae2eb27def542546..5cef2aaf9a5d56626a6dc4a4258774dfd9b3bba0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ *gcov **/*~ **/*.bak -**/*log build/ Framework/Particles/GeneratedParticleProperties.inc flymd.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1086812c77b0be27f773c27c2235135ace04b884..1bc50e665c00b23c53ef16812db92fba158991c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GIT_STRATEGY: fetch + GIT_STRATEGY: fetch # clone: fresh clone, fetch: update GIT_SSL_NO_VERIFY: "1" GIT_DEPTH: "1" # to re-use clones also in different forks @@ -13,7 +13,8 @@ variables: # location of AirShowerPhysics/corsika-data CORSIKA_DATA: "${CI_PROJECT_DIR}/Data" # the git submodule # _alternatively_ corsika-data can be downloaded as submodule: - GIT_SUBMODULE_STRATEGY: normal + GIT_SUBMODULE_STRATEGY: normal # none: we get the submodules in before_script, + # normal: get submodules automatically # @@ -79,11 +80,7 @@ check-clang-format: stage: config tags: - corsika - variables: - before_script: - - cd Data && for F in `find . -name "*.bz2" | grep -v ".git"`; do [ ! -f ${F%%.bz2} ] && bunzip2 -vk $F; done - - cd ${CI_PROJECT_DIR} - script: + script: - mkdir -p build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON @@ -94,7 +91,6 @@ check-clang-format: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -138,7 +134,6 @@ config-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -195,7 +190,6 @@ build-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -252,7 +246,6 @@ test-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -305,7 +298,6 @@ build_test-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -365,7 +357,6 @@ example-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -415,7 +406,6 @@ build_test_example-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -470,7 +460,6 @@ install-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull artifacts: @@ -540,7 +529,6 @@ coverage: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" @@ -580,7 +568,6 @@ documentation: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" @@ -613,7 +600,6 @@ sanity: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc index 6eb662ec40f0e858a003e66498a8c67c77bdfe41..09766d9582104b4c1639749c5c8de72af06df7d4 100644 --- a/Documentation/Examples/vertical_EAS.cc +++ b/Documentation/Examples/vertical_EAS.cc @@ -18,7 +18,6 @@ #include <corsika/process/ProcessSequence.h> #include <corsika/process/StackProcess.h> #include <corsika/process/energy_loss/EnergyLoss.h> -#include <corsika/process/interaction_counter/InteractionCounter.h> #include <corsika/process/longitudinal_profile/LongitudinalProfile.h> #include <corsika/process/observation_plane/ObservationPlane.h> #include <corsika/process/on_shell_check/OnShellCheck.h> @@ -37,6 +36,7 @@ #include <corsika/setup/SetupTrajectory.h> #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/CorsikaFenv.h> +#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <iomanip> #include <iostream> diff --git a/Processes/InteractionCounter/CMakeLists.txt b/Processes/InteractionCounter/CMakeLists.txt index f828ac98a064f97abb357390a11772abeb8d6ecb..7602d4e7c8250d8960d1686290846a5e826d4283 100644 --- a/Processes/InteractionCounter/CMakeLists.txt +++ b/Processes/InteractionCounter/CMakeLists.txt @@ -1,7 +1,7 @@ set ( MODEL_HEADERS - InteractionCounter.h - InteractionHistogram.h + InteractionCounter.hpp + InteractionHistogram.hpp ) set ( diff --git a/Processes/InteractionCounter/InteractionCounter.h b/Processes/InteractionCounter/InteractionCounter.hpp similarity index 99% rename from Processes/InteractionCounter/InteractionCounter.h rename to Processes/InteractionCounter/InteractionCounter.hpp index f91aa51013db377eed82e2c3f3a48ea83915a916..83bc130011b1f77e8101143af4cdb2684e46b18b 100644 --- a/Processes/InteractionCounter/InteractionCounter.h +++ b/Processes/InteractionCounter/InteractionCounter.hpp @@ -8,9 +8,10 @@ #pragma once +#include <corsika/process/interaction_counter/InteractionHistogram.hpp> + #include <corsika/process/InteractionProcess.h> #include <corsika/process/ProcessSequence.h> -#include <corsika/process/interaction_counter/InteractionHistogram.h> #include <corsika/setup/SetupStack.h> namespace corsika::process::interaction_counter { diff --git a/Processes/InteractionCounter/InteractionHistogram.cc b/Processes/InteractionCounter/InteractionHistogram.cc index 583184b0765fe470b3a2c53b2c5855ade0fa9fec..a54b63bd185cbc0d2892bc564f1c294889d5e9eb 100644 --- a/Processes/InteractionCounter/InteractionHistogram.cc +++ b/Processes/InteractionCounter/InteractionHistogram.cc @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/process/interaction_counter/InteractionHistogram.h> +#include <corsika/process/interaction_counter/InteractionHistogram.hpp> #include <fstream> #include <string> diff --git a/Processes/InteractionCounter/InteractionHistogram.h b/Processes/InteractionCounter/InteractionHistogram.hpp similarity index 99% rename from Processes/InteractionCounter/InteractionHistogram.h rename to Processes/InteractionCounter/InteractionHistogram.hpp index 9d060a4ef85f73a2165567f15d53359572543ff6..ec9124e491d2be28eab999561fde2c7c831e5224 100644 --- a/Processes/InteractionCounter/InteractionHistogram.h +++ b/Processes/InteractionCounter/InteractionHistogram.hpp @@ -6,6 +6,8 @@ * the license. */ +#pragma once + #include <corsika/particles/ParticleProperties.h> #include <corsika/units/PhysicalUnits.h> diff --git a/Processes/InteractionCounter/testInteractionCounter.cc b/Processes/InteractionCounter/testInteractionCounter.cc index 7d8f78041b8ee55c17e345822787e2b01bd9a08d..08fc95113c2955b5782247d55133336d15e01d5b 100644 --- a/Processes/InteractionCounter/testInteractionCounter.cc +++ b/Processes/InteractionCounter/testInteractionCounter.cc @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/process/interaction_counter/InteractionCounter.h> +#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <corsika/environment/Environment.h> #include <corsika/environment/HomogeneousMedium.h> diff --git a/ThirdParty/.gitignore b/ThirdParty/.gitignore index b4bac0ecf395dd655e583e048902f92da63774ce..0d7fe279527897921a3d07f84e8f70c1dd05ffac 100644 --- a/ThirdParty/.gitignore +++ b/ThirdParty/.gitignore @@ -1,2 +1 @@ eigen-eigen-b3f3d4950030/ - diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index 27c166eb9b76fed84519a37dbf735db0f4c1646f..19cc00b37ffb1b15d30c7ea97f6b79d554d8b7df 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -1,3 +1,5 @@ +add_subdirectory (spdlog) # this is a git submodule + add_library (CORSIKAthirdparty INTERFACE) target_include_directories (CORSIKAthirdparty SYSTEM @@ -16,9 +18,6 @@ set (ThirdPartyChoiceValues "C8;SYSTEM" CACHE STRING "List of possible values for the ThirdParty package choice") mark_as_advanced (ThirdPartyChoiceValues) -############################################################################## -# Build spdlog -add_subdirectory (spdlog) ############################################################################## # check for boost: either use C8 or system-level installation diff --git a/do-clang-format.py b/do-clang-format.py index ed5938ae3b2efe7676c14c9e524e48d9db9e3651..e3406502846f41ffed9f73aba88e7d828851bb8a 100755 --- a/do-clang-format.py +++ b/do-clang-format.py @@ -28,7 +28,7 @@ if args.all: if doExclude: continue for f in filenames: - if f.endswith(".h") or f.endswith(".cc"): + if f.endswith(".h") or f.endswith(".cc") or f.endswith(".hpp") or f.endswith(".cpp") or f.endswith(".cxx"): filename = os.path.join(dirpath, f) if not os.path.islink(filename): filelist.append(filename) @@ -52,7 +52,7 @@ else: cmd = "clang-format" if "CLANG_FORMAT" in os.environ: cmd = os.environ["CLANG_FORMAT"] - cmd += " -style=file" +cmd += " -style=file" if args.apply: for filename in filelist: subp.check_call(cmd.split() + ["-i", filename])