Load parameters from file

Hello.

I need to load parameters from an external file while running a code in root. Parameters to load are of int, float, string type, and array of thereof.

I’d like to load the values in a more “free form” way than using a strict syntax, as the number and types of variables needed depends on some of those parameters and the execution state of the routine.

Ideally, the input file would be written in a json or xml style. And the reading would be easy, with default value implemented in case a parameter were not defined in the file.

Does anyone use anything that gets close to that ?

Thanks

Index of IO/XMLPARSER (note: it is NOT the same as the “IO/XML” below)
Index of IO/XML and ROOT User’s Guide -> Input/Output -> XML Interface

There’s a bunch of tutorials in the “${ROOTSYS}/tutorials/xml/” subdirectory.

Is there some documentation explaining in details how to use the root XML objects ? I had a look at it, but could not figure out how to use that…

I added a note about available tutorials to my previous reply here.