From 2688d94c36d1f83519bcec3b4da3ccb88fe0be4d Mon Sep 17 00:00:00 2001 From: VinzenzBildstein <7277216+VinzenzBildstein@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:04:26 +0000 Subject: [PATCH] [MegaLinter] Apply linters automatic fixes --- include/TSingleton.h | 10 +++++++--- libraries/TFormat/TGRSIFrame.cxx | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/TSingleton.h b/include/TSingleton.h index 13b1097e1b3..1e1af9dab1b 100644 --- a/include/TSingleton.h +++ b/include/TSingleton.h @@ -49,13 +49,17 @@ class TSingleton : public TObject { // NOLINT(cppcoreguidelines-virtual-class- fDir = gDirectory; // in either case (read from file or created new), gDirectory is the current directory break; // we will find the newest key first, so we want to break here and not try and read other instaces of the same class } - } else if(verbose) { std::cout << "Not reading " << T::Class()->GetName() << " from file!" << std::endl; } + } else if(verbose) { + std::cout << "Not reading " << T::Class()->GetName() << " from file!" << std::endl; + } if(fSingleton == nullptr) { fSingleton = new T; fDir = gDirectory; // in either case (read from file or created new), gDirectory is the current directory - if(verbose) { std::cout << "Created new singleton of class " << T::Class()->GetName() << std::endl; } + if(verbose) { std::cout << "Created new singleton of class " << T::Class()->GetName() << std::endl; } } - } else if(verbose) { std::cout << "Re-using old singleton of class " << T::Class()->GetName() << std::endl; } + } else if(verbose) { + std::cout << "Re-using old singleton of class " << T::Class()->GetName() << std::endl; + } return fSingleton; } diff --git a/libraries/TFormat/TGRSIFrame.cxx b/libraries/TFormat/TGRSIFrame.cxx index 34ea67ac511..d5f44aed15e 100644 --- a/libraries/TFormat/TGRSIFrame.cxx +++ b/libraries/TFormat/TGRSIFrame.cxx @@ -57,12 +57,12 @@ TGRSIFrame::TGRSIFrame() for(const auto& fileName : fOptions->RootInputFiles()) { if(chain->Add(fileName.c_str(), 0) >= 1) { // setting nentries parameter to zero make TChain load the file header and return a 1 if the file was opened successfully TFile* file = TFile::Open(fileName.c_str()); - if(first) { - first = false; - TRunInfo::ReadInfoFromFile(file); - } else { - TRunInfo::AddCurrent(); - } + if(first) { + first = false; + TRunInfo::ReadInfoFromFile(file); + } else { + TRunInfo::AddCurrent(); + } auto* ppg = static_cast(file->Get("PPG")); if(ppg != nullptr) { fPpg->Add(ppg);