-
Notifications
You must be signed in to change notification settings - Fork 4.6k
esConsumes migration for SiStripFedZeroSuppression, SiStripHitEffFromCalibTree, and SiStripClusterToDigiProducer #33632
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a800244
Use esConsumes for SiStripFedZeroSuppression
pieterdavid 5fedf04
esConsumes for SiStripClusterToDigiProducer
pieterdavid 23498b4
esConsumes for SiStripHitEffFromCalibTree
pieterdavid 61b162f
Fix compilation warning
pieterdavid 8e03b84
Avoid 'handle' in member names that are not ESHandles anymore
pieterdavid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,11 @@ | |
| #include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
|
|
||
| #include "FWCore/Framework/interface/EventSetup.h" | ||
| #include "FWCore/Framework/interface/ESHandle.h" | ||
| #include "FWCore/Framework/interface/ESWatcher.h" | ||
| #include "FWCore/Framework/interface/ConsumesCollector.h" | ||
|
|
||
| #include "CondFormats/DataRecord/interface/SiStripNoisesRcd.h" | ||
| #include "CondFormats/DataRecord/interface/SiStripThresholdRcd.h" | ||
|
|
||
| #include <vector> | ||
| class SiStripNoises; | ||
|
|
@@ -17,9 +21,14 @@ class SiStripFedZeroSuppression { | |
| friend class SiStripRawProcessingFactory; | ||
|
|
||
| public: | ||
| SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc = true, bool trunc10bits = false) | ||
| : noise_cache_id(0), | ||
| threshold_cache_id(0), | ||
| SiStripFedZeroSuppression(uint16_t fedalgo, | ||
| edm::ConsumesCollector* iC = nullptr, | ||
| bool trunc = true, | ||
| bool trunc10bits = false) | ||
| : noiseToken_{iC ? decltype(noiseToken_){iC->esConsumes<SiStripNoises, SiStripNoisesRcd>()} | ||
| : decltype(noiseToken_){}}, | ||
| thresholdToken_{iC ? decltype(thresholdToken_){iC->esConsumes<SiStripThreshold, SiStripThresholdRcd>()} | ||
| : decltype(thresholdToken_){}}, | ||
| theFEDalgorithm(fedalgo), | ||
| doTruncate(trunc), | ||
| doTruncate10bits(trunc10bits) {} | ||
|
|
@@ -41,9 +50,12 @@ class SiStripFedZeroSuppression { | |
| }; | ||
|
|
||
| private: | ||
| edm::ESHandle<SiStripNoises> noiseHandle; | ||
| edm::ESHandle<SiStripThreshold> thresholdHandle; | ||
| uint32_t noise_cache_id, threshold_cache_id; | ||
| edm::ESGetToken<SiStripNoises, SiStripNoisesRcd> noiseToken_; | ||
| edm::ESGetToken<SiStripThreshold, SiStripThresholdRcd> thresholdToken_; | ||
| const SiStripNoises* noiseHandle_; | ||
|
||
| const SiStripThreshold* thresholdHandle_; | ||
| edm::ESWatcher<SiStripNoisesRcd> noiseWatcher_; | ||
| edm::ESWatcher<SiStripThresholdRcd> thresholdWatcher_; | ||
|
|
||
| uint16_t theFEDalgorithm; | ||
| bool isAValidDigi(); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This not being a "handle" any more, it could be probably better renamed without "Handle" in it