New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DD4hep: SpecPars Processing #25615
DD4hep: SpecPars Processing #25615
Conversation
ianna
commented
Jan 9, 2019
- Parse SpecParSection with PartSelector and Parameter tags
- Store them in a registry accessible from an EventSetup
- Add an analyzer and a test
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7904
Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7904/git-diff.patch You can run |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7922
|
A new Pull Request was created by @ianna (Ianna Osborne) for master. It involves the following packages: DetectorDescription/DDCMS @civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7935
|
The tests are being triggered in jenkins. |
Pull request #25615 was updated. @civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please check and sign again. |
please test |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
@ianna if I try the test provided in this PR (and not run in the unit tests) I get 10:23 cmsdev15 1514> cmsRun testDDSpecPars.py |
@fabiocos - it works for me from the src directory:
I'll change the configurations to use FileInPath in the next PR (and also add the test runner script) |
string value = e.attr<string>( DD_CMU( value )); | ||
bool eval = e.hasAttr( _U( eval )) ? e.attr<bool>( _U( eval )) : false; | ||
string value = e.attr<string>(DD_CMU(value)); | ||
bool eval = e.hasAttr(_U(eval)) ? e.attr<bool>(_U(eval)) : (specParSect.hasAttr(_U(eval)) ? specParSect.attr<bool>(_U(eval)) : false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line qualifies for a comment. You are setting variable based upon its own value???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variable is set based on an "eval" attribute of an element if it's present, or the parent's element attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_U(eval)
actually becomes ::dd4hep::xml::Unicode_eval
, which is a constant. Giving bool eval
the same name as the tag is confusing. I suggest calling it numberTag
since it seems to indicate a number when it is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is actually a flag which indicates if a string needs to be evaluated. The naming is done on purpose and is consistent throughout.
+1 |