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

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
virtual ~TriggerSummaryAnalyzerAOD ()
 
- 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
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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 & itemsToGetFromEvent () 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
 
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.

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

Definition at line 22 of file TriggerSummaryAnalyzerAOD.cc.

23 {
24 }

Member Function Documentation

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

Definition at line 38 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, i, trigger::TriggerObject::id(), inputTag_, inputToken_, edm::HandleBase::isValid(), trigger::TriggerObject::mass(), hpstanc_transforms::max, gen::n, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeCollections(), trigger::TriggerEvent::sizeFilters(), trigger::TriggerEvent::sizeObjects(), and trigger::TriggerEvent::usedProcessName().

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

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

30  {
32  desc.add<edm::InputTag>("inputTag",edm::InputTag("hltTriggerSummaryAOD"));
33  descriptions.add("triggerSummaryAnalyzerAOD", desc);
34 }
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().