I tried to execute “.ls()
” (the “()
” is there due to a mistake, of course).
If this command is tried when a file is open and is the “current directory”, ROOT will *freeze". It does not even respond to “Ctrl-C” nor “Ctrl-Z” (in a Linux terminal). One needs to open another terminal window and kill this ROOT process from there.
[...]$ root hsimple.root
root [0]
Attaching file hsimple.root as _file0...
(TFile *) 0x55d254465df0
root [1] .ls()
TFile** hsimple.root Demo ROOT file with histograms
TFile* hsimple.root Demo ROOT file with histograms
(... nothing works here ...)
There is no such problem when “gDirectory == gROOT” (“gFile” can be anything).