At ATLAS Open Data, we have a code that works fine in versions of ROOT 6.18, but when using on versions of ROOT over 6.20, I have issues that seem to be related to TFile.
I tested the code in several places and ROOT installation, including SWAN.
The code has the form like:
It is like the file is not created:
Writing with name option: dataA
SysError in <TFile::TFile>: file /home/jovyan/notebooks-collection-opendata/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HWWAnalysis/Output_HWWAnalysis/dataA.root can not be opened No such file or directory
Error in <TROOT::WriteTObject>: The current directory (Rint) is not associated with a file. The object (hist_etmiss) has not been written.
Error in <TROOT::WriteTObject>: The current directory (Rint) is not associated with a file. The object (hist_mLL) has not been written.
Error in <TROOT::WriteTObject>: The current directory (Rint) is not associated with a file. The object (hist_ptLL) has not been written
So, my very simple question (after looking on the internet) is there a new/different way to include TFile to match current versions of ROOT?
Make sure that this directory exists and is writable (by you): ls -al /home/jovyan/notebooks-collection-opendata/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HWWAnalysis/Output_HWWAnalysis/
Thanks, @Wile_E_Coyote !
That was a silly one. I got the wrong permissions for that folder. So now, it is saving the files.
Now, and excuses for continue using this issue, but, originally, my problem started when I got this error:
starting ROOT
Info in <TUnixSystem::ACLiC>: creating shared library /home/jovyan/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis/./main_HyyAnalysis_C.so
In file included from input_line_9:6:
In file included from ././main_HyyAnalysis.C:5:
In file included from /srv/conda/envs/notebook/include/TFile.h:38:
In file included from /srv/conda/envs/notebook/include/ROOT/TRWSpinLock.hxx:19:
In file included from /srv/conda/envs/notebook/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/include/c++/9.3.0/condition_variable:38:
In file included from /srv/conda/envs/notebook/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/include/c++/9.3.0/chrono:41:
/srv/conda/envs/notebook/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/include/c++/9.3.0/ctime:80:11: error: no member named 'timespec_get' in the global namespace
using ::timespec_get;
~~^
Error in <ACLiC>: Executing '/srv/conda/envs/notebook/bin/rootcling -v0 "--lib-list-prefix=/home/jovyan/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis/main_HyyAnalysis_C_ACLiC_map" -f "/home/jovyan/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis/main_HyyAnalysis_C_ACLiC_dict.cxx" -I$ROOTSYS/include -I"/srv/conda/envs/notebook/etc/" -I"/srv/conda/envs/notebook/etc//cling" -I"/srv/conda/envs/notebook/include/" -I"/srv/conda/envs/notebook/include" -D__ACLIC__ "/home/jovyan/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis/./main_HyyAnalysis.C" "/home/jovyan/13-TeV-examples/python/atlas-demo-Hyy/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis/main_HyyAnalysis_C_ACLiC_linkdef.h"' failed!
input_line_9:2:3: error: use of undeclared identifier 'main_HyyAnalysis'
(main_HyyAnalysis(0, 0))
^
Error in <HandleInterpreterException>: Error evaluating expression (main_HyyAnalysis(0, 0)).
Execution of your code was aborted.
end of ROOT execution
And, again, looking around, it seems that something is missing in the ROOT installation (6.24.0), but this is a jupyterhub hosted at CERN (not by me) so, I cannot make changes in the configuration.
Is this assumption more and less correct? or should I be looking into other things?