From 97862b6eb565d0c2841a7b59eaf51a38dac1cbae Mon Sep 17 00:00:00 2001 From: P-A Loizeau <p.-a.loizeau@gsi.de> Date: Mon, 8 Feb 2021 11:00:38 +0100 Subject: [PATCH] Add guards disabling format check around long real pathnames --- macro/beamtime/mcbm2020/build_event_win_kronos.C | 6 ++++++ macro/beamtime/mcbm2020/mcbm_build_and_reco.C | 9 +++++++-- .../mcbm2020/mcbm_build_and_reco_kronos.C | 6 ++++++ macro/beamtime/mcbm2020/mcbm_event_reco.C | 10 +++++++--- macro/beamtime/mcbm2020/mcbm_event_reco_kronos.C | 6 ++++++ macro/beamtime/mcbm2020/mcbm_tof_tracking.C | 8 ++++++-- .../beamtime/mcbm2020/mcbm_tof_tracking_kronos.C | 15 ++++++++------- 7 files changed, 46 insertions(+), 14 deletions(-) diff --git a/macro/beamtime/mcbm2020/build_event_win_kronos.C b/macro/beamtime/mcbm2020/build_event_win_kronos.C index 6667e81948..6b42f11453 100644 --- a/macro/beamtime/mcbm2020/build_event_win_kronos.C +++ b/macro/beamtime/mcbm2020/build_event_win_kronos.C @@ -1,10 +1,16 @@ #include "build_event_win.C" +/// FIXME: Disable clang formatting around parameters initial value setting +/// due to problem with real file path length +/* clang-format off */ Bool_t build_event_win_kronos(UInt_t uRunIdx = 28, Int_t nTimeslices = 0, TString sOutDir = "./data", TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/" "unp_evt_data_7f229b3f_20201103") { + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ + UInt_t uRunId = 0; if (99999 != uRunIdx) { diff --git a/macro/beamtime/mcbm2020/mcbm_build_and_reco.C b/macro/beamtime/mcbm2020/mcbm_build_and_reco.C index ee0d1a8968..c7a7b708eb 100644 --- a/macro/beamtime/mcbm2020/mcbm_build_and_reco.C +++ b/macro/beamtime/mcbm2020/mcbm_build_and_reco.C @@ -30,6 +30,9 @@ Bool_t mcbm_build_and_reco(UInt_t uRunId = 831, // ------------------------------------------------------------------------ + /// FIXME: Disable clang formatting around parameters initial value setting + /// due to problem with real file path length + /* clang-format off */ // ----- In- and output file names ------------------------------------ TString inFile = sInpDir + Form("/unp_mcbm_%03u.root", uRunId); TString parFileIn = sInpDir + Form("/unp_mcbm_params_%03u.root", uRunId); @@ -37,8 +40,10 @@ Bool_t mcbm_build_and_reco(UInt_t uRunId = 831, uRunId); TString outFile = sOutDir + Form("/reco_mcbm_evt_win_%03u.root", uRunId); // ------------------------------------------------------------------------ + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ -/* + /* std::cout << sInpDir << std::endl << sOutDir << std::endl; std::cout << inFile << std::endl << parFileIn << std::endl @@ -47,7 +52,7 @@ Bool_t mcbm_build_and_reco(UInt_t uRunId = 831, std::cout << uRunId << " " << nTimeslices << std::endl; return kTRUE; -*/ + */ // --- Load the geometry setup ---- // This is currently only required by the TRD (parameters) diff --git a/macro/beamtime/mcbm2020/mcbm_build_and_reco_kronos.C b/macro/beamtime/mcbm2020/mcbm_build_and_reco_kronos.C index 30fe00df76..6a8c1e102c 100644 --- a/macro/beamtime/mcbm2020/mcbm_build_and_reco_kronos.C +++ b/macro/beamtime/mcbm2020/mcbm_build_and_reco_kronos.C @@ -8,11 +8,17 @@ #include "mcbm_build_and_reco.C" +/// FIXME: Disable clang formatting around parameters initial value setting +/// due to problem with real file path length +/* clang-format off */ Bool_t mcbm_build_and_reco_kronos(UInt_t uRunIdx = 28, Int_t nTimeslices = 0, TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/" "unp_evt_data_7f229b3f_20201103", TString sOutDir = "./data") { + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ + UInt_t uRunId = 0; if (99999 != uRunIdx) { diff --git a/macro/beamtime/mcbm2020/mcbm_event_reco.C b/macro/beamtime/mcbm2020/mcbm_event_reco.C index 53cb42e832..d2d669d39a 100644 --- a/macro/beamtime/mcbm2020/mcbm_event_reco.C +++ b/macro/beamtime/mcbm2020/mcbm_event_reco.C @@ -24,7 +24,9 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 831, TString parDir = srcDir + "/parameters"; // ------------------------------------------------------------------------ - + /// FIXME: Disable clang formatting around parameters initial value setting + /// due to problem with real file path length + /* clang-format off */ // ----- In- and output file names ------------------------------------ TString inFile = sInpDir + Form("/unp_mcbm_%03u.root", uRunId); TString parFileIn = sInpDir + Form("/unp_mcbm_params_%03u.root", uRunId); @@ -32,8 +34,10 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 831, uRunId); TString outFile = sOutDir + Form("/reco_mcbm_event_%03u.root", uRunId); // ------------------------------------------------------------------------ + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ -/* + /* std::cout << sInpDir << std::endl << sOutDir << std::endl; std::cout << inFile << std::endl << parFileIn << std::endl @@ -42,7 +46,7 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 831, std::cout << uRunId << " " << nTimeslices << std::endl; return kTRUE; -*/ + */ // --- Load the geometry setup ---- // This is currently only required by the TRD (parameters) diff --git a/macro/beamtime/mcbm2020/mcbm_event_reco_kronos.C b/macro/beamtime/mcbm2020/mcbm_event_reco_kronos.C index 00b90e1620..5978f74fc7 100644 --- a/macro/beamtime/mcbm2020/mcbm_event_reco_kronos.C +++ b/macro/beamtime/mcbm2020/mcbm_event_reco_kronos.C @@ -8,11 +8,17 @@ #include "mcbm_event_reco.C" +/// FIXME: Disable clang formatting around parameters initial value setting +/// due to problem with real file path length +/* clang-format off */ Bool_t mcbm_event_reco_kronos(UInt_t uRunIdx = 28, Int_t nTimeslices = 0, TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/" "unp_evt_data_7f229b3f_20201103", TString sOutDir = "./data") { + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ + UInt_t uRunId = 0; if (99999 != uRunIdx) { diff --git a/macro/beamtime/mcbm2020/mcbm_tof_tracking.C b/macro/beamtime/mcbm2020/mcbm_tof_tracking.C index e329e8e5dd..eeec2f2637 100644 --- a/macro/beamtime/mcbm2020/mcbm_tof_tracking.C +++ b/macro/beamtime/mcbm2020/mcbm_tof_tracking.C @@ -12,7 +12,7 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831, Int_t nTimeslices = 0, TString sInpDir = "./data", TString sOutDir = "./data", - TString cCalId = "831.50.3.0") { + TString cCalId = "831.50.3.0") { // --- Logger settings ---------------------------------------------------- TString logLevel = "INFO"; @@ -27,7 +27,9 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831, TString parDir = srcDir + "/parameters"; // ------------------------------------------------------------------------ - + /// FIXME: Disable clang formatting around parameters initial value setting + /// due to problem with real file path length + /* clang-format off */ // ----- In- and output file names ------------------------------------ TString inFile = sInpDir + Form("/reco_mcbm_event_%03u.root", uRunId); TString parFileIn = sInpDir + Form("/reco_mcbm_event_params_%03u.root", @@ -44,6 +46,8 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831, outFile = sOutDir + Form("/tracking_mcbm_evt_win_%03u.root", uRunId); } // if( bEventWin ) // ------------------------------------------------------------------------ + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ /* std::cout << sInpDir << std::endl << sOutDir << std::endl; diff --git a/macro/beamtime/mcbm2020/mcbm_tof_tracking_kronos.C b/macro/beamtime/mcbm2020/mcbm_tof_tracking_kronos.C index b509ff4b3a..5bc961fee1 100644 --- a/macro/beamtime/mcbm2020/mcbm_tof_tracking_kronos.C +++ b/macro/beamtime/mcbm2020/mcbm_tof_tracking_kronos.C @@ -8,6 +8,9 @@ #include "mcbm_tof_tracking.C" +/// FIXME: Disable clang formatting around parameters initial value setting +/// due to problem with real file path length +/* clang-format off */ Bool_t mcbm_tof_tracking_kronos(UInt_t uRunIdx = 28, Bool_t bEventWin = kFALSE, Int_t iTrackMode = 2, @@ -16,6 +19,9 @@ Bool_t mcbm_tof_tracking_kronos(UInt_t uRunIdx = 28, TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/" "unp_evt_data_7f229b3f_20201103", TString sOutDir = "./data") { + /// FIXME: Re-enable clang formatting after parameters initial values setting + /* clang-format on */ + UInt_t uRunId = 0; if (99999 != uRunIdx) { @@ -46,11 +52,6 @@ Bool_t mcbm_tof_tracking_kronos(UInt_t uRunIdx = 28, if (uRunId < 692 && 0 != uRunId) return kFALSE; - return mcbm_tof_tracking(uRunId, - bEventWin, - iTrackMode, - iCalOpt, - nTimeslices, - sInpDir, - sOutDir ); + return mcbm_tof_tracking( + uRunId, bEventWin, iTrackMode, iCalOpt, nTimeslices, sInpDir, sOutDir); } -- GitLab