CMS 3D CMS Logo

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

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryAnalyzerRAW (const edm::ParameterSet &)
 
 ~TriggerSummaryAnalyzerRAW () override
 
- 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
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::TriggerEventWithRefsinputToken_
 

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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.

References ~TriggerSummaryAnalyzerRAW().

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

Member Function Documentation

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

Definition at line 34 of file TriggerSummaryAnalyzerRAW.cc.

References trigger::TriggerRefsCollections::basemetSize(), trigger::TriggerEventWithRefs::basemetSlice(), trigger::TriggerRefsCollections::calometSize(), trigger::TriggerEventWithRefs::calometSlice(), trigger::TriggerRefsCollections::compositeSize(), trigger::TriggerEventWithRefs::compositeSlice(), trigger::TriggerRefsCollections::electronSize(), trigger::TriggerEventWithRefs::electronSlice(), edm::InputTag::encode(), trigger::TriggerEventWithRefs::filterTag(), edm::Event::getByToken(), patZpeak::handle, inputTag_, inputToken_, edm::HandleBase::isValid(), trigger::TriggerRefsCollections::jetSize(), trigger::TriggerEventWithRefs::jetSlice(), trigger::TriggerRefsCollections::l1emSize(), trigger::TriggerEventWithRefs::l1emSlice(), trigger::TriggerRefsCollections::l1etmissSize(), trigger::TriggerEventWithRefs::l1etmissSlice(), trigger::TriggerRefsCollections::l1hfringsSize(), trigger::TriggerEventWithRefs::l1hfringsSlice(), trigger::TriggerRefsCollections::l1jetSize(), trigger::TriggerEventWithRefs::l1jetSlice(), trigger::TriggerRefsCollections::l1muonSize(), trigger::TriggerEventWithRefs::l1muonSlice(), trigger::TriggerRefsCollections::l1tegammaSize(), trigger::TriggerEventWithRefs::l1tegammaSlice(), trigger::TriggerRefsCollections::l1tetsumSize(), trigger::TriggerEventWithRefs::l1tetsumSlice(), trigger::TriggerRefsCollections::l1tjetSize(), trigger::TriggerEventWithRefs::l1tjetSlice(), trigger::TriggerRefsCollections::l1tmuonSize(), trigger::TriggerEventWithRefs::l1tmuonSlice(), trigger::TriggerRefsCollections::l1ttauSize(), trigger::TriggerEventWithRefs::l1ttauSlice(), trigger::TriggerRefsCollections::muonSize(), trigger::TriggerEventWithRefs::muonSlice(), jets_cff::nElectrons, jets_cff::nMuons, trigger::TriggerRefsCollections::pfjetSize(), trigger::TriggerEventWithRefs::pfjetSlice(), trigger::TriggerRefsCollections::pfmetSize(), trigger::TriggerEventWithRefs::pfmetSlice(), trigger::TriggerRefsCollections::pftauSize(), trigger::TriggerEventWithRefs::pftauSlice(), trigger::TriggerRefsCollections::photonSize(), trigger::TriggerEventWithRefs::photonSlice(), trigger::TriggerRefsCollections::pixtrackSize(), trigger::TriggerEventWithRefs::pixtrackSlice(), trigger::TriggerEventWithRefs::size(), and trigger::TriggerEventWithRefs::usedProcessName().

