#include <HLTrigger/HLTexample/interface/HLTAnalFilt.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
HLTAnalFilt (const edm::ParameterSet &) | |
~HLTAnalFilt () | |
Private Attributes | |
edm::InputTag | inputTag_ |
See header file for documentation.
Definition at line 25 of file HLTAnalFilt.h.
HLTAnalFilt::HLTAnalFilt | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 28 of file HLTAnalFilt.cc.
References edm::InputTag::encode(), inputTag_, and LogDebug.
00028 : 00029 inputTag_(iConfig.getParameter<edm::InputTag>("inputTag")) 00030 { 00031 LogDebug("") << "Input: " << inputTag_.encode(); 00032 }
HLTAnalFilt::~HLTAnalFilt | ( | ) |
void HLTAnalFilt::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 44 of file HLTAnalFilt.cc.
References edm::InputTag::encode(), edm::Event::getByLabel(), edm::Event::getManyByType(), i, inputTag_, LogDebug, LogTrace, n, HcalSimpleRecAlgoImpl::reco(), and std.
00045 { 00046 using namespace std; 00047 using namespace edm; 00048 using namespace reco; 00049 using namespace trigger; 00050 00051 // get hold of (single?) TriggerResults object 00052 vector<Handle<TriggerResults> > trhv; 00053 iEvent.getManyByType(trhv); 00054 const unsigned int n(trhv.size()); 00055 LogDebug("") << "Number of TriggerResults objects found: " << n; 00056 for (unsigned int i=0; i!=n; i++) { 00057 LogDebug("") << "TriggerResult object " << i << " bits: " << *(trhv[i]); 00058 } 00059 00060 // get hold of requested filter object 00061 Handle<TriggerFilterObjectWithRefs> ref; 00062 iEvent.getByLabel(inputTag_,ref); 00063 if (ref.isValid()) { 00064 LogDebug("") << inputTag_.encode() + " Size = g/e/m/j/C/M/H " 00065 << ref->photonIds().size() << " " 00066 << ref->electronIds().size() << " " 00067 << ref->muonIds().size() << " " 00068 << ref->jetIds().size() << " " 00069 << ref->compositeIds().size() << " " 00070 << ref->basemetIds().size() << " " 00071 << ref->calometIds().size(); 00072 const unsigned int n(ref->electronIds().size()); 00073 for (unsigned int i=0; i!=n; i++) { 00074 // some Xchecks 00075 Particle particle=*(ref->electronRefs().at(i)); 00076 LogTrace("") << i << " E: " 00077 << particle.energy() << " " 00078 << ref->electronRefs().at(i)->energy(); 00079 } 00080 // 00081 } else { 00082 LogDebug("") << "New Filterobject " + inputTag_.encode() + " not found!"; 00083 } 00084 00085 return; 00086 }
edm::InputTag HLTAnalFilt::inputTag_ [private] |