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

Fix more clang issues. #3592

Merged
merged 1 commit into from May 2, 2014
Merged

Fix more clang issues. #3592

merged 1 commit into from May 2, 2014

Conversation

ktf
Copy link
Contributor

@ktf ktf commented Apr 30, 2014

No description provided.

@cmsbuild
Copy link
Contributor

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

Fix more clang issues.

It involves the following packages:

CondFormats/L1TObjects
DataFormats/CSCDigi
DataFormats/GeometryVector
DataFormats/L1Trigger
DataFormats/ParticleFlowReco
DataFormats/TrackReco
DataFormats/TrackerCommon

@apfeiffer1, @diguida, @civanch, @mdhildreth, @cmsbuild, @anton-a, @thspeer, @rcastello, @slava77, @ggovi, @Degano, @mulhearn, @nclopezo can you please review it and eventually sign? Thanks.
@bachtis, @lgray this is something you requested to watch as well.
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.
@nclopezo, @ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@cmsbuild
Copy link
Contributor

-1
I found an error when building:

>> Compiling  /build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/GeneratorInterface/ThePEGInterface/src/ThePEGInterface.cc 
Entering library rule at src/GeneratorInterface/ThePEGInterface/plugins
>> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/DQMOffline/JetMET/plugins/SealModule.cc 
>> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/DQMOffline/JetMET/plugins/SusyPostProcessor.cc 
/build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/GeneratorInterface/ThePEGInterface/src/HepMCConverter.cc: In constructor 'ThePEG::HepMCConverter::HepMCConverter(const ThePEG::Event&, bool, ThePEG::Units::Energy, ThePEG::Units::Length)':
/build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/GeneratorInterface/ThePEGInterface/src/HepMCConverter.cc:68:58: error: 'const class ThePEG::Event' has no member named 'optionalWeights'
   geneve = Traits::newEvent(ev.number(), ev.weight(), ev.optionalWeights());
                                                          ^
Entering library rule at DQM/HLTEvF
>> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/FWCore/Services/plugins/ConcurrentModuleTimer.cc 
>> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-integration-CMSSW_7_1_X-slc6_amd64_gcc481/CMSSW_7_1_X_2014-04-30-0200/src/FWCore/Services/plugins/Module.cc 


you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3592/1190/summary.html

// << std::endl;
}
return depth;
return isHadron ? corrA : corrA*(corrB + log(energy));
Copy link
Contributor

Choose a reason for hiding this comment

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

This changes behaviour: for isHadron not being either 0 or 1 the new code returns some value, while the old code asserts. Not sure if that's acceptable and/or what you wanted ...:) As it's not really my area of expertise, I'll still +1 for DB.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

isHadron is a bool, though, which casts to either 0 or 1.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, did not see that one. Thanks ! :)

On Wed, Apr 30, 2014 at 9:59 PM, Giulio Eulisse notifications@github.comwrote:

In DataFormats/ParticleFlowReco/src/PFCluster.cc:

@@ -71,20 +71,7 @@ double PFCluster::getDepthCorrection(double energy, bool isBelowPS,
corrA = depthCorAp_;
corrB = depthCorBp_;
}

  • double depth = 0;
  • switch(isHadron) {
  • case 0: // e/gamma
  • depth = corrA*(corrB + log(energy));
  • break;
  • case 1: // hadrons
  • depth = corrA;
  • break;
  • default:
  • assert(0);
  • // edm::LogError("PFCluster") << "unknown function for depth correction!"
  • // << std::endl;
  • }
  • return depth;
  • return isHadron ? corrA : corrA*(corrB + log(energy));

isHadron is a bool, though, which casts to either 0 or 1.


Reply to this email directly or view it on GitHubhttps://github.com//pull/3592/files#r12162598
.

Thanks,
cheers, andreas

@apfeiffer1
Copy link
Contributor

+1
for DB - though have a look at the comment above. :)

@mulhearn
Copy link
Contributor

mulhearn commented May 1, 2014

+1

@civanch
Copy link
Contributor

civanch commented May 2, 2014

+1

@anton-a
Copy link

anton-a commented May 2, 2014

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2014

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

ktf added a commit that referenced this pull request May 2, 2014
Clang -- Fix more clang issues.
@ktf ktf merged commit 3c631eb into cms-sw:CMSSW_7_1_X May 2, 2014
@ktf ktf deleted the fix-more-clang branch May 2, 2014 22:08
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

7 participants