CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::TriggerEvent
inputToken_
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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

Implements edm::stream::EDAnalyzerBase.

Definition at line 38 of file TriggerSummaryAnalyzerAOD.cc.

References assert(), edm::InputTag::encode(), trigger::TriggerObject::eta(), edm::Event::getByToken(), patZpeak::handle, i, trigger::TriggerObject::id(), inputTag_, inputToken_, trigger::TriggerObject::mass(), bookConverter::max, gen::n, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), and dt_dqm_sourceclient_common_cff::reco.

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 
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
const edm::EDGetTokenT< trigger::TriggerEvent > inputToken_
assert(m_qm.get())
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:164
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
const edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.
tuple handle
Definition: patZpeak.py:22
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
std::vector< int > Vids
void TriggerSummaryAnalyzerAOD::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 30 of file TriggerSummaryAnalyzerAOD.cc.

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

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