From 76a4a6888a4be923e9de075d73bd1a776b02a034 Mon Sep 17 00:00:00 2001
From: "P.-A. Loizeau" <p.-a.loizeau@gsi.de>
Date: Mon, 4 Jul 2022 12:20:52 +0200
Subject: [PATCH] [mCBM] Install all par files, macros and scripts for 2021 and
 2022

---
 macro/beamtime/CMakeLists.txt          |  4 +++-
 macro/beamtime/mcbm2021/CMakeLists.txt | 14 +++++++++++---
 macro/beamtime/mcbm2022/CMakeLists.txt | 19 +++++++++++++++++++
 3 files changed, 33 insertions(+), 4 deletions(-)
 create mode 100644 macro/beamtime/mcbm2022/CMakeLists.txt

diff --git a/macro/beamtime/CMakeLists.txt b/macro/beamtime/CMakeLists.txt
index d18e7308a2..fac2f19e42 100644
--- a/macro/beamtime/CMakeLists.txt
+++ b/macro/beamtime/CMakeLists.txt
@@ -1,6 +1,8 @@
 #--- Installation only
-# mCBM 20201: install parameter files to allow execution of unpacking on Virgo/Lustre
+# mCBM 2021: install parameter files to allow execution of unpacking on Virgo/Lustre
 add_subdirectory(mcbm2021)
+# mCBM 2022: install parameter files + macro + online scripts to allow execution of unpacking on mFLES
+add_subdirectory(mcbm2022)
 
 ################################################################################
 #--- Deprecated (not running)
diff --git a/macro/beamtime/mcbm2021/CMakeLists.txt b/macro/beamtime/mcbm2021/CMakeLists.txt
index 216abf5dbc..b108d70dc2 100644
--- a/macro/beamtime/mcbm2021/CMakeLists.txt
+++ b/macro/beamtime/mcbm2021/CMakeLists.txt
@@ -1,5 +1,13 @@
 
-Install(FILES mMuchPar.par mPsdPar.par mRichPar.par mRichPar_70.par mStsPar.par mT0Par.par mTofPar.par mTofCriPar.par
-              mTofPar2Stack.par mTofPar2.par mTofParMay.par
-        DESTINATION share/cbmroot/macro/beamtime/mcbm2021/
+# ROOT macros, par files, documentation files, bash scripts
+Install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+        DESTINATION share/cbmroot/macro/beamtime
+        FILES_MATCHING PATTERN "*.C"
+                       PATTERN "*.par"
+                       PATTERN "*.sh"
        )
+
+# Just the empty folder for output
+Install(DIRECTORY data
+        DESTINATION share/cbmroot/macro/beamtime/mcbm2021
+        PATTERN "*" EXCLUDE)
diff --git a/macro/beamtime/mcbm2022/CMakeLists.txt b/macro/beamtime/mcbm2022/CMakeLists.txt
new file mode 100644
index 0000000000..fadf5fd753
--- /dev/null
+++ b/macro/beamtime/mcbm2022/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+# ROOT macros, par files, documentation files, bash scripts
+Install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+        DESTINATION share/cbmroot/macro/beamtime
+        FILES_MATCHING PATTERN "*.C"
+                       PATTERN "*.par"
+                       PATTERN "*.md"
+                       PATTERN "*.sh"
+       )
+# RICH calibration file, resolve symlink to get the full file
+get_filename_component(_resolvedRichFile ${CMAKE_CURRENT_SOURCE_DIR}/icd_offset_it_0.data REALPATH)
+Install(FILES ${_resolvedRichFile}
+        DESTINATION share/cbmroot/macro/beamtime/mcbm2022
+       )
+
+# Just the empty folder for output
+Install(DIRECTORY data
+        DESTINATION share/cbmroot/macro/beamtime/mcbm2022
+        PATTERN "*" EXCLUDE)
-- 
GitLab