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::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
 ~TriggerSummaryAnalyzerAOD ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
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::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

edm::InputTag inputTag_
 InputTag of TriggerEvent to analyze. More...
 
edm::EDGetTokenT
< trigger::TriggerEvent
inputToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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 16 of file TriggerSummaryAnalyzerAOD.cc.

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

Definition at line 21 of file TriggerSummaryAnalyzerAOD.cc.

22 {
23 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 37 of file TriggerSummaryAnalyzerAOD.cc.

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

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

Definition at line 29 of file TriggerSummaryAnalyzerAOD.cc.

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

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

Member Data Documentation

edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 35 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().

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

Definition at line 36 of file TriggerSummaryAnalyzerAOD.h.

Referenced by analyze().