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::stream::EDAnalyzer<> edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryAnalyzerRAW (const edm::ParameterSet &)
 
virtual ~TriggerSummaryAnalyzerRAW ()
 
- Public Member Functions inherited from edm::stream::EDAnalyzer<>
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 17 of file TriggerSummaryAnalyzerRAW.cc.

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

Definition at line 22 of file TriggerSummaryAnalyzerRAW.cc.

23 {
24 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 38 of file TriggerSummaryAnalyzerRAW.cc.

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

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

Definition at line 30 of file TriggerSummaryAnalyzerRAW.cc.

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

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

Member Data Documentation

const edm::InputTag TriggerSummaryAnalyzerRAW::inputTag_
private

InputTag of TriggerEventWithRefs to analyze.

Definition at line 35 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().

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

Definition at line 36 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().