#include <PhysDecl.h>
Public Member Functions | |
PhysDecl (const edm::ParameterSet &) | |
~PhysDecl () | |
Private Member Functions | |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
bool | applyfilter |
bool | debugOn |
std::vector< std::string > | hlNames_ |
edm::InputTag | hlTriggerResults_ |
bool | init_ |
Definition at line 33 of file PhysDecl.h.
PhysDecl::PhysDecl | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 33 of file PhysDecl.cc.
References align_tpl::applyfilter, ExpressReco_HICollisions_FallBack::debugOn, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
{ applyfilter = iConfig.getUntrackedParameter<bool>("applyfilter",true); debugOn = iConfig.getUntrackedParameter<bool>("debugOn",false); hlTriggerResults_ = iConfig.getParameter<edm::InputTag> ("HLTriggerResults"); init_ = false; }
PhysDecl::~PhysDecl | ( | ) |
Definition at line 41 of file PhysDecl.cc.
{ }
bool PhysDecl::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 45 of file PhysDecl.cc.
References align_tpl::applyfilter, edm::EventBase::bunchCrossing(), gather_cfg::cout, ExpressReco_HICollisions_FallBack::debugOn, edm::EventID::event(), edm::Event::getByLabel(), L1GlobalTriggerReadoutRecord::gtFdlWord(), i, edm::EventBase::id(), edm::HandleBase::isValid(), edm::EventBase::luminosityBlock(), n, L1GtFdlWord::physicsDeclared(), edm::Handle< T >::product(), edm::EventID::run(), edm::Event::triggerNames(), and edm::TriggerNames::triggerNames().
{ bool accepted = false; int ievt = iEvent.id().event(); int irun = iEvent.id().run(); int ils = iEvent.luminosityBlock(); int bx = iEvent.bunchCrossing(); //hlt info edm::Handle<TriggerResults> HLTR; iEvent.getByLabel(hlTriggerResults_,HLTR); if(HLTR.isValid()) { if (!init_) { init_=true; const edm::TriggerNames & triggerNames = iEvent.triggerNames(*HLTR); hlNames_=triggerNames.triggerNames(); } if(debugOn) { std::cout << "HLT_debug: Run " << irun << " Ev " << ievt << " LB " << ils << " BX " << bx << " Acc: " ; const unsigned int n(hlNames_.size()); for (unsigned int i=0; i!=n; ++i) { if (HLTR->accept(i)) { std::cout << hlNames_[i] << ","; } } std::cout << std::endl; } } // trigger info edm::Handle<L1GlobalTriggerReadoutRecord> gtrr_handle; iEvent.getByLabel("gtDigis", gtrr_handle); L1GlobalTriggerReadoutRecord const* gtrr = gtrr_handle.product(); L1GtFdlWord fdlWord = gtrr->gtFdlWord(); // std::cout << "phys decl. bit=" << fdlWord.physicsDeclared() << std::endl; if (fdlWord.physicsDeclared() ==1) accepted=true; if (debugOn) { std::cout << "PhysDecl_debug: Run " << irun << " Event " << ievt << " Lumi Block " << ils << " Bunch Crossing " << bx << " Accepted " << accepted << std::endl; } if (applyfilter) return accepted; else return true; }
bool PhysDecl::applyfilter [private] |
Definition at line 41 of file PhysDecl.h.
bool PhysDecl::debugOn [private] |
Definition at line 42 of file PhysDecl.h.
std::vector<std::string> PhysDecl::hlNames_ [private] |
Definition at line 44 of file PhysDecl.h.
edm::InputTag PhysDecl::hlTriggerResults_ [private] |
Definition at line 45 of file PhysDecl.h.
bool PhysDecl::init_ [private] |
Definition at line 43 of file PhysDecl.h.