Looping over a "config.in" file

I have a doubt about the usage of a “config.in” file in my code, say that I want to run a process in n root files and I list them this way:


and then I want to open it in a root file (this way):

ifstream inFile;

    inFile.open ("config.in", ios::in);

    if (!inFile){
        std::cerr << "Error: Can't open input file:" << std::endl;

but say I want to open the files and loop over them without opening each one this way:

input_filename = input_file->GetValue("input_filename", "file");
output_filename = input_file->GetValue("output_filename", "file");

or should I just put them in a .txt file and loop over that?

ROOT Version: 6.14.06
Platform: Ubuntu 18.04
Compiler: g++ 7.4.0

Hi Fernando,

is this a ROOT question? It looks like the answer can be found seeking a bit in stack overflow


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