CMS 3D CMS Logo

HLTAnalFilt Class Reference

This class is an EDAnalyzer implementing a very basic HLT filter product analysis. More...

#include <HLTrigger/HLTexample/interface/HLTAnalFilt.h>

Inheritance diagram for HLTAnalFilt:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 HLTAnalFilt (const edm::ParameterSet &)
 ~HLTAnalFilt ()

Private Attributes

edm::InputTag inputTag_


Detailed Description

This class is an EDAnalyzer implementing a very basic HLT filter product analysis.

See header file for documentation.

Date
2006/10/04 16:02:42
Revision
1.13

Author:
Martin Grunewald
Date
2008/10/11 13:13:58
Revision
1.27

Author:
Martin Grunewald

Definition at line 25 of file HLTAnalFilt.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 34 of file HLTAnalFilt.cc.

00035 {
00036 }


Member Function Documentation

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 }


Member Data Documentation

edm::InputTag HLTAnalFilt::inputTag_ [private]

Definition at line 34 of file HLTAnalFilt.h.

Referenced by analyze(), and HLTAnalFilt().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:20 2009 for CMSSW by  doxygen 1.5.4