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

Misc cleanup -- Get rid of ExprEvalInterface #870

Merged
merged 2 commits into from Sep 19, 2013

Conversation

ktf
Copy link
Contributor

@ktf ktf commented Sep 18, 2013

Discussed with @ianna over coffee. Given we have only one evaluator we can simply get rid of the abstract base class and clean up the code.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ktf (Giulio Eulisse) for CMSSW_7_0_X.

Misc cleanup -- Get rid of ExprEvalInterface

It involves the following packages:

DetectorDescription/Core
DetectorDescription/Parser
DetectorDescription/RegressionTest
DetectorDescription/ExprAlgo

@civanch, @Dr15Jones, @ianna, @mdhildreth, @nclopezo, @ktf can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.

@cmsbuild
Copy link
Contributor

Pull request #870 was updated. @civanch, @Dr15Jones, @ianna, @mdhildreth, @nclopezo, @ktf can you please check and sign again.

@cmsbuild
Copy link
Contributor

Pull request #870 was updated. @civanch, @Dr15Jones, @ianna, @mdhildreth, @nclopezo, @ktf can you please check and sign again.

@@ -63,6 +64,7 @@ class DDLElementRegistry //: public DDXMLElementRegistry

/// Get the name given a pointer. This may not be needed...
const std::string& getElementName(DDXMLElement* theElement) const;
ClhepEvaluator &evaluator() { return ExprEval::instance(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

@ktf I wonder why would you like to do this instead of using ExprEval::instance() directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this way all the accesses to ExprEvalEvaluator go through a instance method of the DDLElementRegistry which is already percolated to the deepest level it is needed (the various DDXMLElements or whatever they are called). This allows me to remove all the references to ExprEvalEvaluator::instance apart from this one and making it just a property of DDLElementRegistry will do the trick of getting rid of the ExprEvalEvaluator singleton.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good to me.

@ianna
Copy link
Contributor

ianna commented Sep 19, 2013

I run the following test:
cmsRun $CMSSW_RELEASE_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/readIdealAndDump.py

The before and after results are:

< TimeReport> JobTime=1.37958e+09 JobCPU=1.43778
---
> TimeReport> JobTime=1.37958e+09 JobCPU=1.77973


< TimeReport> Time report complete in 36.2799 seconds
---
> TimeReport> Time report complete in 39.5412 seconds

@ianna
Copy link
Contributor

ianna commented Sep 19, 2013

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

@ktf
Copy link
Contributor Author

ktf commented Sep 19, 2013

As discussed with @ianna the variance on the measurement is actually larger than the difference reported. Approving this for the time being. We'll keep it in mind if we see a big regression WRT pre4 at the end of the clean up. All the produced files are equal.

ktf added a commit that referenced this pull request Sep 19, 2013
Misc cleanup -- Get rid of ExprEvalInterface
@ktf ktf merged commit af4c8f0 into cms-sw:CMSSW_7_0_X Sep 19, 2013
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

3 participants