CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TriggerSummaryAnalyzerAOD Class Reference

#include <TriggerSummaryAnalyzerAOD.h>

Inheritance diagram for TriggerSummaryAnalyzerAOD:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
 ~TriggerSummaryAnalyzerAOD ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

edm::InputTag inputTag_
 InputTag of TriggerEvent to analyze. More...
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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.

18  :
19  inputTag_(ps.getParameter<edm::InputTag>("inputTag"))
20 { }
T getParameter(std::string const &) const
edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.
TriggerSummaryAnalyzerAOD::~TriggerSummaryAnalyzerAOD ( )

Definition at line 22 of file TriggerSummaryAnalyzerAOD.cc.

23 {
24 }

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.

33 {
34  using namespace std;
35  using namespace edm;
36  using namespace reco;
37  using namespace trigger;
38 
39 
40  cout << endl;
41  cout << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;
42 
44  iEvent.getByLabel(inputTag_,handle);
45  if (handle.isValid()) {
46  cout << "Used Processname: " << handle->usedProcessName() << endl;
47  const size_type nC(handle->sizeCollections());
48  cout << "Number of packed Collections: " << nC << endl;
49  cout << "The Collections: #, tag, 1-past-end index" << endl;
50  for (size_type iC=0; iC!=nC; ++iC) {
51  cout << iC << " "
52  << handle->collectionTag(iC).encode() << " "
53  << handle->collectionKey(iC) << endl;
54  }
55  const size_type nO(handle->sizeObjects());
56  cout << "Number of TriggerObjects: " << nO << endl;
57  cout << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
58  const TriggerObjectCollection& TOC(handle->getObjects());
59  for (size_type iO=0; iO!=nO; ++iO) {
60  const TriggerObject& TO(TOC[iO]);
61  cout << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
62  }
63  const size_type nF(handle->sizeFilters());
64  cout << "Number of TriggerFilters: " << nF << endl;
65  cout << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
66  for (size_type iF=0; iF!=nF; ++iF) {
67  const Vids& VIDS (handle->filterIds(iF));
68  const Keys& KEYS(handle->filterKeys(iF));
69  const size_type nI(VIDS.size());
70  const size_type nK(KEYS.size());
71  cout << iF << " " << handle->filterTag(iF).encode()
72  << " " << nI << "/" << nK
73  << " the pairs: ";
74  const size_type n(max(nI,nK));
75  for (size_type i=0; i!=n; ++i) {
76  cout << " " << VIDS[i] << "/" << KEYS[i];
77  }
78  cout << endl;
79  assert (nI==nK);
80  }
81  } else {
82  cout << "Handle invalid! Check InputTag provided." << endl;
83  }
84  cout << endl;
85 
86  return;
87 }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:72
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
const T & max(const T &a, const T &b)
tuple handle
Definition: patZpeak.py:22
edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
tuple cout
Definition: gather_cfg.py:121
std::vector< int > Vids

Member Data Documentation

edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 32 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().