Skip to content

Commit

Permalink
Merge pull request #13 from VinzenzBildstein/create-pull-request/patch
Browse files Browse the repository at this point in the history
[MegaLinter] Apply linters automatic fixes
  • Loading branch information
VinzenzBildstein authored Oct 21, 2024
2 parents c7aeb5b + 2688d94 commit 193c56d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions include/TSingleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions libraries/TFormat/TGRSIFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<TPPG*>(file->Get("PPG"));
if(ppg != nullptr) {
fPpg->Add(ppg);
Expand Down

0 comments on commit 193c56d

Please sign in to comment.