Skip to content
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

Merged
merged 4 commits into from Jan 13, 2019
Merged

DD4hep: SpecPars Processing #25615

merged 4 commits into from Jan 13, 2019

Conversation

ianna
Copy link
Contributor

@ianna 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

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2019

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7904

  • This PR adds an extra 40KB to repository

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
e.g. curl https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7904/git-diff.patch | patch -p1

You can run scram build code-checks to apply code checks directly

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7922

  • This PR adds an extra 44KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ianna (Ianna Osborne) for master.

It involves the following packages:

DetectorDescription/DDCMS
Geometry/MuonCommonData

@civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks.
@ptcox this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@ianna
Copy link
Contributor Author

ianna commented Jan 10, 2019

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 10, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32515/console Started: 2019/01/10 15:09

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25615/7935

  • This PR adds an extra 44KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 10, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32523/console Started: 2019/01/10 22:37

@cmsbuild
Copy link
Contributor

Pull request #25615 was updated. @civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please check and sign again.

@ianna
Copy link
Contributor Author

ianna commented Jan 10, 2019

please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25615/32523/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3153717
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3153512
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@ianna
Copy link
Contributor Author

ianna commented Jan 11, 2019

+1

@cmsbuild
Copy link
Contributor

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)

@fabiocos
Copy link
Contributor

@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
Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at 11-Jan-2019 10:23:28.880 CET
DDTestSpecPars::analyze:
PersistencyIO INFO +++ Set Streamer to dd4hep::OpaqueDataBlock
CompactLoader INFO +++ Processing compact file: DetectorDescription/DDCMS/data/cms-2015-muon-geometry.xml with flag (null)
XercesC FATAL +++ FATAL Error at file "", Line 0 Column: 0 Message:unable to open primary document entity '/build/fabiocos/105X/25615/CMSSW_10_5_X_2019-01-10-2300/src/DetectorDescription/DDCMS/test/python/DetectorDescription/DDCMS/data/cms-2015-muon-geometry.xml'
----- Begin Fatal Exception 11-Jan-2019 10:23:29 CET-----------------------
An exception of category 'StdException' occurred while
[0] Processing Event run: 1 lumi: 1 event: 1 stream: 0
[1] Running path 'p'
[2] Calling method for module DDTestSpecPars/'test'
[3] Using EventSetup component DDSpecParRegistryESProducer/'' to make data DDSpecParRegistry/'' in record DDSpecParRegistryRcd
[4] Using EventSetup component DDDetectorESProducer/'' to make data DDDetector/'' in record DetectorDescriptionRcd
Exception Message:
A std::exception was thrown.
Document::root: Invalid handle!
dd4hep: while parsing DetectorDescription/DDCMS/data/cms-2015-muon-geometry.xml
dd4hep: with plugin:DD4hep_CompactLoader
----- End Fatal Exception -------------------------------------------------

@ianna
Copy link
Contributor Author

ianna commented Jan 11, 2019

@fabiocos - it works for me from the src directory:

[src]$ cmsRun DetectorDescription/DDCMS/test/python/testDDSpecPars.py

I'll change the configurations to use FileInPath in the next PR (and also add the test runner script)

@ianna
Copy link
Contributor Author

ianna commented Jan 11, 2019

@fabiocos - this PR #25625 should address the issue.

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);
Copy link
Contributor

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???

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit d2e26f0 into cms-sw:master Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants