Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2024
1 parent 28854d7 commit d75c13f
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 59 deletions.
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
3 changes: 1 addition & 2 deletions macros/REST_ListMacros.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Int_t REST_ListMacros(int details = 0, std::string onlyThisMacro = "") {
std::string macro = TRestTools::SeparatePathAndName(main_files[m]).second;
if (!onlyThisMacro.empty() && onlyThisMacro != macro) continue;
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
cout << " ++ "
<< " Macro : " << macro << endl;
cout << " ++ " << " Macro : " << macro << endl;
std::ifstream t(main_files[m]);
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());

Expand Down
9 changes: 3 additions & 6 deletions macros/REST_MakeProcess.C
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,12 @@ Int_t REST_MakeProcess(TString name, TString inputevent = "TRestEvent", TString
headerfile << "private:" << endl;

if (inputevent == outputevent) {
headerfile << " "
<< "/// A pointer to the specific " << inputevent << " input event" << endl;
headerfile << " " << "/// A pointer to the specific " << inputevent << " input event" << endl;
headerfile << " " << inputevent << "* " << inputeventname << "; //!" << endl;
} else {
headerfile << " "
<< "/// A pointer to the specific " << inputevent << " input event" << endl;
headerfile << " " << "/// A pointer to the specific " << inputevent << " input event" << endl;
headerfile << " " << inputevent << "* " << inputeventname << "; //!" << endl;
headerfile << " "
<< "/// A pointer to the specific " << outputevent << " output event" << endl;
headerfile << " " << "/// A pointer to the specific " << outputevent << " output event" << endl;
headerfile << " " << outputevent << "* " << outputeventname << "; //!" << endl;
}

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
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
4 changes: 2 additions & 2 deletions source/framework/core/src/TRestMesh.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ Int_t TRestMesh::GetNodeX(TVector3 v, Bool_t relative) {

if (posInside.Mag() > fNetSizeX) {
cout << "REST WARNING (TRestMesh) : Relative position (" << posInside.X() << ", " << posInside.Y()
<< ", " << posInside.Z() << ")"
<< ") outside boundaries. Setting it to : " << fNodesX - 1 << endl;
<< ", " << posInside.Z() << ")" << ") outside boundaries. Setting it to : " << fNodesX - 1
<< endl;
return fNodesX - 1;
}

Expand Down
5 changes: 2 additions & 3 deletions source/framework/core/src/TRestMessenger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ void TRestMessenger::PrintMetadata() {
TRestMetadata::PrintMetadata();

if (IsConnected()) {
RESTMetadata << "Connected : "
<< " (token: " << fPoolToken << ", shmid: " << fShmId << ", source: " << fPoolSource
<< ")" << RESTendl;
RESTMetadata << "Connected : " << " (token: " << fPoolToken << ", shmid: " << fShmId
<< ", source: " << fPoolSource << ")" << RESTendl;
} else {
RESTMetadata << "Not Connected" << RESTendl;
}
Expand Down
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
8 changes: 2 additions & 6 deletions source/framework/core/src/TRestTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ TRestTask::TRestTask(TString TaskString, REST_TASKMODE mode) {
string name;
string call;
if (Split(cmd, "->").size() != 2) {
RESTWarning << "command"
<< " \"" << cmd << "\" "
<< "is illegal!" << RESTendl;
RESTWarning << "command" << " \"" << cmd << "\" " << "is illegal!" << RESTendl;
fMode = TASK_ERROR;
return;
} else {
Expand All @@ -117,9 +115,7 @@ TRestTask::TRestTask(TString TaskString, REST_TASKMODE mode) {
int p1 = call.find_first_of("(");
int p2 = call.find_last_of(")");
if (p1 == -1 || p2 == -1 || p1 >= p2) {
RESTWarning << "command"
<< " \"" << cmd << "\" "
<< "is illegal!" << RESTendl;
RESTWarning << "command" << " \"" << cmd << "\" " << "is illegal!" << RESTendl;
fMode = TASK_ERROR;
return;
}
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 @@ -186,7 +186,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

0 comments on commit d75c13f

Please sign in to comment.