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

17  :
18  inputTag_(ps.getParameter<edm::InputTag>("inputTag")),
19  inputToken_(consumes<trigger::TriggerEvent>(inputTag_))
20 { }
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 36 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(), cmsBatch::handle, mps_fire::i, trigger::TriggerObject::id(), inputTag_, inputToken_, edm::HandleBase::isValid(), trigger::TriggerObject::mass(), SiStripPI::max, gen::n, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeCollections(), trigger::TriggerEvent::sizeFilters(), trigger::TriggerEvent::sizeObjects(), and trigger::TriggerEvent::usedProcessName().

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

Definition at line 28 of file TriggerSummaryAnalyzerAOD.cc.

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

28  {
30  desc.add<edm::InputTag>("inputTag",edm::InputTag("hltTriggerSummaryAOD"));
31  descriptions.add("triggerSummaryAnalyzerAOD", 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 TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 35 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().

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

Definition at line 36 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().