CMS 3D CMS Logo

Public Member Functions | Private Attributes

TriggerSummaryAnalyzerAOD Class Reference

#include <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

Date:
2008/04/11 18:09:11
Revision:
1.2
Author:
Martin Grunewald

See header file for documentation

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.

                                                                              : 
  inputTag_(ps.getParameter<edm::InputTag>("inputTag"))
{ }
TriggerSummaryAnalyzerAOD::~TriggerSummaryAnalyzerAOD ( )

Definition at line 22 of file TriggerSummaryAnalyzerAOD.cc.

{
}

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 gather_cfg::cout, edm::InputTag::encode(), trigger::TriggerObject::eta(), edm::Event::getByLabel(), patZpeak::handle, i, trigger::TriggerObject::id(), inputTag_, trigger::TriggerObject::mass(), max(), n, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), and dt_dqm_sourceclient_common_cff::reco.

{
   using namespace std;
   using namespace edm;
   using namespace reco;
   using namespace trigger;


   cout << endl;
   cout << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;

   Handle<TriggerEvent> handle;
   iEvent.getByLabel(inputTag_,handle);
   if (handle.isValid()) {
     cout << "Used Processname: " << handle->usedProcessName() << endl;
     const size_type nC(handle->sizeCollections());
     cout << "Number of packed Collections: " << nC << endl;
     cout << "The Collections: #, tag, 1-past-end index" << endl;
     for (size_type iC=0; iC!=nC; ++iC) {
       cout << iC << " "
            << handle->collectionTag(iC).encode() << " "
            << handle->collectionKey(iC) << endl;
     }
     const size_type nO(handle->sizeObjects());
     cout << "Number of TriggerObjects: " << nO << endl;
     cout << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
     const TriggerObjectCollection& TOC(handle->getObjects());
     for (size_type iO=0; iO!=nO; ++iO) {
       const TriggerObject& TO(TOC[iO]);
       cout << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
     }
     const size_type nF(handle->sizeFilters());
     cout << "Number of TriggerFilters: " << nF << endl;
     cout << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
     for (size_type iF=0; iF!=nF; ++iF) {
       const Vids& VIDS (handle->filterIds(iF));
       const Keys& KEYS(handle->filterKeys(iF));
       const size_type nI(VIDS.size());
       const size_type nK(KEYS.size());
       cout << iF << " " << handle->filterTag(iF).encode()
            << " " << nI << "/" << nK
            << " the pairs: ";
       const size_type n(max(nI,nK));
       for (size_type i=0; i!=n; ++i) {
         cout << " " << VIDS[i] << "/" << KEYS[i];
       }
       cout << endl;
       assert (nI==nK);
     }
   } else {
     cout << "Handle invalid! Check InputTag provided." << endl;
   }
   cout << endl;
   
   return;
}

Member Data Documentation

InputTag of TriggerEvent to analyze.

Definition at line 32 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().