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
bugfix for FwdRef #3850
bugfix for FwdRef #3850
Conversation
A new Pull Request was created by @arizzi for CMSSW_7_1_X. bugfix for FwdRef It involves the following packages: DataFormats/Common @cmsbuild, @Degano, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks. |
return ref_.get(); | ||
} else if ( backRef_.isNonnull() ) { | ||
return backRef_.get(); | ||
} else { |
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.
There is no need for the else here.
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.
does it hurt? do you want us to update the PR to remove that? (please note that this commit is also used in other branches and we would prefered not to change this unless really required, to avoid merge/rebase nightmares)
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 used to be that some compilers would complain because they would think it was possible to reach the end of the function and not return a value. Could you please make another pull to remove it which we will include after this one to avoid your nightmare scenario?
-1 /afs/cern.ch/cms/sw/ReleaseCandidates/vol0/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-05-13-1400/lib/slc6_amd64_gcc481/libCondCoreUtilities.so: undefined reference to `void L1MuCSCTFAlignment::serialize(eos::portable_oarchive&, unsigned int)' /afs/cern.ch/cms/sw/ReleaseCandidates/vol0/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-05-13-1400/lib/slc6_amd64_gcc481/libCondCoreUtilities.so: undefined reference to`void L1MuDTQualPatternLut::serializeeos::portable_iarchive(eos::portable_iarchive&, unsigned int)' /afs/cern.ch/cms/sw/ReleaseCandidates/vol0/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-05-13-1400/lib/slc6_amd64_gcc481/libCondCoreUtilities.so: undefined reference to `void SiStripBackPlaneCorrection::serialize(eos::portable_oarchive&, unsigned int)' /afs/cern.ch/cms/sw/ReleaseCandidates/vol0/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-05-13-1400/lib/slc6_amd64_gcc481/libCondCoreUtilities.so: undefined reference to`void L1CaloHcalScale::serializeeos::portable_oarchive(eos::portable_oarchive&, unsigned int)' /afs/cern.ch/cms/sw/ReleaseCandidates/vol0/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-05-13-1400/lib/slc6_amd64_gcc481/libCondCoreUtilities.so: undefined reference to `void L1MuTriggerScales::serializeeos::portable_oarchive(eos::portable_oarchive&, unsigned int)' collect2: error: ld returned 1 exit status >> Deleted: tmp/slc6_amd64_gcc481/src/Alignment/CommonAlignmentProducer/bin/aligncond_split_iov/aligncond_split_iov gmake: **\* [tmp/slc6_amd64_gcc481/src/Alignment/CommonAlignmentProducer/bin/aligncond_split_iov/aligncond_split_iov] Error 1 gmake: **\* Waiting for unfinished jobs.... gmake: **\* [There are compilation/build errors. Please see the detail log above.] Error 2 you can see the results of the tests here: |
+1 |
Tested by hand. |
-1 ---> test testRecoMETMETProducers had ERRORS you can see the results of the tests here: |
@gpetruc @rappoccio
Fix FwdRef so that at get() time it checks Availability rather than Nullness.
Should fix the access when the original collection is kept and the forward pointed is dropped.
This way should also be complaint with the implementation of edm::FwdRef::isAvailable that return true if any of the two collections is available. With old implementation despite isAvailable being true, dereferencing would throw if the fwd pointed was dropped.
See:
https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/3282.html
Similar PR will be prepared for 70X