How to pass multiple strings

Dear developers,

I want to pass two strings in a script. The string abc takes root like dMergedMiniEvents_0 while string xyz takes root files like MergedMiniEvents_0. Both files runs and produce the output file like output.root
Please help me to do this.

Nab (9.9 KB)


you should pass strings by const reference and not copy:

void fake_nt2(const TString &abc, const TString &xyz )

I assume you want to invoke a macro with arguments from command line. If yes what you need to do is:

root -b -q\(\"test\",\"test2\"\) 


Where I should add this:

string xyz open only f file and string abc open only f1 file

Instead of test and test1 I guess?

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