#include <HLTInspect.h>
Public Member Functions | |
HLTInspect (const edm::ParameterSet &) | |
~HLTInspect () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &e, const edm::EventSetup &c) override |
Private Attributes | |
std::vector< std::string > | hlNames_ |
edm::InputTag | hlTriggerResults_ |
bool | init_ |
Definition at line 33 of file HLTInspect.h.
HLTInspect::HLTInspect | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 33 of file HLTInspect.cc.
References edm::ParameterSet::getParameter().
{ hlTriggerResults_ = iConfig.getParameter<edm::InputTag> ("HLTriggerResults"); init_ = false; }
HLTInspect::~HLTInspect | ( | ) |
Definition at line 39 of file HLTInspect.cc.
{ }
void HLTInspect::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [override, private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 42 of file HLTInspect.cc.
References edm::EventBase::bunchCrossing(), gather_cfg::cout, edm::EventID::event(), edm::EventBase::experimentType(), edm::Event::getByLabel(), i, edm::EventBase::id(), edm::EventBase::isRealData(), edm::HandleBase::isValid(), edm::EventBase::luminosityBlock(), n, edm::EventID::run(), edm::Event::triggerNames(), and edm::TriggerNames::triggerNames().
{ int ievt = iEvent.id().event(); int irun = iEvent.id().run(); int ils = iEvent.luminosityBlock(); int bx = iEvent.bunchCrossing(); // // trigger type // int trigger_type=-1; if (iEvent.isRealData()) trigger_type = iEvent.experimentType(); //hlt info edm::Handle<TriggerResults> HLTR; iEvent.getByLabel(hlTriggerResults_,HLTR); if(HLTR.isValid() == false) { std::cout<< " HLTInspect Error - Could not access Results with name "<<hlTriggerResults_<<std::endl; } if(HLTR.isValid()) { if (!init_) { init_=true; const edm::TriggerNames & triggerNames = iEvent.triggerNames(*HLTR); hlNames_=triggerNames.triggerNames(); } std::cout << "HLTInspect: Run " << irun << " Ev " << ievt << " LB " << ils << " BX " << bx << " Type "<<trigger_type<< " 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; } }
std::vector<std::string> HLTInspect::hlNames_ [private] |
Definition at line 40 of file HLTInspect.h.
edm::InputTag HLTInspect::hlTriggerResults_ [private] |
Definition at line 41 of file HLTInspect.h.
bool HLTInspect::init_ [private] |
Definition at line 42 of file HLTInspect.h.