Converting a cube into root format

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18
Platform: Not Provided
Compiler: Not Provided


I am trying to convert a cube that created from a Data Acquistion system into root format but then I get a error saying 0 arguments were provided. I am not sure of this error since the arguments are provided.
Please help.makecube.C (2.5 KB)

Hi @lum_totzin,
sorry for the late reply, this must have slipped through the cracks!

argc and argv are not passed to functions in ROOT macros the same way they are passed to the main function of a compiled program.
You should probably accept arguments like in a normal function in makecube, e.g.

void makecube(int arg1, int arg2)

and then execute the macro with root -l -b -q "makecube.C(8, 42)".