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
Switch GetterOfProducts to use Event::getByToken #1591
Switch GetterOfProducts to use Event::getByToken #1591
Conversation
The test which makes sure the getByToken for a particular principal matches the type used in the ‘consumes’ was hard coded to only match Event. This change uses the proper type when doing the comparison.
Fixed typo in the function name EDGetToken*::isUninitialized.
Performance measurements of HLT by Vincenzo Innocente showed edm::GetterOfProducts was taking a large fraction of time. The slowness was from the checks done in Event::getByLabel. This changes switches the code to use getByToken when avoids those checks by construction.
This fixes the non-framework uses of the misspelled function name.
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_0_X. Switch GetterOfProducts to use Event::getByToken It involves the following packages: HLTrigger/btau @perrotta, @cmsbuild, @Dr15Jones, @danduggan, @rovere, @Martin-Grunewald, @nclopezo, @deguio, @fwyzard, @eliasron, @ktf can you please review it and eventually sign? Thanks. |
+1 |
Ok. Testing this. |
-1 >> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/src/plugins.cc >> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/RecoRomanPot/RecoFP420/plugins/ClusterizerFP420.cc In file included from /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/src/SingleTopTChannelLeptonDQM.h:12:0, from /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/src/SingleTopTChannelLeptonDQM.cc:7: /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/interface/TopDQMHelpers.h: In member function 'bool SelectionStep::select(const edm::Event&)': /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/interface/TopDQMHelpers.h:271:19: error: 'class edm::EDGetTokenTedm::ValueMap' has no member named 'isUnitialized' if(!electronId_.isUnitialized()){ ^ /build/cmsbuild/jenkins-workarea/workspace/Pull-Request-Integration/ARCHITECTURE/slc5_amd64_gcc481/CMSSW_7_0_X_2013-11-26-0200/src/DQM/Physics/interface/TopDQMHelpers.h:281:23: error: 'class edm::EDGetTokenTedm::ValueMap' has no member named 'isUnitialized' if( electronId_.isUnitialized() ? true : ((int)(*electronId)[src->refAt(idx)] & eidPattern_) ){ ^ |
…GetterOfProductsToGetByToken
Those changes were merged into the official release yesterday which is why I missed them. Sigh. I'm working on getting it fixed. |
This code was updated to use getByToken at the same time as the name change was happening.
Pull request #1591 was updated. @perrotta, @cmsbuild, @Dr15Jones, @danduggan, @rovere, @Martin-Grunewald, @nclopezo, @deguio, @fwyzard, @eliasron, @ktf can you please check and sign again. |
+1 |
-1 runTheMatrix-results/4.22_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC/step2_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC.log ----- Begin Fatal Exception 26-Nov-2013 22:18:21 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 160960 luminosityBlock: 277 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 8.0 step3 runTheMatrix-results/8.0_BeamHalo+BeamHalo+DIGICOS+RECOCOS+ALCABH+HARVESTCOS/step3_BeamHalo+BeamHalo+DIGICOS+RECOCOS+ALCABH+HARVESTCOS.log ----- Begin Fatal Exception 26-Nov-2013 22:20:37 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 1 luminosityBlock: 1 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 1001.0 step2 runTheMatrix-results/1001.0_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD/step2_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD.log ----- Begin Fatal Exception 26-Nov-2013 22:21:49 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 165121 luminosityBlock: 62 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 1306.0 step3 runTheMatrix-results/1306.0_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15/step3_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15.log ----- Begin Fatal Exception 26-Nov-2013 22:22:02 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 1 luminosityBlock: 1 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 1000.0 step2 runTheMatrix-results/1000.0_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT/step2_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT.log ----- Begin Fatal Exception 26-Nov-2013 22:22:06 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 165121 luminosityBlock: 62 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 1003.0 step2 runTheMatrix-results/1003.0_RunMinBias2012A+RunMinBias2012A+RECODDQM+HARVESTDDQM/step2_RunMinBias2012A+RunMinBias2012A+RECODDQM+HARVESTDDQM.log ----- Begin Fatal Exception 26-Nov-2013 22:24:50 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 191226 luminosityBlock: 398 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 25.0 step3 runTheMatrix-results/25.0_TTbar+TTbar+DIGI+RECO+HARVEST+ALCATT/step3_TTbar+TTbar+DIGI+RECO+HARVEST+ALCATT.log ----- Begin Fatal Exception 26-Nov-2013 22:30:37 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 1 luminosityBlock: 1 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- 4.53 step3 runTheMatrix-results/4.53_RunPhoton2012B+RunPhoton2012B+HLTD+RECODreHLT+HARVESTDreHLT/step3_RunPhoton2012B+RunPhoton2012B+HLTD+RECODreHLT+HARVESTDreHLT.log ----- Begin Fatal Exception 26-Nov-2013 22:35:13 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 194533 luminosityBlock: 329 [1] Calling endLuminosityBlock for unscheduled module BPhysicsOniaDQM/'bphysicsOniaDQM' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- you can see the results of the tests here: |
Turns out the new code caught an existing bug. I'll fix the user's code. |
… instead of Lumi Changed the consumes call to say it would get LumiSummary from Lumi instead of from the default Event. This bug was only just found because the getByToken was only recently fixed to properly catch this.
Pull request #1591 was updated. @perrotta, @cmsbuild, @Dr15Jones, @danduggan, @rovere, @Martin-Grunewald, @nclopezo, @deguio, @fwyzard, @eliasron, @ktf can you please check and sign again. |
+1 |
-1 But I still see an error while running step 4 of the matrix test 1001: $ more step4_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD.log MessageLogger Summary type category sev module subroutine count total
type category Examples: run/evt run/evt run/evt
Severity # Occurrences Total Occurrences System 4 4 |
-1 runTheMatrix-results/1001.0_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD/step4_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD.log ----- Begin Fatal Exception 27-Nov-2013 11:57:37 CET----------------------- An exception of category 'BranchTypeMismatch' occurred while [0] Processing run: 165121 luminosityBlock: 62 [1] Calling endLuminosityBlock for unscheduled module AlcaBeamSpotHarvester/'ALCAHARVESTBeamSpotByRun' Exception Message: A get using a EDGetToken was done in LuminosityBlock but the consumes call was for Event. Please modify the consumes call to use the correct branch type. ----- End Fatal Exception ------------------------------------------------- you can see the results of the tests here: |
When calling consumes, one must specify if the data is coming from somewhere other than the Event. The framework check which enforced the match was previously broken but has now been fixed. This change properly registers with consumes the fact that the data is coming from the Lumi.
Pull request #1591 was updated. @perrotta, @cmsbuild, @Dr15Jones, @demattia, @danduggan, @rovere, @Martin-Grunewald, @nclopezo, @rcastello, @deguio, @fwyzard, @eliasron, @ktf can you please check and sign again. |
+1 |
I searched our code base for other cases where https://cmssdt.cern.ch/SDT/lxr/search?v=CMSSW_7_0_X_2013-11-27-0200&filestring=&string=umi.*getByTok I only found two cases, both of which are fixed in the most recent commit. Unfortunately, I've been unable to build a 'release' in a timely manner becuase of the many hundreds of packages which need to be built. This means I've not been able to do any runTheMatrix tests. |
I still haven't been able to form a completely self-consistent build, however the runTheMatrix jobs I have been able to run (1001.0 4.22 1003.0) now succeed. |
+1 |
1 similar comment
+1 |
@demattia @rcastello @ktf Alca is the last holdout for signing this. It's a real shame it missed pre9. |
It also does not merge anymore... |
Sigh. I feared that might be the case given the recent HLT changes. |
…GetterOfProductsToGetByToken. In the case of conflicts, took changes from official-cmssw/CMSSW_7_0_X Conflicts: HLTrigger/HLTanalyzers/src/EventHeader.cc HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc HLTrigger/HLTanalyzers/src/HLTBitAnalyzer.cc HLTrigger/HLTanalyzers/src/HLTHeavyIon.cc
Pull request #1591 was updated. @perrotta, @cmsbuild, @Dr15Jones, @demattia, @danduggan, @rovere, @Martin-Grunewald, @nclopezo, @rcastello, @deguio, @fwyzard, @eliasron, @ktf can you please check and sign again. |
+1 |
+1 |
@smuzaffar @davidlt @ktf Given that the only change this time was to deal with a merge conflict with the HLT and the HLT has signed off on this change, could you please bypass the rest of the (now redundant) signatures and finally get this in the release? |
…Token Switch GetterOfProducts to use Event::getByToken
…n-v4.0.4 xrootd: fix version ("unknown" -> "v4.0.4")
Performance measurements by Vincenzo Innocente showed that the HLT was spending too much time in edm::GetterOfProducts. The time was caused by safety checks in Event::getByLabel. This code changes the class to use Event::getByToken which avoids those checks by design.
This also includes a fix for a typo in the name of EDGetToken*::isUninitialized as well as a bug fix which prevented getByToken to work for Runs and Lumis.