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
 
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)
 
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 ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, 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().

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 ( )
overridedefault

Member Function Documentation

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

Definition at line 36 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(), cmsBatch::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().

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

Definition at line 28 of file TriggerSummaryAnalyzerRAW.cc.

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

28  {
30  desc.add<edm::InputTag>("inputTag",edm::InputTag("hltTriggerSummaryRAW"));
31  descriptions.add("triggerSummaryAnalyzerRAW", desc);
32 }
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().