Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -17,7 +17,7 @@ repos:
exclude: external/.*$

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.6
rev: v21.1.8
hooks:
- id: clang-format
exclude: external/.*$
Expand All @@ -29,7 +29,7 @@ repos:
additional_dependencies: [ pyyaml ]
# - id: cmake-lint

- repo: https://github.com/psf/black
rev: 22.12.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
56 changes: 28 additions & 28 deletions macros/REST_CreateHisto.C
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion macros/REST_RefitGainMap.C
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class GainMapRefitter {
// Class that inherits from TFitEditor to be able to access the protected methods of TFitEditor
class TFitEditor2 : public TFitEditor {
public:
TFitEditor2(TVirtualPad* pad, TObject* obj) : TFitEditor(pad, obj){};
TFitEditor2(TVirtualPad* pad, TObject* obj) : TFitEditor(pad, obj) {};
virtual ~TFitEditor2() {}

// making public the protected method GetFitObjectListOfFunctions()
Expand Down
18 changes: 6 additions & 12 deletions pull-submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def print_help():

if sys.argv[x + 1] == "--lfna":
lfna = True
print(
"""\
print("""\
Adding submodules from lfna repositories.
Be aware that you should add your local system public ssh to your GitLab and/or GitHub account!
It is usually placed at ~/.ssh/id_rsa.pub.
Expand All @@ -80,21 +79,18 @@ def print_help():
Once you do that, only repositories where you have access rights will be pulled.

If no password is requested everything went fine!
"""
)
""")

if sys.argv[x + 1] == "--sjtu":
sjtu = True
print(
"Adding submodules from sjtu repositories. You may be asked to enter password for it."
)
if sys.argv[x + 1].find("--latest") >= 0:
print(
"""\
print("""\
Pulling latest submodules from their git repository, instead of the version recorded by REST.
This may cause the submodules to be uncompilable.
"""
)
""")
latest = True
if sys.argv[x + 1].find("--latest:") >= 0:
fbName = sys.argv[x + 1][9:]
Expand Down Expand Up @@ -128,12 +124,10 @@ def main():
# --recursive'.format(PROJECT_ROOT))

if force and not dontask:
answer = input(
"""\
answer = input("""\
This will override local changes on the files. And will bring your local repository to a clean state
Are you sure to proceed? (y/n)
"""
)
""")
if answer != "y":
sys.exit(0)

Expand Down
2 changes: 1 addition & 1 deletion scripts/generateVersionHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
p = subprocess.Popen(
["git branch"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
)
(out, err) = p.communicate()
out, err = p.communicate()

if len(str(err)) > 3:
print(
Expand Down
6 changes: 3 additions & 3 deletions scripts/installAllTags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
# ===================================================

Expand Down
1 change: 0 additions & 1 deletion scripts/scriptsGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import vars
import subprocess


version = "0.2"

vars.initvar()
Expand Down
1 change: 0 additions & 1 deletion scripts/vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import platform
import subprocess


opt = {
"Install_Path": os.environ["HOME"] + "/REST_Install",
"Source_Path": os.path.abspath(".") + "/../",
Expand Down
4 changes: 2 additions & 2 deletions source/framework/analysis/inc/TRestDataSetGainMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion source/framework/core/inc/TRestTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TRestTask : public TRestMetadata {

// Constructor & Destructor
TRestTask();
~TRestTask(){};
~TRestTask() {};

ClassDefOverride(TRestTask, 1);
};
Expand Down
2 changes: 1 addition & 1 deletion source/framework/core/inc/TRestThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TRestThread {

// Constructor & Destructor
TRestThread() { Initialize(); }
~TRestThread(){};
~TRestThread() {};
};

#endif
6 changes: 2 additions & 4 deletions source/framework/core/src/TRestProcessRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion source/framework/tools/inc/TRestTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,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;

Expand Down