Hi everyone,
I have a question (probably more related to the basics of C/C++).
I have a root macro that takes in a file, processes it, and saves the output in a file; the input and output files are indexed(so no overwriting).
Once I execute the root macro to take input input_file_1 and output in output_1 and it is still running, can I -e-execute that macro with a different input(input_file_1) and corresponding out file(output_file_2)?
From what you describe you can launch multiple process either running the macro with the different argument without any problem.
You can also most likely (if your macro/function is thread safe) do it with a single process and multiple threads, for example something like:
ROOT::EnableThreadSafetly()
std::vector<std::thread> threads;
for( loop over the inputs ) {
threads.emplace_back( name_of_function, value_arguments);
}
for (auto& t : threads)
t.join();