CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TriggerSummaryAnalyzerRAW Class Reference
Inheritance diagram for TriggerSummaryAnalyzerRAW:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::StreamID, const edm::Event &, const edm::EventSetup &) const override
 
 TriggerSummaryAnalyzerRAW (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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::global::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::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

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

Author
Martin Grunewald

Definition at line 22 of file TriggerSummaryAnalyzerRAW.cc.

Constructor & Destructor Documentation

◆ TriggerSummaryAnalyzerRAW()

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

Definition at line 38 of file TriggerSummaryAnalyzerRAW.cc.

39  : inputTag_(ps.getParameter<edm::InputTag>("inputTag")),
40  inputToken_(consumes<trigger::TriggerEventWithRefs>(inputTag_)) {}

Member Function Documentation

◆ analyze()

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

Implements edm::global::EDAnalyzerBase.

Definition at line 53 of file TriggerSummaryAnalyzerRAW.cc.

53  {
54  using namespace std;
55  using namespace edm;
56  using namespace reco;
57  using namespace l1extra;
58  using namespace trigger;
59  using namespace l1t;
60 
61  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
62  LogVerbatim("TriggerSummaryAnalyzerRAW")
63  << "TriggerSummaryAnalyzerRAW: content of TriggerEventWithRefs: " << inputTag_.encode();
64 
66  iEvent.getByToken(inputToken_, handle);
67  if (handle.isValid()) {
68  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Used Processname: " << handle->usedProcessName() << endl;
69  const size_type nFO(handle->size());
70  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Number of TriggerFilterObjects: " << nFO << endl;
71  LogVerbatim("TriggerSummaryAnalyzerRAW") << "The TriggerFilterObjects: #, tag" << endl;
72  for (size_type iFO = 0; iFO != nFO; ++iFO) {
73  LogVerbatim("TriggerSummaryAnalyzerRAW") << iFO << " " << handle->filterTag(iFO).encode() << endl;
74  LogVerbatim("TriggerSummaryAnalyzerRAW") << " # of objects:";
75 
76  const unsigned int nPhotons(handle->photonSlice(iFO).second - handle->photonSlice(iFO).first);
77  if (nPhotons > 0)
78  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Photons: " << nPhotons;
79 
80  const unsigned int nElectrons(handle->electronSlice(iFO).second - handle->electronSlice(iFO).first);
81  if (nElectrons > 0)
82  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Electrons: " << nElectrons;
83 
84  const unsigned int nMuons(handle->muonSlice(iFO).second - handle->muonSlice(iFO).first);
85  if (nMuons > 0)
86  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Muons: " << nMuons;
87 
88  const unsigned int nJets(handle->jetSlice(iFO).second - handle->jetSlice(iFO).first);
89  if (nJets > 0)
90  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Jets: " << nJets;
91 
92  const unsigned int nComposites(handle->compositeSlice(iFO).second - handle->compositeSlice(iFO).first);
93  if (nComposites > 0)
94  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Composites: " << nComposites;
95 
96  const unsigned int nBaseMETs(handle->basemetSlice(iFO).second - handle->basemetSlice(iFO).first);
97  if (nBaseMETs > 0)
98  LogVerbatim("TriggerSummaryAnalyzerRAW") << " BaseMETs: " << nBaseMETs;
99 
100  const unsigned int nCaloMETs(handle->calometSlice(iFO).second - handle->calometSlice(iFO).first);
101  if (nCaloMETs > 0)
102  LogVerbatim("TriggerSummaryAnalyzerRAW") << " CaloMETs: " << nCaloMETs;
103 
104  const unsigned int nPixTracks(handle->pixtrackSlice(iFO).second - handle->pixtrackSlice(iFO).first);
105  if (nPixTracks > 0)
106  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PixTracks: " << nPixTracks;
107 
108  const unsigned int nL1EM(handle->l1emSlice(iFO).second - handle->l1emSlice(iFO).first);
109  if (nL1EM > 0)
110  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EM: " << nL1EM;
111 
112  const unsigned int nL1Muon(handle->l1muonSlice(iFO).second - handle->l1muonSlice(iFO).first);
113  if (nL1Muon > 0)
114  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Muon: " << nL1Muon;
115 
116  const unsigned int nL1Jet(handle->l1jetSlice(iFO).second - handle->l1jetSlice(iFO).first);
117  if (nL1Jet > 0)
118  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Jet: " << nL1Jet;
119 
120  const unsigned int nL1EtMiss(handle->l1etmissSlice(iFO).second - handle->l1etmissSlice(iFO).first);
121  if (nL1EtMiss > 0)
122  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EtMiss: " << nL1EtMiss;
123 
124  const unsigned int nL1HfRings(handle->l1hfringsSlice(iFO).second - handle->l1hfringsSlice(iFO).first);
125  if (nL1HfRings > 0)
126  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1HfRings: " << nL1HfRings;
127 
128  const unsigned int nPFJets(handle->pfjetSlice(iFO).second - handle->pfjetSlice(iFO).first);
129  if (nPFJets > 0)
130  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFJets: " << nPFJets;
131 
132  const unsigned int nPFTaus(handle->pftauSlice(iFO).second - handle->pftauSlice(iFO).first);
133  if (nPFTaus > 0)
134  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFTaus: " << nPFTaus;
135 
136  const unsigned int nPFMETs(handle->pfmetSlice(iFO).second - handle->pfmetSlice(iFO).first);
137  if (nPFMETs > 0)
138  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFMETs: " << nPFMETs;
139 
140  const unsigned int nL1TMuon(handle->l1tmuonSlice(iFO).second - handle->l1tmuonSlice(iFO).first);
141  if (nL1TMuon > 0)
142  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TMuon: " << nL1TMuon;
143 
144  const unsigned int nL1TEGamma(handle->l1tegammaSlice(iFO).second - handle->l1tegammaSlice(iFO).first);
145  if (nL1TEGamma > 0)
146  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEGamma: " << nL1TEGamma;
147 
148  const unsigned int nL1TJet(handle->l1tjetSlice(iFO).second - handle->l1tjetSlice(iFO).first);
149  if (nL1TJet > 0)
150  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TJet: " << nL1TJet;
151 
152  const unsigned int nL1TTau(handle->l1ttauSlice(iFO).second - handle->l1ttauSlice(iFO).first);
153  if (nL1TTau > 0)
154  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TTau: " << nL1TTau;
155 
156  const unsigned int nL1TEtSum(handle->l1tetsumSlice(iFO).second - handle->l1tetsumSlice(iFO).first);
157  if (nL1TEtSum > 0)
158  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEtSum: " << nL1TEtSum;
159 
160  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
161  }
162  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Elements in linearised collections of Refs: " << endl;
163  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Photons: " << handle->photonSize() << endl;
164  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Electrons: " << handle->electronSize() << endl;
165  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Muons: " << handle->muonSize() << endl;
166  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Jets: " << handle->jetSize() << endl;
167  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Composites: " << handle->compositeSize() << endl;
168  LogVerbatim("TriggerSummaryAnalyzerRAW") << " BaseMETs: " << handle->basemetSize() << endl;
169  LogVerbatim("TriggerSummaryAnalyzerRAW") << " CaloMETs: " << handle->calometSize() << endl;
170  LogVerbatim("TriggerSummaryAnalyzerRAW") << " Pixtracks: " << handle->pixtrackSize() << endl;
171  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EM: " << handle->l1emSize() << endl;
172  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Muon: " << handle->l1muonSize() << endl;
173  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1Jet: " << handle->l1jetSize() << endl;
174  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1EtMiss: " << handle->l1etmissSize() << endl;
175  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1HfRings: " << handle->l1hfringsSize() << endl;
176  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFJets: " << handle->pfjetSize() << endl;
177  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFTaus: " << handle->pftauSize() << endl;
178  LogVerbatim("TriggerSummaryAnalyzerRAW") << " PFMETs: " << handle->pfmetSize() << endl;
179  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TMuon: " << handle->l1tmuonSize() << endl;
180  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEGamma: " << handle->l1tegammaSize() << endl;
181  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TJet: " << handle->l1tjetSize() << endl;
182  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TTau: " << handle->l1ttauSize() << endl;
183  LogVerbatim("TriggerSummaryAnalyzerRAW") << " L1TEtSum: " << handle->l1tetsumSize() << endl;
184  } else {
185  LogVerbatim("TriggerSummaryAnalyzerRAW") << "Handle invalid! Check InputTag provided." << endl;
186  }
187  LogVerbatim("TriggerSummaryAnalyzerRAW") << endl;
188 
189  return;
190 }

References edm::InputTag::encode(), patZpeak::handle, iEvent, inputTag_, inputToken_, custom_jme_cff::nElectrons, and custom_jme_cff::nMuons.

◆ fillDescriptions()

void TriggerSummaryAnalyzerRAW::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 46 of file TriggerSummaryAnalyzerRAW.cc.

46  {
48  desc.add<edm::InputTag>("inputTag", edm::InputTag("hltTriggerSummaryRAW"));
49  descriptions.add("triggerSummaryAnalyzerRAW", desc);
50 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

Member Data Documentation

◆ inputTag_

const edm::InputTag TriggerSummaryAnalyzerRAW::inputTag_
private

InputTag of TriggerEventWithRefs to analyze.

Definition at line 31 of file TriggerSummaryAnalyzerRAW.cc.

Referenced by analyze().

◆ inputToken_

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

Definition at line 32 of file TriggerSummaryAnalyzerRAW.cc.

Referenced by analyze().

custom_jme_cff.nMuons
nMuons
Definition: custom_jme_cff.py:148
patZpeak.handle
handle
Definition: patZpeak.py:23
custom_jme_cff.nElectrons
nElectrons
Definition: custom_jme_cff.py:149
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TriggerSummaryAnalyzerRAW::inputToken_
const edm::EDGetTokenT< trigger::TriggerEventWithRefs > inputToken_
Definition: TriggerSummaryAnalyzerRAW.cc:32
l1t
delete x;
Definition: CaloConfig.h:22
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
TriggerSummaryAnalyzerRAW::inputTag_
const edm::InputTag inputTag_
InputTag of TriggerEventWithRefs to analyze.
Definition: TriggerSummaryAnalyzerRAW.cc:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
trigger
Definition: HLTPrescaleTableCond.h:8
l1extra
Definition: L1EmParticle.h:26
edm::InputTag
Definition: InputTag.h:15