CMS 3D CMS Logo

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

Public Member Functions

void analyze (edm::StreamID, const edm::Event &, const edm::EventSetup &) const override
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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 TriggerEvent to analyze. More...
 
const edm::EDGetTokenT< trigger::TriggerEventinputToken_
 

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>
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)
 
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 AOD

Author
Martin Grunewald

Definition at line 21 of file TriggerSummaryAnalyzerAOD.cc.

Constructor & Destructor Documentation

◆ TriggerSummaryAnalyzerAOD()

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

Definition at line 37 of file TriggerSummaryAnalyzerAOD.cc.

38  : inputTag_(ps.getParameter<edm::InputTag>("inputTag")), inputToken_(consumes<trigger::TriggerEvent>(inputTag_)) {}

Member Function Documentation

◆ analyze()

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

Implements edm::global::EDAnalyzerBase.

Definition at line 51 of file TriggerSummaryAnalyzerAOD.cc.

51  {
52  using namespace std;
53  using namespace edm;
54  using namespace reco;
55  using namespace trigger;
56 
57  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
58  LogVerbatim("TriggerSummaryAnalyzerAOD")
59  << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;
60 
62  iEvent.getByToken(inputToken_, handle);
63  if (handle.isValid()) {
64  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Used Processname: " << handle->usedProcessName() << endl;
65  const size_type nC(handle->sizeCollections());
66  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of packed Collections: " << nC << endl;
67  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Collections: #, tag, 1-past-end index" << endl;
68  for (size_type iC = 0; iC != nC; ++iC) {
69  LogVerbatim("TriggerSummaryAnalyzerAOD")
70  << iC << " " << handle->collectionTag(iC).encode() << " " << handle->collectionKey(iC) << endl;
71  }
72  const size_type nO(handle->sizeObjects());
73  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerObjects: " << nO << endl;
74  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
75  const TriggerObjectCollection& TOC(handle->getObjects());
76  for (size_type iO = 0; iO != nO; ++iO) {
77  const TriggerObject& TO(TOC[iO]);
78  LogVerbatim("TriggerSummaryAnalyzerAOD")
79  << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
80  }
81  const size_type nF(handle->sizeFilters());
82  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerFilters: " << nF << endl;
83  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
84  for (size_type iF = 0; iF != nF; ++iF) {
85  const Vids& VIDS(handle->filterIds(iF));
86  const Keys& KEYS(handle->filterKeys(iF));
87  const size_type nI(VIDS.size());
88  const size_type nK(KEYS.size());
89  LogVerbatim("TriggerSummaryAnalyzerAOD")
90  << iF << " " << handle->filterTag(iF).encode() << " " << nI << "/" << nK << " the pairs: ";
91  const size_type n(max(nI, nK));
92  for (size_type i = 0; i != n; ++i) {
93  LogVerbatim("TriggerSummaryAnalyzerAOD") << " " << VIDS[i] << "/" << KEYS[i];
94  }
95  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
96  assert(nI == nK);
97  }
98  } else {
99  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Handle invalid! Check InputTag provided." << endl;
100  }
101  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
102 
103  return;
104 }

References cms::cuda::assert(), edm::InputTag::encode(), trigger::TriggerObject::eta(), patZpeak::handle, mps_fire::i, trigger::TriggerObject::id(), iEvent, inputTag_, inputToken_, trigger::TriggerObject::mass(), SiStripPI::max, dqmiodumpmetadata::n, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

◆ fillDescriptions()

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

Definition at line 44 of file TriggerSummaryAnalyzerAOD.cc.

44  {
46  desc.add<edm::InputTag>("inputTag", edm::InputTag("hltTriggerSummaryAOD"));
47  descriptions.add("triggerSummaryAnalyzerAOD", desc);
48 }

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

Member Data Documentation

◆ inputTag_

const edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 30 of file TriggerSummaryAnalyzerAOD.cc.

Referenced by analyze().

◆ inputToken_

const edm::EDGetTokenT<trigger::TriggerEvent> TriggerSummaryAnalyzerAOD::inputToken_
private

Definition at line 31 of file TriggerSummaryAnalyzerAOD.cc.

Referenced by analyze().

TriggerObject
Definition: TriggerObject.py:1
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
trigger::Vids
std::vector< int > Vids
Definition: TriggerTypeDefs.h:21
patZpeak.handle
handle
Definition: patZpeak.py:23
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
cms::cuda::assert
assert(be >=bs)
TriggerSummaryAnalyzerAOD::inputTag_
const edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.
Definition: TriggerSummaryAnalyzerAOD.cc:30
TriggerSummaryAnalyzerAOD::inputToken_
const edm::EDGetTokenT< trigger::TriggerEvent > inputToken_
Definition: TriggerSummaryAnalyzerAOD.cc:31
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
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
iEvent
int iEvent
Definition: GenABIO.cc:224
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
edm::LogVerbatim
Definition: MessageLogger.h:297
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
std
Definition: JetResolutionObject.h:76
trigger
Definition: HLTPrescaleTableCond.h:8
edm::InputTag
Definition: InputTag.h:15