I only want to point out, or remark, that I failed on my first guess, as a user, on how metadata should be included.
I tried first using something like:
<TRestReadout name="mdName" file="file.root"/>
That sentence, which is to me somehow reasonable, it is not allowed, and ends up in a seg.fault.
Also, I tried to place that outside TRestRun, should not be also allowed? I.e. to add any metadata structure defined in the <TRestManager> into <TRestRun>. So that I am more free to set where I place my readout, or any other metadata, definitions?
To import metadata from root file, you need to use <addMetadata, on the other hand, if you use <TRestReadout, REST will treat it as a new target to initialize. Then you need to include the rml file.
By the way, in “addMetadata”, the “type” attribute is not mandatory.
In your case, the seg.fault should not be in this step. It shall smoothly initialize a blank TRestReadout object. Maybe the seg.fault comes from when using it.