<include file statement it is allowed inside <TRestManager section?

REST version : v2.2.12_dev

I would like to create several RML files that share a common <globals section. However, when I introduce something like <include file="globals.xml">, where globals.xml contains just <globals> ... </globals> definition it seems that it is not working.

From TRestMetadata documentation it looks as if this should be allowed.

I believe, that this is related with the fact that <globals> is placed outside the <metadata> definitions.

However, could we expand the include statements anytime we open the RML file?

I think that would be interesting if we want to make different RML files that share common sections.

I.e. I would also be able to define other common metadata structures as TRestRun.

Yes. In the current implementation, “include”, “for”, “if”, “${VAR}” is expanded after “global” expansion. But I think you can still use include definition in the “globals” section:

<globals file="globals.xml"/>

You can place the “include” for this TRestRun section inside TRestManager section.

Thats a fair way to insert other sections. I tried that, but still it is not recognising my globals.

<TRestRun file="run.xml"/> works smoothly.

I see. It seems only the child sections of the “global” section is extracted into the TRestManager section, and this process is before “include” expansion.

I have added a quick modification to TRestMetadata to support global section include.

1 Like

Ok, that’s perfect. Tested right now, works smoothly.:grinning: