Skip to content
This repository was archived by the owner on Mar 12, 2019. It is now read-only.

Simpler xml parsing - #211

Closed
DryRun wants to merge 20 commits into
HCALRunControl:masterfrom
DryRun:SimplerXMLParsing
Closed

Simpler xml parsing#211
DryRun wants to merge 20 commits into
HCALRunControl:masterfrom
DryRun:SimplerXMLParsing

Conversation

@DryRun

@DryRun DryRun commented Dec 12, 2016

Copy link
Copy Markdown
Contributor

Working version of new master snippet parser enforcing XML tag <=> FM parameter (#170). Replaces the previous include method (which used HCALxmlHandler::readFile()) with XInclude. Also adds support for specifying VectorT, and MapT parameters in JSON format, which are parsed with the rcms JsonUtil (for example, [1,2,3] or {"key1":"value1","key2":"value2"}).

@DryRun DryRun added this to the MasterSnippetRework milestone Dec 12, 2016
@DryRun

DryRun commented Jan 25, 2017

Copy link
Copy Markdown
Contributor Author

I added support for concatenating pre-existing StringT parameters, rather than overwriting. This is needed for HCAL_CFGSCRIPT. The syntax is, e.g., <HCAL_CFGSCRIPT conflict="concatenate">. The default is "overwrite".

@sethcooper

Copy link
Copy Markdown
Collaborator

This should close #28, right?

@kakwok

kakwok commented Jan 26, 2017

Copy link
Copy Markdown
Collaborator

no, #219 aka GrandMaster should.

} else {
functionManager.getHCALparameterSet().put(new FunctionManagerParameter<StringT>(parameterName, new StringT(parameterValue)));
}
break;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is needed.

//}

} catch ( DOMException | ParserConfigurationException | SAXException | IOException e) {
logger.error("[HCAL " + functionManager.FMname + "]: Got an error when parsing masterSnippet: " + e.getMessage());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should goToError when MasterSnippet is not a well-formed XML

goToError when mastersnippet is a malformed XML
@jhakala

jhakala commented Apr 13, 2017

Copy link
Copy Markdown
Member

Are there plans for this PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants