Passing arguments to a root macro which is being run from a script which is passed to Condor

So it is there but is the ‘current directory’ the one you expect when run under Condor? (Having condor run the command I provided would answer those question)

Run.1400577.0.txt (34.1 KB)

Attached the log file. Right at the bottom it shows ‘Ratios.cxx’ and I assume the location of the file.

The .cxx file is copied to the directory I want to run it in.

Fair enough. The root error message is then very strange.
What is the output if you include:

set -x
root.exe -b -l -q Ratios.cxx
root.exe -b -l -q Ratios.cxx+
root.exe -b -l -q 'Ratios.cxx+(33)'
root.exe -b -l -q 'Ratios.cxx+("somestring")'
root.exe -b -l -q "Ratios.cxx+(\"somestring\")"
root.exe -b -q "Ratios.cxx+(\"${_STRINGNAME_}\")"


Attaching the .out and the .err files which I have had to give .txt extensions to to upload.

The script never ran in each instance because of the Ratios.cxx requiring 10 arguments and not just 1 (I’d put 1 as a dummy example of the issue I was facing, as I need to pass in 10 strings, so whatever the issue is, it’s affecting all 10 strings). But it seems like a solution has been found. I am curious as to why I need to put the ‘set -x’ and root.exe at the start of the command?

This appears to be the solution:

  set -x
  root.exe -b -q "Ratios.cxx+(\"${_STRINGNAME_}\")"

Run.1.err.txt (3.1 KB) Run.1.out.txt (34.7 KB)

Thank you to everyone for your input!

Well, there is nothing you cannot fix with an appropriate amount of apostrophes.

root -b -q 'Ratios.cxx("'"${_STORAGE_EVAL_}"'", "'"${_STORAGE_EVAL_}"'", "410470", "'"${_ALTDSID_}"'", "2", "Powheg+Pythia8", "'"${_ALTERNATIVESAMPLELABEL_}"'", "'"${_NJETS_}"'", "MVA_'"${_NJETS_}"'j", "'"${_FLAVOUR_}"'")'

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.