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
Filter invalid hcal upgrade data #19100
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -3,6 +3,7 @@ | |||
|
||||
#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" | ||||
#include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h" | ||||
#include "CalibFormats/HcalObjects/interface/HcalDbService.h" | ||||
|
||||
/** \class HcalDataFrameFilter | ||||
|
||||
|
@@ -28,14 +29,21 @@ class HcalDataFrameFilter { | |||
HcalCalibDigiCollection filter(const HcalCalibDigiCollection& incol, HcalUnpackerReport& r); | ||||
/// filter ZDC data frames | ||||
ZDCDigiCollection filter(const ZDCDigiCollection& incol, HcalUnpackerReport& r); | ||||
/// filter QIE10 data frames | ||||
QIE10DigiCollection filter(const QIE10DigiCollection& incol, HcalUnpackerReport& r); | ||||
/// filter QIE11 data frames | ||||
QIE11DigiCollection filter(const QIE11DigiCollection& incol, HcalUnpackerReport& r); | ||||
/// whether any filters are on | ||||
bool active() const; | ||||
/// get conditions | ||||
void setConditions(const HcalDbService* conditions); | ||||
private: | ||||
bool requireCapid_; | ||||
bool requireDVER_; | ||||
bool energyFilter_; | ||||
int firstSample_, lastSample_; | ||||
double minimumAmplitude_; | ||||
const HcalDbService* conditions_; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since I was looking I'll comment early - I find this dependency very odd.... would naively belong as a es product.. (maybe) - thats how it seems to be used elsewhere.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what change you're suggesting here. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok - maybe all is fine and there is just a strange design behind - i'll let reco confirm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the HcalRawToDigi class uses the HcalDataFrameFilter: https://github.com/cms-sw/cmssw/search?utf8=%E2%9C%93&q=HcalDataFrameFilter&type= and HcalRawToDigi initializes the energy filter to false:
so I think that the energy filter code is unreachable in any case -- also a strange design. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think it's best to have it set up correctly in case it's ever activated, but good to know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pointer caching to payloads is very dangerous. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In This pattern has been used frequently in other areas of CMSSW. |
||||
}; | ||||
|
||||
|
||||
|
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.
can this be passed in the constructor?
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 is needed on an event-by-event basis.