CMS 3D CMS Logo

TriggerSummaryAnalyzerAOD Class Reference

This class is an EDAnalyzer analyzing the HLT summary object for AOD. More...

#include <HLTrigger/HLTcore/interface/TriggerSummaryAnalyzerAOD.h>

Inheritance diagram for TriggerSummaryAnalyzerAOD:

edm::EDAnalyzer

List of all members.

Public Member Functions

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

Private Attributes

edm::InputTag inputTag_
 InputTag of TriggerEvent to analyze.


Detailed Description

This class is an EDAnalyzer analyzing the HLT summary object for AOD.

See header file for documentation.

Date
2008/04/11 18:09:11
Revision
1.2

Author:
Martin Grunewald
Date
2008/05/19 13:16:47
Revision
1.6

Author:
Martin Grunewald

Definition at line 23 of file TriggerSummaryAnalyzerAOD.h.


Constructor & Destructor Documentation

TriggerSummaryAnalyzerAOD::TriggerSummaryAnalyzerAOD ( const edm::ParameterSet ps  )  [explicit]

Definition at line 18 of file TriggerSummaryAnalyzerAOD.cc.

00018                                                                               : 
00019   inputTag_(ps.getParameter<edm::InputTag>("inputTag"))
00020 { }

TriggerSummaryAnalyzerAOD::~TriggerSummaryAnalyzerAOD (  ) 

Definition at line 22 of file TriggerSummaryAnalyzerAOD.cc.

00023 {
00024 }


Member Function Documentation

void TriggerSummaryAnalyzerAOD::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 32 of file TriggerSummaryAnalyzerAOD.cc.

References GenMuonPlsPt100GeV_cfg::cout, edm::InputTag::encode(), lat::endl(), edm::Event::getByLabel(), i, inputTag_, max, n, HcalSimpleRecAlgoImpl::reco(), and std.

00033 {
00034    using namespace std;
00035    using namespace edm;
00036    using namespace reco;
00037    using namespace trigger;
00038 
00039 
00040    cout << endl;
00041    cout << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;
00042 
00043    Handle<TriggerEvent> handle;
00044    iEvent.getByLabel(inputTag_,handle);
00045    if (handle.isValid()) {
00046      cout << "Used Processname: " << handle->usedProcessName() << endl;
00047      const size_type nC(handle->sizeCollections());
00048      cout << "Number of packed Collections: " << nC << endl;
00049      cout << "The Collections: #, tag, 1-past-end index" << endl;
00050      for (size_type iC=0; iC!=nC; ++iC) {
00051        cout << iC << " "
00052             << handle->collectionTag(iC).encode() << " "
00053             << handle->collectionKey(iC) << endl;
00054      }
00055      const size_type nO(handle->sizeObjects());
00056      cout << "Number of TriggerObjects: " << nO << endl;
00057      cout << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
00058      const TriggerObjectCollection& TOC(handle->getObjects());
00059      for (size_type iO=0; iO!=nO; ++iO) {
00060        const TriggerObject& TO(TOC[iO]);
00061        cout << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
00062      }
00063      const size_type nF(handle->sizeFilters());
00064      cout << "Number of TriggerFilters: " << nF << endl;
00065      cout << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
00066      for (size_type iF=0; iF!=nF; ++iF) {
00067        const Vids& VIDS (handle->filterIds(iF));
00068        const Keys& KEYS(handle->filterKeys(iF));
00069        const size_type nI(VIDS.size());
00070        const size_type nK(KEYS.size());
00071        cout << iF << " " << handle->filterTag(iF).encode()
00072             << " " << nI << "/" << nK
00073             << " the pairs: ";
00074        const size_type n(max(nI,nK));
00075        for (size_type i=0; i!=n; ++i) {
00076          cout << " " << VIDS[i] << "/" << KEYS[i];
00077        }
00078        cout << endl;
00079        assert (nI==nK);
00080      }
00081    } else {
00082      cout << "Handle invalid! Check InputTag provided." << endl;
00083    }
00084    cout << endl;
00085    
00086    return;
00087 }


Member Data Documentation

edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_ [private]

InputTag of TriggerEvent to analyze.

Definition at line 32 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().


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