34  {
35  using namespace std;
36  using namespace edm;
37  using namespace reco;
38  using namespace l1extra;
39  using namespace trigger;
40  using namespace l1t;
41 
42  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
43  LogVerbatim("TriggerSummaryAnalyzerRAW")
44  << "TriggerSummaryAnalyzerRAW: content of TriggerEventWithRefs: " << inputTag_.encode();
45 
47  iEvent.getByToken(inputToken_, handle);
48  if (handle.isValid()) {
49  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Used Processname: " << handle->usedProcessName() << endl;
50  const size_type nFO(handle->size());
51  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Number of TriggerFilterObjects: " << nFO << endl;
52  LogVerbatim("TriggerSummaryAnalyzerRAW") << "The TriggerFilterObjects: #, tag" << endl;
53  for (size_type iFO = 0; iFO != nFO; ++iFO) {
54  LogVerbatim("TriggerSummaryAnalyzerRAW") << iFO << " " << handle->filterTag(iFO).encode() << endl;
55  LogVerbatim("TriggerSummaryAnalyzerRAW") << " # of objects:";
56 
57  const unsigned int nPhotons(handle->photonSlice(iFO).second - handle->photonSlice(iFO).first);
58  if (nPhotons > 0)
59  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Photons: " << nPhotons;
60 
61  const unsigned int nElectrons(handle->electronSlice(iFO).second - handle->electronSlice(iFO).first);
62  if (nElectrons > 0)
63  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Electrons: " << nElectrons;
64 
65  const unsigned int nMuons(handle->muonSlice(iFO).second - handle->muonSlice(iFO).first);
66  if (nMuons > 0)
67  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Muons: " << nMuons;
68 
69  const unsigned int nJets(handle->jetSlice(iFO).second - handle->jetSlice(iFO).first);
70  if (nJets > 0)
71  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Jets: " << nJets;
72 
73  const unsigned int nComposites(handle->compositeSlice(iFO).second - handle->compositeSlice(iFO).first);
74  if (nComposites > 0)
75  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Composites: " << nComposites;
76 
77  const unsigned int nBaseMETs(handle->basemetSlice(iFO).second - handle->basemetSlice(iFO).first);
78  if (nBaseMETs > 0)
79  LogVerbatim("TriggerSummaryAnalyzerRAW") << " BaseMETs: " << nBaseMETs;
80 
81  const unsigned int nCaloMETs(handle->calometSlice(iFO).second - handle->calometSlice(iFO).first);
82  if (nCaloMETs > 0)
83  LogVerbatim("TriggerSummaryAnalyzerRAW") << " CaloMETs: " << nCaloMETs;
84 
85  const unsigned int nPixTracks(handle->pixtrackSlice(iFO).second - handle->pixtrackSlice(iFO).first);
86  if (nPixTracks > 0)
87  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PixTracks: " << nPixTracks;
88 
89  const unsigned int nL1EM(handle->l1emSlice(iFO).second - handle->l1emSlice(iFO).first);
90  if (nL1EM > 0)
91  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EM: " << nL1EM;
92 
93  const unsigned int nL1Muon(handle->l1muonSlice(iFO).second - handle->l1muonSlice(iFO).first);
94  if (nL1Muon > 0)
95  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Muon: " << nL1Muon;
96 
97  const unsigned int nL1Jet(handle->l1jetSlice(iFO).second - handle->l1jetSlice(iFO).first);
98  if (nL1Jet > 0)
99  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Jet: " << nL1Jet;
100 
101  const unsigned int nL1EtMiss(handle->l1etmissSlice(iFO).second - handle->l1etmissSlice(iFO).first);
102  if (nL1EtMiss > 0)
103  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EtMiss: " << nL1EtMiss;
104 
105  const unsigned int nL1HfRings(handle->l1hfringsSlice(iFO).second - handle->l1hfringsSlice(iFO).first);
106  if (nL1HfRings > 0)
107  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1HfRings: " << nL1HfRings;
108 
109  const unsigned int nPFJets(handle->pfjetSlice(iFO).second - handle->pfjetSlice(iFO).first);
110  if (nPFJets > 0)
111  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFJets: " << nPFJets;
112 
113  const unsigned int nPFTaus(handle->pftauSlice(iFO).second - handle->pftauSlice(iFO).first);
114  if (nPFTaus > 0)
115  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFTaus: " << nPFTaus;
116 
117  const unsigned int nPFMETs(handle->pfmetSlice(iFO).second - handle->pfmetSlice(iFO).first);
118  if (nPFMETs > 0)
119  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFMETs: " << nPFMETs;
120 
121  const unsigned int nL1TMuon(handle->l1tmuonSlice(iFO).second - handle->l1tmuonSlice(iFO).first);
122  if (nL1TMuon > 0)
123  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TMuon: " << nL1TMuon;
124 
125  const unsigned int nL1TEGamma(handle->l1tegammaSlice(iFO).second - handle->l1tegammaSlice(iFO).first);
126  if (nL1TEGamma > 0)
127  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEGamma: " << nL1TEGamma;
128 
129  const unsigned int nL1TJet(handle->l1tjetSlice(iFO).second - handle->l1tjetSlice(iFO).first);
130  if (nL1TJet > 0)
131  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TJet: " << nL1TJet;
132 
133  const unsigned int nL1TTau(handle->l1ttauSlice(iFO).second - handle->l1ttauSlice(iFO).first);
134  if (nL1TTau > 0)
135  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TTau: " << nL1TTau;
136 
137  const unsigned int nL1TEtSum(handle->l1tetsumSlice(iFO).second - handle->l1tetsumSlice(iFO).first);
138  if (nL1TEtSum > 0)
139  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEtSum: " << nL1TEtSum;
140 
141  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
142  }
143  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Elements in linearised collections of Refs: " << endl;
144  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Photons: " << handle->photonSize() << endl;
145  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Electrons: " << handle->electronSize() << endl;
146  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Muons: " << handle->muonSize() << endl;
147  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Jets: " << handle->jetSize() << endl;
148  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Composites: " << handle->compositeSize() << endl;
149  LogVerbatim("TriggerSummaryAnalyzerRAW") << " BaseMETs: " << handle->basemetSize() << endl;
150  LogVerbatim("TriggerSummaryAnalyzerRAW") << " CaloMETs: " << handle->calometSize() << endl;
151  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Pixtracks: " << handle->pixtrackSize() << endl;
152  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EM: " << handle->l1emSize() << endl;
153  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Muon: " << handle->l1muonSize() << endl;
154  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Jet: " << handle->l1jetSize() << endl;
155  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EtMiss: " << handle->l1etmissSize() << endl;
156  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1HfRings: " << handle->l1hfringsSize() << endl;
157  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFJets: " << handle->pfjetSize() << endl;
158  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFTaus: " << handle->pftauSize() << endl;
159  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFMETs: " << handle->pfmetSize() << endl;
160  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TMuon: " << handle->l1tmuonSize() << endl;
161  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEGamma: " << handle->l1tegammaSize() << endl;
162  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TJet: " << handle->l1tjetSize() << endl;
163  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TTau: " << handle->l1ttauSize() << endl;
164  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEtSum: " << handle->l1tetsumSize() << endl;
165  } else {
166  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Handle invalid! Check InputTag provided." << endl;
167  }
168  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
169 
170  return;
171 }
std::pair< size_type, size_type > l1jetSlice(size_type filter) const
std::pair< size_type, size_type > l1ttauSlice(size_type filter) const
std::pair< size_type, size_type > l1muonSlice(size_type filter) const
std::pair< size_type, size_type > l1tegammaSlice(size_type filter) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::pair< size_type, size_type > l1etmissSlice(size_type filter) const
std::pair< size_type, size_type > jetSlice(size_type filter) const
const std::string & usedProcessName() const
getters - for user access
const edm::InputTag filterTag(size_type filterIndex) const
tag from index
delete x;
Definition: CaloConfig.h:22
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:159
std::pair< size_type, size_type > electronSlice(size_type filter) const
const edm::InputTag inputTag_
InputTag of TriggerEventWithRefs to analyze.
std::pair< size_type, size_type > pixtrackSlice(size_type filter) const
std::pair< size_type, size_type > l1tmuonSlice(size_type filter) const
std::pair< size_type, size_type > l1emSlice(size_type filter) const
std::pair< size_type, size_type > photonSlice(size_type filter) const
slices of objects for a specific filter: [begin,end[
size_type photonSize() const
low-level getters for data members
std::pair< size_type, size_type > muonSlice(size_type filter) const
std::pair< size_type, size_type > l1tjetSlice(size_type filter) const
std::pair< size_type, size_type > l1tetsumSlice(size_type filter) const
std::pair< size_type, size_type > compositeSlice(size_type filter) const
bool isValid() const
Definition: HandleBase.h:70
std::pair< size_type, size_type > basemetSlice(size_type filter) const
size_type size() const
number of filters
std::pair< size_type, size_type > calometSlice(size_type filter) const
fixed size matrix
HLT enums.
std::pair< size_type, size_type > pfjetSlice(size_type filter) const
std::pair< size_type, size_type > l1hfringsSlice(size_type filter) const
std::pair< size_type, size_type > pftauSlice(size_type filter) const
std::pair< size_type, size_type > pfmetSlice(size_type filter) const
const edm::EDGetTokenT< trigger::TriggerEventWithRefs > inputToken_
void TriggerSummaryAnalyzerRAW::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 27 of file TriggerSummaryAnalyzerRAW.cc.

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

27  {
29  desc.add<edm::InputTag>("inputTag", edm::InputTag("hltTriggerSummaryRAW"));
30  descriptions.add("triggerSummaryAnalyzerRAW", desc);
31 }
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 34 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().

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

Definition at line 35 of file TriggerSummaryAnalyzerRAW.h.

Referenced by analyze().