105 <<
"@SUB=APVModeFilter::APVModeFilter" 106 <<
"Selecting events with APV mode '" 126 auto product = siStripLatency.
product();
132 if (mode ==
"deco") {
134 }
else if (mode ==
"peak") {
136 }
else if (mode ==
"multi") {
140 <<
"Your choice for the APV mode ('" << mode
141 <<
"') is invalid.\nValid APV modes: deco, peak, multi" << std::endl;
149 for (
const auto& bit:
bits_) result.set(bit, input[bit]);
157 desc.
setComment(
"Filters events with the APV mode 'apvMode' (deco/peak/multi).");
159 descriptions.
add(
"apvModeFilter", desc);
static BitMask multi_
peak mode bit mask (1010)
T getUntrackedParameter(std::string const &, T const &) const
static std::array< size_t, 2 > bits_
bits of interest for the APV mode
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool filter(edm::Event &, const edm::EventSetup &) override
~APVModeFilter() override=default
void beginRun(const edm::Run &, const edm::EventSetup &) override
const BitMask mode_
multi mode bit mask (1000)
static std::string const input
APVModeFilter(const edm::ParameterSet &)
void setComment(std::string const &value)
static BitMask peak_
deco mode bit mask (0000)
#define DEFINE_FWK_MODULE(type)
BitMask convertMode(const std::string &mode) const
APV mode is encoded in uin16_t.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &)
BitMask modeCurrentRun_
APV mode that is filtered.
T const * product() const
std::bitset< 16 > BitMask