Skip to content

Commit

Permalink
Open TreeStream file with recreate, write with kOverwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Apr 28, 2024
1 parent 34ee2e1 commit cbcb288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Common/Utils/include/CommonUtils/TreeStreamRedirector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace utils
class TreeStreamRedirector
{
public:
TreeStreamRedirector(const char* fname = "", const char* option = "update");
TreeStreamRedirector(const char* fname = "", const char* option = "recreate");
virtual ~TreeStreamRedirector();
void Close();
TFile* GetFile() { return mDirectory->GetFile(); }
Expand Down
2 changes: 1 addition & 1 deletion Common/Utils/src/TreeStreamRedirector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void TreeStreamRedirector::Close()
TDirectory* backup = gDirectory;
mDirectory->cd();
for (auto& layout : mDataLayouts) {
layout->getTree().Write(layout->getName());
layout->getTree().Write(layout->getName(), TObject::kOverwrite);
}
mDataLayouts.clear();
if (backup) {
Expand Down

0 comments on commit cbcb288

Please sign in to comment.