Skip to content

Conversation

silverweed
Copy link
Contributor

@silverweed silverweed commented Jun 24, 2025

This Pull request:

Draft PR for the new RFile prototype, using a non-RDirectory-based approach (an alternative PR using a RDirectory-based approach will follow soon).

Introduces ROOT::Experimental::RFile which presents a new, minimal interface for reading and writing data to a ROOT file.

NOTE: the commit history is a bit messy at the moment, but it's not meant to be "review-ready"; it's more to showcase the current progress of the prototype.

@silverweed silverweed requested review from hahnjo and enirolf June 24, 2025 12:28
@silverweed silverweed self-assigned this Jun 24, 2025
Copy link

github-actions bot commented Jun 25, 2025

Test Results

    20 files      20 suites   3d 14h 11m 41s ⏱️
 3 666 tests  3 654 ✅ 0 💤 12 ❌
71 622 runs  71 584 ✅ 7 💤 31 ❌

For more details on these failures, see this check.

Results for commit d48773a.

♻️ This comment has been updated with latest results.

@dpiparo
Copy link
Member

dpiparo commented Jun 29, 2025

Just to put this on the table https://its.cern.ch/jira/browse/ROOT-7400
Maybe to further increase the value of the new RFile.


TEST(RFile, WrongExtension)
{
FileRaii fileGuard("test_rfile_wrong.xml");
Copy link
Member

Choose a reason for hiding this comment

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

Until now we have not enforced the convention for the extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But if I'm not mistaken TFile will try to open a TXMLFile if it detects this extension (at least with TFile::Open) and I wanted to avoid that

Copy link
Member

Choose a reason for hiding this comment

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

That is a slightly different interface per say. TFile::Open (as oppose to the TFile constructor) is supposed to find the right plugin and it indeed bases that search on pattern matching (protocol ... filename .extension) but if some code is creating the pluging class directly then there is less checks (in part because they are redundant, in part because new TXMLFile(filename) is an explicit request to open that file as xml)

}
}

TEST(RFile, IterateKeysRecursive)
Copy link
Member

Choose a reason for hiding this comment

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

What does 'recursing' over the directories look like for 'complex' operation? For example creating a graph representation of the file's content (text or in TBrowser nodes); Another example could be create Canvas and subCanvas display the histo of each directory (in an organization mimicking the directory organization).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants