From ca3f43e697bc2d57b9a1b459b1c259d5441fff29 Mon Sep 17 00:00:00 2001 From: P-A Loizeau <p.-a.loizeau@gsi.de> Date: Fri, 30 Jul 2021 15:00:09 +0200 Subject: [PATCH] Add new CI test for mCBM2021 data unpacking (+make msg from TOF par more clear) --- core/detectors/tof/CbmMcbm2018TofPar.cxx | 4 ++- macro/beamtime/mcbm2021/mTofCriPar.par | 1 - macro/run/CMakeLists.txt | 36 ++++++++++++++++++++++-- macro/run/run_unpack_tsa.C | 4 +-- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/core/detectors/tof/CbmMcbm2018TofPar.cxx b/core/detectors/tof/CbmMcbm2018TofPar.cxx index 0e4b060069..c2f8bfb1c3 100644 --- a/core/detectors/tof/CbmMcbm2018TofPar.cxx +++ b/core/detectors/tof/CbmMcbm2018TofPar.cxx @@ -19,6 +19,8 @@ #include "TString.h" +#include <iomanip> + #include "gDpbMessv100.h" // ----- Standard constructor ------------------------------------------ @@ -257,7 +259,7 @@ void CbmMcbm2018TofPar::BuildChannelsUidMap() break; } default: { - LOG(error) << "Invalid Tof Type specifier "; + LOG(error) << "Invalid Tof Type specifier for GBTx " << std::setw(2) << uGbtx << ": " << fiRpcType[uGbtx]; } } // switch (fiRpcType[uGbtx]) } // for (UInt_t uGbtx = 0; uGbtx < uNrOfGbtx; ++uGbtx) diff --git a/macro/beamtime/mcbm2021/mTofCriPar.par b/macro/beamtime/mcbm2021/mTofCriPar.par index db7993665d..743b16f464 100644 --- a/macro/beamtime/mcbm2021/mTofCriPar.par +++ b/macro/beamtime/mcbm2021/mTofCriPar.par @@ -4,7 +4,6 @@ NrOfGdpbs: Int_t 4 GdpbIdArray: Int_t \ 0xabc0 0xabc1 0xabc2 0xabc3 -//0x5b7b 0x55c4 0x18c5 0x5f64 0x1889 0x181c 0x1922 0x1925 0x1902 NrOfFeesPerGdpb: Int_t 10 NrOfGet4PerFee: Int_t 8 NrOfChannelsPerGet4: Int_t 4 diff --git a/macro/run/CMakeLists.txt b/macro/run/CMakeLists.txt index 0c2447a1fc..2b8cadc5af 100644 --- a/macro/run/CMakeLists.txt +++ b/macro/run/CMakeLists.txt @@ -176,7 +176,7 @@ foreach(setup IN LISTS cbm_setup) FIXTURES_REQUIRED fixt_reco_ev_${setup} RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_ev_real # --- Event-by-event reconstruction from event-based simulation # --- Real raw event builder @@ -204,7 +204,7 @@ foreach(setup IN LISTS cbm_setup) FIXTURES_REQUIRED fixt_reco_ts_${setup} RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_ts_eb_real # --- Event-by-event reconstruction from time-based simulation # --- Real raw event builder @@ -235,8 +235,40 @@ foreach(setup IN LISTS cbm_setup) endforeach(setup IN LISTS cbm_setup) # ============================================================================ +# ===== mCBM 2021 tests ================================================== +# ====> only if test TSA files for "typical runs" present +If(DEFINED ENV{RAW_DATA_PATH} ) + SET( RAW_DATA_PATH $ENV{RAW_DATA_PATH} ) + + Message( STATUS "Raw data path provided => Performing mCBM 2021 tests using tsa files in ${RAW_DATA_PATH}" ) + + ## Generate scripts + GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_unpack_tsa.C ) # Unpackers + ## Run only if raw data files present + ForEach(RUN 1588 ) + Message( STATUS "Checking if raw data file exists: ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa" ) + If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa) + Message( STATUS "Raw data file found, tests will be performed for mCBM run ${RUN}" ) + + ## Define tests + dependencies + ### Raw data analysis tests + Set(testname mcbm_unpack_2021_${RUN}) + Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/run/run_unpack_tsa.sh \"${RAW_DATA_PATH}/${RUN}_first20Ts.tsa\" ${RUN} \"mcbm_beam_2021_03\" -1 \"data/\") + Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600") + Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished successfully") + set_tests_properties(${testname} PROPERTIES DEPENDS run_cleanup) + set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED run_cleanup) + Set(fixture_unpacked_${RUN} fixture_done_${testname}) + set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_unpacked_${RUN}}) + EndIf() # If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa)) + EndForEach() # ForEach(RUN 1588 ) +EndIf() # If(DEFINED ENV{RAW_DATA_PATH} ) +##################### +# ============================================================================ + Install(FILES .rootrc run_tra_file.C run_tra_beam.C run_transport_json_config.C run_digi_json_config.C config.json run_digi.C run_reco.C run_tests.sh + run_unpack_online.C run_unpack_tsa.C DESTINATION share/cbmroot/macro/run ) Install(CODE "FILE(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/share/cbmroot/macro/run/data)") diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C index 08929ea37e..117e367c7d 100644 --- a/macro/run/run_unpack_tsa.C +++ b/macro/run/run_unpack_tsa.C @@ -239,8 +239,8 @@ void run_unpack_tsa(std::string infile = "test.tsa", UInt_t runid = 0, const cha // ----- Finish ------------------------------------------------------- timer.Stop(); - std::cout << "Macro finished successfully after CpuTime = " << timer.CpuTime() << " s RealTime = " << timer.RealTime() - << " s." << std::endl; + std::cout << "Macro finished successfully." << std::endl; + std::cout << "After CpuTime = " << timer.CpuTime() << " s RealTime = " << timer.RealTime() << " s." << std::endl; // ------------------------------------------------------------------------ } // End of main macro function -- GitLab