Public Member Functions | |
HLTPhysicsDeclared (const edm::ParameterSet &) | |
~HLTPhysicsDeclared () | |
Private Member Functions | |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::InputTag | m_gtDigis |
bool | m_invert |
Definition at line 19 of file HLTPhysicsDeclared.cc.
HLTPhysicsDeclared::HLTPhysicsDeclared | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 42 of file HLTPhysicsDeclared.cc.
: m_invert( config.getParameter<bool>("invert") ), m_gtDigis( config.getParameter<edm::InputTag>("L1GtReadoutRecordTag") ) { }
HLTPhysicsDeclared::~HLTPhysicsDeclared | ( | ) |
Definition at line 48 of file HLTPhysicsDeclared.cc.
{ }
bool HLTPhysicsDeclared::filter | ( | edm::Event & | event, |
const edm::EventSetup & | setup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 52 of file HLTPhysicsDeclared.cc.
References accept(), edm::Event::getByLabel(), edm::EventBase::isRealData(), m_gtDigis, m_invert, L1GtFdlWord::physicsDeclared(), and edm::HandleBase::whyFailed().
{ bool accept = false; if (event.isRealData()) { // for real data, access the "physics enabled" bit in the L1 GT data edm::Handle<L1GlobalTriggerReadoutRecord> h_gtDigis; if (not event.getByLabel(m_gtDigis, h_gtDigis)) { edm::LogWarning(h_gtDigis.whyFailed()->category()) << h_gtDigis.whyFailed()->what(); // not enough informations to make a decision - reject the event return false; } else { L1GtFdlWord fdlWord = h_gtDigis->gtFdlWord(); if (fdlWord.physicsDeclared() == 1) accept = true; } } else { // for MC, assume the "physics enabled" bit to be always set accept = true; } // if requested, invert the filter decision if (m_invert) accept = not accept; return accept; }
edm::InputTag HLTPhysicsDeclared::m_gtDigis [private] |
Definition at line 28 of file HLTPhysicsDeclared.cc.
Referenced by filter().
bool HLTPhysicsDeclared::m_invert [private] |
Definition at line 27 of file HLTPhysicsDeclared.cc.
Referenced by filter().