iLCSoft / Marlin

Modular Analysis and Reconstruction for the LINear Collider
GNU General Public License v3.0
11 stars 16 forks source link

Dump post processed XML file #22

Closed rete closed 7 years ago

rete commented 7 years ago

BEGINRELEASENOTES

ENDRELEASENOTES

andresailer commented 7 years ago

I think it would be better to allow the writing of the xml in addition to running Marlin. If the invocation to create the PostParsed.xml file is an extra step things become more complicated in iLCDirac, because Marlin has to be called once more, but only for certain versions. If -p is just another flag to the usual Marlin run it can be added by the user. I.e.

Marlin -pPostParsed.xml PreParsed.xml

Would run PreParsed.xml and also write out the PostParsed.xml file. And then add a "dry-run" option Marlin -n -pPostParsed.xml PreParsed.xml


that only produces PostParsed.xml.
gaede commented 7 years ago

I believe what we discussed is:

rete commented 7 years ago

I added a dry-run option -n Summary : Printout the marlin XML and run Marlin :

Marlin -p postSteering.xml steering.xml

Printout the marlin XML and exit :

Marlin -n postSteering.xml steering.xml

@gaede : Is this OK for you in this way ? I could change it to put this functionnality in a xml parameter in the global section.

rete commented 7 years ago

The output steering file name is no longer taken from command line args but from the input steering file itself by the key "OutputSteeringFile". This has the following consequences :

I added this key (OutputSteeringFile) to the steering file of the ctest that is testing the include mechanism. It works as expected.

Example :

# take the output file name from steering file and run Marlin as usual
Marlin steeringFile.xml 
# same but exit after writing the output steering file
Marlin -n steeringFile.xml 
# change the output file name
Marlin steeringFile.xml --global.OutputSteeringFile=myParsedSteeringFile.xml 
rete commented 7 years ago

I'm done with release notes

rete commented 7 years ago

Do not merge yet. There are missing features in this PR that I discussed with Frank.

rete commented 7 years ago

I added :

For this latest point, it means that command line parameter are replaced in the constant element in the XML tree but not constant evaluation. As a consequence, the output parsed file will contain runtime argument from the command line while running in dry-run mode but will re-evaluate again the constants and processor parameters in the next parsing.

I don't know if I'm clear ...