Skip to content

Commit

Permalink
[RDF] fix order of declarations (and destruction) of TTree/TFile
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed authored and dpiparo committed Sep 13, 2024
1 parent 64beb89 commit aa4bf8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tree/dataframe/test/dataframe_simple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ void FillTree(const char *filename, const char *treeName, int nevents = 0)
// mark a heap object appearing by chance on the stack.
// This is not a problem with a clear solution and in fact the whole heap detection system relies on UB,
// so for now we are forced to work around the bug rather than fixing it.
auto t = std::make_unique<TTree>(treeName, treeName);
auto f = std::make_unique<TFile>(filename, "RECREATE");
auto t = std::make_unique<TTree>(treeName, treeName);
t->SetAutoFlush(1); // yes, one event per cluster: to make MT more meaningful
double b1;
int b2;
Expand All @@ -77,7 +77,6 @@ void FillTree(const char *filename, const char *treeName, int nevents = 0)
t->Fill();
}
t->Write();
f->Close();
}

TEST_P(RDFSimpleTests, CreateEmpty)
Expand Down

0 comments on commit aa4bf8c

Please sign in to comment.