CMS 3D CMS Logo

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

#include <TriggerSummaryAnalyzerRAW.h>

Inheritance diagram for TriggerSummaryAnalyzerRAW:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 TriggerSummaryAnalyzerRAW (const edm::ParameterSet &)
 
 ~TriggerSummaryAnalyzerRAW ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

edm::InputTag inputTag_
 InputTag of TriggerEventWithRefs to analyze. More...
 
edm::EDGetTokenT
< trigger::TriggerEventWithRefs
inputToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

This class is an EDAnalyzer analyzing the HLT summary object for RAW

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 25 of file TriggerSummaryAnalyzerRAW.h.

Constructor & Destructor Documentation

TriggerSummaryAnalyzerRAW::TriggerSummaryAnalyzerRAW ( const edm::ParameterSet ps)
explicit

Definition at line 16 of file TriggerSummaryAnalyzerRAW.cc.

16  :
17  inputTag_(ps.getParameter<edm::InputTag>("inputTag")),
18  inputToken_(consumes<trigger::TriggerEventWithRefs>(inputTag_))
19 { }
T getParameter(std::string const &) const
edm::EDGetTokenT< trigger::TriggerEventWithRefs > inputToken_
edm::InputTag inputTag_
InputTag of TriggerEventWithRefs to analyze.
TriggerSummaryAnalyzerRAW::~TriggerSummaryAnalyzerRAW ( )

Definition at line 21 of file TriggerSummaryAnalyzerRAW.cc.

22 {
23 }

Member Function Documentation

void TriggerSummaryAnalyzerRAW::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 37 of file TriggerSummaryAnalyzerRAW.cc.

References gather_cfg::cout, edm::InputTag::encode(), edm::Event::getByToken(), patZpeak::handle, inputTag_, inputToken_, and dt_dqm_sourceclient_common_cff::reco.

