Skip to content

Commit

Permalink
Improve consistency in version messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewEdmonds11 committed Feb 14, 2025
1 parent 63bebfa commit 89b6d15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/checkEventNtuple
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
h = f.Get("EventNtuple/version")
print("{} contains EventNtuple v{:02.0f}_{:02.0f}_{:02.0f}".format(filename, h.GetBinContent(1), h.GetBinContent(2), h.GetBinContent(3)))
else:
print("{} histogram does not exist in {} (it is v06_02_00 or older)".format(histname, filename))
print("{} histogram does not exist in {} (it is either v06_02_00 or older)".format(histname, filename))
else:
print("{}/ folder does not exist in {}".format(foldername, filename))
except OSError:
Expand Down
4 changes: 2 additions & 2 deletions utils/rooutil/inc/RooUtil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public:
TFile* file = new TFile(filename.c_str(), "READ");
TH1I* hVersion = (TH1I*) file->Get("EventNtuple/version");
if (!hVersion) {
std::cout << "Warning: this EventNtuple file does not contain a version number. This is just a warning..." << std::endl;
std::cout << "Warning: this EventNtuple file does not contain a version number. It is either v06_02_00 or older. This is just a warning..." << std::endl;
}
else {
majorVer = hVersion->GetBinContent(1);
minorVer = hVersion->GetBinContent(2);
patchVer = hVersion->GetBinContent(3);
std::cout << "EventNtuple v" << majorVer << "." << minorVer << "." << patchVer << std::endl;
std::cout << "EventNtuple v" << std::setw(2) << std::setfill('0') << majorVer << "_" << minorVer << "_" << patchVer << std::endl;
}
file->Close();
delete file;
Expand Down

0 comments on commit 89b6d15

Please sign in to comment.