20 #include <boost/cstdint.hpp> 40 m_condInEdmInputTag(parSet.getParameter<
edm::InputTag>(
41 "CondInEdmInputTag")),
42 m_l1GtEvmReadoutRecordTag(parSet.getParameter<
edm::InputTag>(
43 "L1GtEvmReadoutRecordTag")),
44 m_allowedBeamMode(parSet.getParameter<
std::vector<unsigned
int> >(
46 m_invertResult(parSet.getParameter<
bool>(
49 m_condInRunBlockValid(
false) {
53 LogDebug(
"L1GtBeamModeFilter") << std::endl;
56 <<
"\nInput tag for ConditionsInEdm product: " 58 <<
"\nInput tag for L1 GT EVM record: " 60 <<
"\nAllowed beam modes:" 63 for (std::vector<unsigned int>::const_iterator itMode =
66 LogTrace(
"L1GtBeamModeFilter") <<
" " << (*itMode) << std::endl;
71 <<
"\nInvert result (use as NOT filter): " 75 LogTrace(
"L1GtBeamModeFilter") << std::endl;
91 bool filterResult =
false;
112 boost::uint16_t beamModeValue = 0;
122 if (!condInRunBlock.
isValid()) {
124 LogDebug(
"L1GtBeamModeFilter") <<
"\nConditionsInRunBlock with \n " 126 <<
"\nrequested in configuration, but not found in the event." 127 <<
"\n" << std::endl;
134 beamModeValue = condInRunBlock->
beamMode;
146 if (!gtEvmReadoutRecord.
isValid()) {
148 <<
"\nL1GlobalTriggerEvmReadoutRecord with input tag " 150 <<
"\nrequested in configuration, but not found in the event." 158 beamModeValue = (gtEvmReadoutRecord->
gtfeWord()).beamMode();
164 LogDebug(
"L1GtBeamModeFilter") <<
"\nBeam mode: " << beamModeValue
167 for (std::vector<unsigned int>::const_iterator itMode =
170 if (beamModeValue == (*itMode)) {
184 filterResult = !filterResult;
std::vector< unsigned int > m_allowedBeamMode
vector of beam modes (coded as integer numbers)
bool filter(edm::Event &, const edm::EventSetup &) override
filter the event
bool getByLabel(std::string const &label, Handle< PROD > &result) const
~L1GtBeamModeFilter() override
destructor
L1GtBeamModeFilter(const edm::ParameterSet &)
constructor
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
edm::InputTag m_l1GtEvmReadoutRecordTag
InputTag for the L1 Global Trigger EVM readout record.
Run const & getRun() const
bool m_condInRunBlockValid
valid ConditionsInRunBlock product
bool m_isDebugEnabled
cache edm::isDebugEnabled()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool m_invertResult
return the inverted result
edm::InputTag m_condInEdmInputTag
input tag for ConditionInEdm products