38 {
39  using namespace std;
40  using namespace edm;
41  using namespace reco;
42  using namespace l1extra;
43  using namespace trigger;
44 
45  cout << endl;
46  cout << "TriggerSummaryAnalyzerRAW: content of TriggerEventWithRefs: " << inputTag_.encode();
47 
50  if (handle.isValid()) {
51  cout << "Used Processname: " << handle->usedProcessName() << endl;
52  const size_type nFO(handle->size());
53  cout << "Number of TriggerFilterObjects: " << nFO << endl;
54  cout << "The TriggerFilterObjects: #, tag" << endl;
55  for (size_type iFO=0; iFO!=nFO; ++iFO) {
56  cout << iFO << " " << handle->filterTag(iFO).encode() << endl;
57  cout << " # of objects:";
58 
59  const unsigned int nPhotons(handle->photonSlice(iFO).second-
60  handle->photonSlice(iFO).first);
61  if (nPhotons>0) cout << " Photons: " << nPhotons;
62 
63  const unsigned int nElectrons(handle->electronSlice(iFO).second-
64  handle->electronSlice(iFO).first);
65  if (nElectrons>0) cout << " Electrons: " << nElectrons;
66 
67  const unsigned int nMuons(handle->muonSlice(iFO).second-
68  handle->muonSlice(iFO).first);
69  if (nMuons>0) cout << " Muons: " << nMuons;
70 
71  const unsigned int nJets(handle->jetSlice(iFO).second-
72  handle->jetSlice(iFO).first);
73  if (nJets>0) cout << " Jets: " << nJets;
74 
75  const unsigned int nComposites(handle->compositeSlice(iFO).second-
76  handle->compositeSlice(iFO).first);
77  if (nComposites>0) cout << " Composites: " << nComposites;
78 
79  const unsigned int nBaseMETs(handle->basemetSlice(iFO).second-
80  handle->basemetSlice(iFO).first);
81  if (nBaseMETs>0) cout << " BaseMETs: " << nBaseMETs;
82 
83  const unsigned int nCaloMETs(handle->calometSlice(iFO).second-
84  handle->calometSlice(iFO).first);
85  if (nCaloMETs>0) cout << " CaloMETs: " << nCaloMETs;
86 
87  const unsigned int nPixTracks(handle->pixtrackSlice(iFO).second-
88  handle->pixtrackSlice(iFO).first);
89  if (nPixTracks>0) cout << " PixTracks: " << nPixTracks;
90 
91  const unsigned int nL1EM(handle->l1emSlice(iFO).second-
92  handle->l1emSlice(iFO).first);
93  if (nL1EM>0) cout << " L1EM: " << nL1EM;
94 
95  const unsigned int nL1Muon(handle->l1muonSlice(iFO).second-
96  handle->l1muonSlice(iFO).first);
97  if (nL1Muon>0) cout << " L1Muon: " << nL1Muon;
98 
99  const unsigned int nL1Jet(handle->l1jetSlice(iFO).second-
100  handle->l1jetSlice(iFO).first);
101  if (nL1Jet>0) cout << " L1Jet: " << nL1Jet;
102 
103  const unsigned int nL1EtMiss(handle->l1etmissSlice(iFO).second-
104  handle->l1etmissSlice(iFO).first);
105  if (nL1EtMiss>0) cout << " L1EtMiss: " << nL1EtMiss;
106 
107  const unsigned int nL1HfRings(handle->l1hfringsSlice(iFO).second-
108  handle->l1hfringsSlice(iFO).first);
109  if (nL1HfRings>0) cout << " L1HfRings: " << nL1HfRings;
110 
111  const unsigned int nPFJets(handle->pfjetSlice(iFO).second-
112  handle->pfjetSlice(iFO).first);
113  if (nPFJets>0) cout << " PFJets: " << nPFJets;
114 
115  const unsigned int nPFTaus(handle->pftauSlice(iFO).second-
116  handle->pftauSlice(iFO).first);
117  if (nPFTaus>0) cout << " PFTaus: " << nPFTaus;
118 
119  cout << endl;
120  }
121  cout << "Elements in linearised collections of Refs: " << endl;
122  cout << " Photons: " << handle->photonSize() << endl;
123  cout << " Electrons: " << handle->electronSize() << endl;
124  cout << " Muons: " << handle->muonSize() << endl;
125  cout << " Jets: " << handle->jetSize() << endl;
126  cout << " Composites: " << handle->compositeSize() << endl;
127  cout << " BaseMETs: " << handle->basemetSize() << endl;
128  cout << " CaloMETs: " << handle->calometSize() << endl;
129  cout << " Pixtracks: " << handle->pixtrackSize() << endl;
130  cout << " L1EM: " << handle->l1emSize() << endl;
131  cout << " L1Muon: " << handle->l1muonSize() << endl;
132  cout << " L1Jet: " << handle->l1jetSize() << endl;
133  cout << " L1EtMiss: " << handle->l1etmissSize() << endl;
134  cout << " L1HfRings: " << handle->l1hfringsSize() << endl;
135  cout << " PFJets: " << handle->pfjetSize() << endl;
136  cout << " PFTaus: " << handle->pftauSize() << endl;
137  } else {
138  cout << "Handle invalid! Check InputTag provided." << endl;
139  }
140  cout << endl;
141 
142  return;
143 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:164
tuple handle
Definition: patZpeak.py:22
edm::EDGetTokenT< trigger::TriggerEventWithRefs > inputToken_
edm::InputTag inputTag_
InputTag of TriggerEventWithRefs to analyze.
tuple cout
Definition: gather_cfg.py:121
void TriggerSummaryAnalyzerRAW::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 29 of file TriggerSummaryAnalyzerRAW.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

29  {
31  desc.add<edm::InputTag>("inputTag",edm::InputTag("hltTriggerSummaryRAW"));
32  descriptions.add("triggerSummaryAnalyzerRAW", desc);
33 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

edm::InputTag TriggerSummaryAnalyzerRAW::inputTag_
private

InputTag of TriggerEventWithRefs to analyze.

Definition at line 35 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().

edm::EDGetTokenT<trigger::TriggerEventWithRefs> TriggerSummaryAnalyzerRAW::inputToken_
private

Definition at line 36 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().