Root in batch mode

:question:
Hi Rooters,
I have a question about batch mode. If I have an input parameter like run number, how can I use

root -b -q myCode.C
It gives

root [0]
Processing myCode.C…
Error: Function myCode() is not defined in current scope FILE: LINE:0
Possible candidates are…
filename line:size busy function type and name
myCode.C 2:97 0 public: void myCode(int runno);
*** Interpreter error recovered ***

If I find the solution I want to put this process myCode .C in a shell script for mutiple runs.

Regards,

Taylan


The code start as

void myCode(int runno)
{

}


Try (be mindfull of the quotes):

root -q -b 'myCode.C(3)'

Cheers,
Philippe.