Convert XML » History » Version 6
« Previous -
Version 6/8
(diff) -
Next » -
Current version
Anna Mazzacane, 11/01/2019 11:10 AM
Convert XML¶
To convert a LArBatch/project.py XML to POMS configuration file, the command is:
Project.py --convert_xml <UserAnalysis>.xml
where <UserAnalysis>.xml
is the XML to convert.
This will produce two POMS configuration files with extension .cfg
and .ini
An output example of the XML conversion is:
$ Project.py --convert_xml UserAnalysis.xml 2019-06-14 13:18:52,041 - INFO - template cfg file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_launch.cfg 2019-06-14 13:18:52,041 - INFO - template ini file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_campaign.ini 2019-06-14 13:18:52,077 - INFO - cfg file created in: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.cfg 2019-06-14 13:18:52,149 - INFO - ini file created in: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.ini
POMS configuration files are wrote to: /<exp>/app/users/${USER}/poms_cfg/
configuration file names are in the format: ${USERS}_<UserAnalysis>.{cfg.ini}
By design the XML converter doesn't override POMS configuration files.
If POMS configuration files with the same name already exist, the XML converter will abort the conversion.
$ Project.py --convert_xml UserAnalysis.xml 2019-06-14 13:46:44,411 - INFO - template cfg file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_launch.cfg 2019-06-14 13:46:44,411 - INFO - template ini file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_campaign.ini 2019-06-14 13:46:44,438 - ERROR - The cfg file vito_UserAnalysis.cfg already exists in /uboone/app/users/vito/poms_cfg 2019-06-14 13:46:44,438 - ERROR - Please, use different cfg file name or remove the old one 2019-06-14 13:46:44,438 - ERROR - XML -> cfg conversion ABORTED!!!
In this case existing POMS configuration files can be manually removed.
Alternatively the option
-c
allows to use a different filename for the POMS configuration file:
$ Project.py --convert_xml UserAnalysis.xml -c UserAnalysis_v2 2019-06-14 13:47:23,596 - INFO - template cfg file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_launch.cfg 2019-06-14 13:47:23,597 - INFO - template ini file name is /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/project_py/v1_1_0/NULL/template/generic/template_campaign.ini 2019-06-14 13:47:23,628 - INFO - cfg file created in: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis_v2.cfg 2019-06-14 13:47:23,655 - INFO - ini file created in: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis_v2.ini