Skip to content

FORM TFile Bug Fix#470

Merged
wwuoneway merged 1 commit intoFramework-R-D:mainfrom
aolivier23:form_fix_current_file
Mar 30, 2026
Merged

FORM TFile Bug Fix#470
wwuoneway merged 1 commit intoFramework-R-D:mainfrom
aolivier23:form_fix_current_file

Conversation

@aolivier23
Copy link
Copy Markdown
Contributor

Fixed bug in ROOT TTree container that causes TTree to remain in memory and never get written. Still investigating why this is better than TTree::SetDirectory.

and never get written.  Still investigating why this is better than
TTree::SetDirectory.
@wwuoneway
Copy link
Copy Markdown
Contributor

Note: By using TDirectory::TContext ctx(m_tfile.get());, you create a RAII-based sentry that temporarily switches the global gDirectory to your file for the duration of the scope and automatically restores the previous directory upon destruction, ensuring your TTree and its data products have a valid physical destination for writing.

@wwuoneway wwuoneway merged commit af55ffc into Framework-R-D:main Mar 30, 2026
33 of 35 checks passed
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.

4 participants