framework icon indicating copy to clipboard operation
framework copied to clipboard

Add the possibility to load RML files using restRoot

Open jgalan opened this issue 3 years ago • 3 comments

It would be interesting to automatically load the class definitions found inside a RML file directly using restRoot.

It could just create an instance md_name for each object found at the RML.

So that we could do restRoot config.rml

jgalan avatar Feb 09 '22 12:02 jgalan

Shall it load only metadata from TRestRun section?

nkx111 avatar Feb 10 '22 07:02 nkx111

I was thinking more on a RML file as the following one.

https://github.com/rest-for-physics/axionlib/blob/mcpl_optics/pipeline/optics/setups.rml

where I have several definitions that I could load at once in a restRoot session.

So, that I would do restRoot setups.rml, and then I get 3 instances, for example, md_mcpl, md_mcpl2 and md_mcpl3 ready to use.

jgalan avatar Feb 10 '22 07:02 jgalan

I was thinking about just parsing the file with a method that returns a std::pair with the ClassName and name.

https://github.com/rest-for-physics/framework/commit/ba941ef939de0e8cb6d39c8be01c04e731aa87c3

Then, just Process it in restRoot

jgalan avatar Feb 10 '22 07:02 jgalan