Skip to content

[nfc][io] clarify how to check for health status of TFile#22477

Open
ferdymercury wants to merge 5 commits into
root-project:masterfrom
ferdymercury:patch-23
Open

[nfc][io] clarify how to check for health status of TFile#22477
ferdymercury wants to merge 5 commits into
root-project:masterfrom
ferdymercury:patch-23

Conversation

@ferdymercury
Copy link
Copy Markdown
Collaborator

Fixes #22464

@ferdymercury ferdymercury added skip ci Skip the full builds on the actions runners pr:squash on merge labels Jun 4, 2026
@ferdymercury ferdymercury reopened this Jun 4, 2026
@ferdymercury ferdymercury requested a review from vepadulano June 4, 2026 08:13
@ferdymercury ferdymercury marked this pull request as ready for review June 4, 2026 08:13
@ferdymercury ferdymercury requested a review from pcanal as a code owner June 4, 2026 08:13
Comment thread io/io/src/TFile.cxx
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 2f03964.

♻️ This comment has been updated with latest results.

@vepadulano
Copy link
Copy Markdown
Member

I think we should wait for @pcanal's comments before going forward with this.

Comment thread io/io/src/TFile.cxx Outdated
Comment thread io/io/src/TFile.cxx Outdated
Copy link
Copy Markdown
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (see minor additional informations added).

ferdymercury and others added 2 commits June 4, 2026 23:09
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
Comment thread io/io/src/TFile.cxx
///
/// To check for the health status of a TFile and detect corruption, you can perform the following checks after opening it:
/// ~~~{.cpp}
/// TFile *f = TFile::Open("name.root", "READ");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// TFile *f = TFile::Open("name.root", "READ");
/// std::unique_ptr<TFile> f{TFile::Open("name.root", "READ")};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:squash on merge skip ci Skip the full builds on the actions runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do we check if a file is corrupted?

3 participants