CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TriggerSummaryAnalyzerAOD Class Reference

#include <TriggerSummaryAnalyzerAOD.h>

Inheritance diagram for TriggerSummaryAnalyzerAOD:
edm::stream::EDAnalyzer<> edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
 ~TriggerSummaryAnalyzerAOD () 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 TriggerEvent to analyze. More...
 
const edm::EDGetTokenT< trigger::TriggerEventinputToken_
 

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 AOD

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 25 of file TriggerSummaryAnalyzerAOD.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file TriggerSummaryAnalyzerAOD.cc.

References ~TriggerSummaryAnalyzerAOD().

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

Member Function Documentation

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

Definition at line 33 of file TriggerSummaryAnalyzerAOD.cc.

References trigger::TriggerEvent::collectionKey(), trigger::TriggerEvent::collectionTag(), edm::InputTag::encode(), trigger::TriggerObject::eta(), trigger::TriggerEvent::filterIds(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::filterTag(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), patZpeak::handle, mps_fire::i, trigger::TriggerObject::id(), inputTag_, inputToken_, edm::HandleBase::isValid(), trigger::TriggerObject::mass(), SiStripPI::max, dqmiodumpmetadata::n, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeCollections(), trigger::TriggerEvent::sizeFilters(), trigger::TriggerEvent::sizeObjects(), and trigger::TriggerEvent::usedProcessName().

33  {
34  using namespace std;
35  using namespace edm;
36  using namespace reco;
37  using namespace trigger;
38 
39  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
40  LogVerbatim("TriggerSummaryAnalyzerAOD")
41  << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;
42 
44  iEvent.getByToken(inputToken_, handle);
45  if (handle.isValid()) {
46  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Used Processname: " << handle->usedProcessName() << endl;
47  const size_type nC(handle->sizeCollections());
48  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of packed Collections: " << nC << endl;
49  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Collections: #, tag, 1-past-end index" << endl;
50  for (size_type iC = 0; iC != nC; ++iC) {
51  LogVerbatim("TriggerSummaryAnalyzerAOD")
52  << iC << " " << handle->collectionTag(iC).encode() << " " << handle->collectionKey(iC) << endl;
53  }
54  const size_type nO(handle->sizeObjects());
55  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerObjects: " << nO << endl;
56  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
57  const TriggerObjectCollection& TOC(handle->getObjects());
58  for (size_type iO = 0; iO != nO; ++iO) {
59  const TriggerObject& TO(TOC[iO]);
60  LogVerbatim("TriggerSummaryAnalyzerAOD")
61  << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
62  }
63  const size_type nF(handle->sizeFilters());
64  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerFilters: " << nF << endl;
65  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
66  for (size_type iF = 0; iF != nF; ++iF) {
67  const Vids& VIDS(handle->filterIds(iF));
68  const Keys& KEYS(handle->filterKeys(iF));
69  const size_type nI(VIDS.size());
70  const size_type nK(KEYS.size());
71  LogVerbatim("TriggerSummaryAnalyzerAOD")
72  << iF << " " << handle->filterTag(iF).encode() << " " << nI << "/" << nK << " the pairs: ";
73  const size_type n(max(nI, nK));
74  for (size_type i = 0; i != n; ++i) {
75  LogVerbatim("TriggerSummaryAnalyzerAOD") << " " << VIDS[i] << "/" << KEYS[i];
76  }
77  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
78  assert(nI == nK);
79  }
80  } else {
81  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Handle invalid! Check InputTag provided." << endl;
82  }
83  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
84 
85  return;
86 }
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
trigger::size_type collectionKey(trigger::size_type index) const
Definition: TriggerEvent.h:107
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const edm::EDGetTokenT< trigger::TriggerEvent > inputToken_
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:159
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:117
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
const edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:98
bool isValid() const
Definition: HandleBase.h:70
const edm::InputTag collectionTag(trigger::size_type index) const
Definition: TriggerEvent.h:103
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:108
trigger::size_type sizeObjects() const
Definition: TriggerEvent.h:145
std::vector< size_type > Keys
trigger::size_type sizeCollections() const
other
Definition: TriggerEvent.h:144
fixed size matrix
HLT enums.
std::vector< int > Vids
void TriggerSummaryAnalyzerAOD::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 26 of file TriggerSummaryAnalyzerAOD.cc.

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

26  {
28  desc.add<edm::InputTag>("inputTag", edm::InputTag("hltTriggerSummaryAOD"));
29  descriptions.add("triggerSummaryAnalyzerAOD", desc);
30 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

const edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 34 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().

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

Definition at line 35 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().