From 9fb58c8a33bac45f618d2451bfba5b8801fb14c1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:37:52 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/pre-commit/mirrors-clang-format: v15.0.6 → v19.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.6...v19.1.7) - [github.com/psf/black: 22.12.0 → 25.1.0](https://github.com/psf/black/compare/22.12.0...25.1.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87c5b7f64..6e3e1fe35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -17,7 +17,7 @@ repos: exclude: external/.*$ - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v15.0.6 + rev: v19.1.7 hooks: - id: clang-format exclude: external/.*$ @@ -30,6 +30,6 @@ repos: # - id: cmake-lint - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 25.1.0 hooks: - id: black From 59c2ee0846d02f9094b9bfa85463a26131e8181c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:38:12 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- macros/REST_CreateHisto.C | 56 +++++++++---------- scripts/installAllTags.py | 6 +- .../analysis/inc/TRestDataSetGainMap.h | 4 +- source/framework/core/inc/TRestTask.h | 2 +- source/framework/core/inc/TRestThread.h | 2 +- .../framework/core/src/TRestProcessRunner.cxx | 6 +- source/framework/tools/inc/TRestTools.h | 2 +- 7 files changed, 38 insertions(+), 40 deletions(-) diff --git a/macros/REST_CreateHisto.C b/macros/REST_CreateHisto.C index 91159d22b..dc299dc16 100644 --- a/macros/REST_CreateHisto.C +++ b/macros/REST_CreateHisto.C @@ -63,33 +63,33 @@ Int_t REST_CreateHisto(string varName, string rootFileName, TString histoName, i return 0; }; - // - // class REST_CreateHisto :public TRestTask { - // public: - // ClassDef(REST_CreateHisto, 1); - // - // REST_CreateHisto() { fNRequiredArgument = 3; } - // ~REST_CreateHisto() {} - // - // TString varName=""; - // TString rootFileName=""; - // TString histoName=""; - // int startVal = 0; - // int endVal = 1000; - // int bins = 1000; - // Double_t normFactor = 1; - // - // void RunTask(TRestManager*mgr) - // { - // REST_CreateHisto(varName, - // rootFileName, - // histoName, - // startVal, - // endVal, - // bins, - // normFactor); - // } - // - //}; +// +// class REST_CreateHisto :public TRestTask { +// public: +// ClassDef(REST_CreateHisto, 1); +// +// REST_CreateHisto() { fNRequiredArgument = 3; } +// ~REST_CreateHisto() {} +// +// TString varName=""; +// TString rootFileName=""; +// TString histoName=""; +// int startVal = 0; +// int endVal = 1000; +// int bins = 1000; +// Double_t normFactor = 1; +// +// void RunTask(TRestManager*mgr) +// { +// REST_CreateHisto(varName, +// rootFileName, +// histoName, +// startVal, +// endVal, +// bins, +// normFactor); +// } +// +//}; #endif diff --git a/scripts/installAllTags.py b/scripts/installAllTags.py index bbee13496..0ac841378 100644 --- a/scripts/installAllTags.py +++ b/scripts/installAllTags.py @@ -24,9 +24,9 @@ # You might need to add some environment definitions needed to build REST os.environ["GARFIELD_HOME"] = "/programas/garfield" -os.environ[ - "LD_LIBRARY_PATH" -] = "/programas/root34.32/root/lib:/programas/geant4.10.02.p02-install/lib::/programas/garfield/lib" +os.environ["LD_LIBRARY_PATH"] = ( + "/programas/root34.32/root/lib:/programas/geant4.10.02.p02-install/lib::/programas/garfield/lib" +) os.environ["PATH"] = os.environ["PATH"] + ":/programas/root34.32/root/bin/" # =================================================== diff --git a/source/framework/analysis/inc/TRestDataSetGainMap.h b/source/framework/analysis/inc/TRestDataSetGainMap.h index 617c5f0aa..f04bad478 100644 --- a/source/framework/analysis/inc/TRestDataSetGainMap.h +++ b/source/framework/analysis/inc/TRestDataSetGainMap.h @@ -283,12 +283,12 @@ class TRestDataSetGainMap : public TRestMetadata { void Initialize(); Module() {} - Module(const TRestDataSetGainMap& parent) : p(&parent){}; + Module(const TRestDataSetGainMap& parent) : p(&parent) {}; Module(const TRestDataSetGainMap& parent, const Int_t planeId, const Int_t moduleId) : p(&parent) { SetPlaneId(planeId); SetModuleId(moduleId); }; - ~Module(){}; + ~Module() {}; }; }; #endif diff --git a/source/framework/core/inc/TRestTask.h b/source/framework/core/inc/TRestTask.h index 9e2c23339..09328a3ee 100644 --- a/source/framework/core/inc/TRestTask.h +++ b/source/framework/core/inc/TRestTask.h @@ -56,7 +56,7 @@ class TRestTask : public TRestMetadata { // Constructor & Destructor TRestTask(); - ~TRestTask(){}; + ~TRestTask() {}; ClassDefOverride(TRestTask, 1); }; diff --git a/source/framework/core/inc/TRestThread.h b/source/framework/core/inc/TRestThread.h index addfbbce2..cebd754a8 100644 --- a/source/framework/core/inc/TRestThread.h +++ b/source/framework/core/inc/TRestThread.h @@ -73,7 +73,7 @@ class TRestThread { // Constructor & Destructor TRestThread() { Initialize(); } - ~TRestThread(){}; + ~TRestThread() {}; }; #endif diff --git a/source/framework/core/src/TRestProcessRunner.cxx b/source/framework/core/src/TRestProcessRunner.cxx index 2ff4d4ff0..e5b52e9aa 100644 --- a/source/framework/core/src/TRestProcessRunner.cxx +++ b/source/framework/core/src/TRestProcessRunner.cxx @@ -487,8 +487,7 @@ void TRestProcessRunner::RunProcess() { } if (fProcStatus != kIgnore && Console::kbhit()) - while (getchar() != '\n') - ; // clear buffer + while (getchar() != '\n'); // clear buffer RESTEssential << "Waiting for processes to finish ..." << RESTendl; @@ -592,8 +591,7 @@ void TRestProcessRunner::PauseMenu() { Console::CursorUp(1); int c = Console::Read(); if (c != '\n') - while (Console::Read() != '\n') - ; + while (Console::Read() != '\n'); TRestStringOutput::REST_Verbose_Level l; if (c == '0' || c == 's') { l = TRestStringOutput::REST_Verbose_Level::REST_Silent; diff --git a/source/framework/tools/inc/TRestTools.h b/source/framework/tools/inc/TRestTools.h index 68f2fa9e3..901d1e5e4 100644 --- a/source/framework/tools/inc/TRestTools.h +++ b/source/framework/tools/inc/TRestTools.h @@ -190,7 +190,7 @@ inline void SetInitLevel(T* name, int level) { enum Quantities { ENERGY, LENGTH, TIME }; class ValueWithQuantity { public: - ValueWithQuantity(double value, Quantities quantity) : fValue(value), fQuantity(quantity){}; + ValueWithQuantity(double value, Quantities quantity) : fValue(value), fQuantity(quantity) {}; double GetValue() const { return fValue; } std::string ToString() const;