Hot to pass array of integers as input to the ROOT macro.
The intention is to measure speed of alghorithm written in ROOT, thus I don’t want to use nor pyROOT neither any fancy root-python core bindings. There has to be something simple when the macro is pre-compiled, correct?
if you do not want to use PyROOT I think you are left with bare Python and subprocess https://docs.python.org/2/library/subprocess.html, where the process you want to run is root -b -l -q myMacro.C.
For passing an array of integers in this situation, I am not sure how to proceed. If you choose not to use PyROOT but you still want to invoke a function in a ROOT macro, I think there is no solution, not even ctypes can help - but perhaps I do not understand the problem fully.
In any case, I think that the usage of PyROOT cannot pollute your measurement but again it depends on many factors, e.g. the time needed for your algorithm to run.
here I used f = TFIle(“xrootd:…”)
-bash-4.1$ python RemoteAccess.py 1
Error in TFile::TFile: file pnfs/bfg.uni-freiburg.de/data/atlasscratchdisk/rucio/user/tjavurek/d9/c7/ESS_DDM_test_tree.root does not exist
here I used f = TFIle.Open(“xrootd:…”)
-bash-4.1$ vim RemoteAccess.py
-bash-4.1$ python RemoteAccess.py 1
Error in TNetXNGFile::Open: [ERROR] Server responded with an error: [3010] Opening relative path ‘pnfs/bfg.uni-freiburg.de/data/atlasscratchdisk/rucio/user/tjavurek/d9/c7/ESS_DDM_test_tree.root’ is disallowed.
full path of file:
root://sedoor1.bfg.uni-freiburg.de:1094//pnfs/bfg.uni-freiburg.de/data/atlasscratchdisk/rucio/user/tjavurek/d9/c7/ESS_DDM_test_tree.root
SysError in TUnixSystem::UnixRecv: recv (Connection reset by peer)
Error in TNetFile::TNetFile: can’t open connection to rootd on host sedoor1.bfg.uni-freiburg.de at port 1094
Error in TNetFile::Create: server does not accept connection from this host: contact server administrator
Error in TNetFile::Create: failing on file root://sedoor1.bfg.uni-freiburg.de///pnfs/bfg.uni-freiburg.de/data/atlasscratchdisk/rucio/user/tjavurek/d9/c7/ESS_DDM_test_tree.root
however, from sam lxplus machin access through ROOT is possible.