Skip to content

Commit

Permalink
Merge pull request #1461 from VinzenzBildstein/main
Browse files Browse the repository at this point in the history
[MegaLinter] Apply linters automatic fixes
  • Loading branch information
VinzenzBildstein authored Sep 20, 2024
2 parents cd24c69 + ddcde8a commit e94da5d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 27 deletions.
12 changes: 6 additions & 6 deletions include/TRunInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/// When subruns/runs are added together using gadd or when multiple
/// subruns/runs are used in grsiframe, their TRunInfos get merged.
///
/// If all files are from one run, and the subruns are added in order
/// If all files are from one run, and the subruns are added in order
/// without any missing, the information changes to reflect this:
/// \code
/// GRSI [0] TRunInfo::Get()->Print()
Expand Down Expand Up @@ -77,7 +77,7 @@
/// RunStop: Fri Dec 15 19:06:11 2023
/// RunLength: 101306 s
/// \endcode
///
///
/// If however some runs in between are missing, it will say
/// \code
/// Singleton 0x55919586a8c0 was read from test50_51_54.root
Expand All @@ -88,13 +88,13 @@
/// Combined RunLength: 10794 s
/// \endcode
///
/// From version 18 on TRunInfo also stores information about
/// From version 18 on TRunInfo also stores information about
/// the GRSISort version used to sort the data.
/// This can be accessed via
/// This can be accessed via
/// \code
/// TRunInfo::Get()->PrintVersion();
/// \endcode
///
///
/// Using a newer version of grsiframe on data created with an
/// older version of GRSISort should not overwrite the version
/// reported.
Expand Down Expand Up @@ -264,7 +264,7 @@ class TRunInfo : public TSingleton<TRunInfo> {

void PrintRunList() const;
std::string ListOfMissingRuns() const;
void PrintVersion() const;
void PrintVersion() const;

static std::string CreateLabel(bool quiet = false);

Expand Down
4 changes: 2 additions & 2 deletions libraries/TFormat/TParserLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ void TParserLibrary::Load()
}
fInitLibrary();
std::cout << "\tUsing library " << TGRSIOptions::Get()->ParserLibrary() << " version " << fLibraryVersion() << std::endl;
TRunInfo::SetLibraryVersion(fLibraryVersion());
TRunInfo::SetLibraryPath(TGRSIOptions::Get()->ParserLibrary());
TRunInfo::SetLibraryVersion(fLibraryVersion());
TRunInfo::SetLibraryPath(TGRSIOptions::Get()->ParserLibrary());
}
35 changes: 17 additions & 18 deletions libraries/TFormat/TRunInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ void TRunInfo::Print(Option_t* opt) const
str << "\t\tSubRunNumbers: " << std::setw(3) << FirstSubRunNumber() << "-" << std::setw(3) << LastSubRunNumber() << std::endl;
} else if(FirstRunNumber() != LastRunNumber()) {
str << "\t\tRunNumbers: " << std::setw(5) << FirstRunNumber() << "-" << std::setw(5) << LastRunNumber() << std::endl;
str << "\t\tNo missing runs" << std::endl;
str << "\t\tNo missing runs" << std::endl;
} else if(!fRunList.empty()) {
str << "\t\tRunNumbers: " << std::setw(5) << fRunList.begin()->first << "-" << std::setw(5) << fRunList.rbegin()->first << std::endl;
str << "\t\tMissing runs: " << ListOfMissingRuns() << std::endl;
} else {
str << "\t\tNo runs in list?" << std::endl;
}
str << "\t\tMissing runs: " << ListOfMissingRuns() << std::endl;
} else {
str << "\t\tNo runs in list?" << std::endl;
}
str << std::setfill(' ');
if(RunStart() != 0 && RunStop() != 0) {
str << "\t\tRunStart: " << asctime(&runStart);
Expand Down Expand Up @@ -487,8 +487,8 @@ void TRunInfo::Add(TRunInfo* runinfo, bool verbose)
} else {
if(verbose) { std::cout << "found second sub run (" << runinfo->fSubRunNumber << ") non-consecutive to current sub run (" << fSubRunNumber << ")" << std::endl; }
// with multiple non-sequential subruns added, the sub run number and start/stop have no meaning anymore
fRunStart = 0.;
fRunStop = 0.;
fRunStart = 0.;
fRunStop = 0.;
fFirstSubRunNumber = -1;
fLastSubRunNumber = -1;
}
Expand Down Expand Up @@ -535,16 +535,16 @@ std::string TRunInfo::ListOfMissingRuns() const
/// If no runs are missing prints "none".
std::ostringstream result;

// loop over all runs between the first and the last one (we know that these two are included)
// and check if the run is in the list of runs (or any subrun that is part of this run)
for(int run = fRunList.begin()->first; run < fRunList.rbegin()->first; ++run) {
if(std::find_if(fRunList.begin(), fRunList.end(), [&run](std::pair<int, int> i) { return run == i.first; }) == fRunList.end()) {
if(!result.str().empty()) {
result<<", ";
}
result<<std::setw(5)<<std::setfill('0')<<run;
}
}
// loop over all runs between the first and the last one (we know that these two are included)
// and check if the run is in the list of runs (or any subrun that is part of this run)
for(int run = fRunList.begin()->first; run < fRunList.rbegin()->first; ++run) {
if(std::find_if(fRunList.begin(), fRunList.end(), [&run](std::pair<int, int> i) { return run == i.first; }) == fRunList.end()) {
if(!result.str().empty()) {
result << ", ";
}
result << std::setw(5) << std::setfill('0') << run;
}
}

// if we found no missing runs, we print "none"
if(result.str().empty()) {
Expand Down Expand Up @@ -621,4 +621,3 @@ std::string TRunInfo::CreateLabel(bool quiet)
// R__b.WriteStdString(fLibraryPath);
// }
//}

1 change: 0 additions & 1 deletion libraries/TGUI/TCalibrationGraph.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,3 @@ void TCalibrationGraphSet::Print(Option_t* opt) const
std::cout << std::endl;
std::cout << "---------------------" << std::endl;
}

0 comments on commit e94da5d

Please sign in to comment.