Skip to content

Commit fb63d6e

Browse files
ferdymercurydpiparo
authored andcommitted
1 parent 2ab1731 commit fb63d6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

io/io/src/TFile.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ TFile::TFile() : TDirectoryFile(), fCompress(ROOT::RCompressionSetting::EAlgorit
235235
/// READ_WITHOUT_GLOBALREGISTRATION | Used by TTreeProcessorMT, not a user callable option.
236236
///
237237
/// If option = "" (default), READ is assumed.
238+
/// \note Even in READ mode, if the file is the current directory `cd()`, and you create e.g. a new histogram in your code,
239+
/// the histogram will be appended (but not written) to this directory, and automatically deleted when closing the file.
240+
/// To avoid this behavior, call hist->SetDirectory(nullptr); after creating it.
241+
///
238242
/// The file can be specified as a URL of the form:
239243
///
240244
/// file:///user/rdm/bla.root or file:/user/rdm/bla.root

0 commit comments

Comments
 (0)