CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TriggerSummaryAnalyzerAOD Class Reference
Inheritance diagram for TriggerSummaryAnalyzerAOD:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::StreamID, const edm::Event &, const edm::EventSetup &) const override
 
 TriggerSummaryAnalyzerAOD (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::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::global::EDAnalyzerBase
typedef EDAnalyzerBase 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)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

This class is an EDAnalyzer analyzing the HLT summary object for AOD

Author
Martin Grunewald

Definition at line 21 of file TriggerSummaryAnalyzerAOD.cc.

Constructor & Destructor Documentation

◆ TriggerSummaryAnalyzerAOD()

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

Definition at line 37 of file TriggerSummaryAnalyzerAOD.cc.

38  : inputTag_(ps.getParameter<edm::InputTag>("inputTag")), inputToken_(consumes<trigger::TriggerEvent>(inputTag_)) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< trigger::TriggerEvent > inputToken_
const edm::InputTag inputTag_
InputTag of TriggerEvent to analyze.

Member Function Documentation

◆ analyze()

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

Implements edm::global::EDAnalyzerBase.

Definition at line 51 of file TriggerSummaryAnalyzerAOD.cc.

References cms::cuda::assert(), edm::InputTag::encode(), trigger::TriggerObject::eta(), patZpeak::handle, mps_fire::i, trigger::TriggerObject::id(), iEvent, inputTag_, inputToken_, trigger::TriggerObject::mass(), SiStripPI::max, dqmiodumpmetadata::n, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

51  {
52  using namespace std;
53  using namespace edm;
54  using namespace reco;
55  using namespace trigger;
56 
57  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
58  LogVerbatim("TriggerSummaryAnalyzerAOD")
59  << "TriggerSummaryAnalyzerAOD: content of TriggerEvent: " << inputTag_.encode() << endl;
60 
62  iEvent.getByToken(inputToken_, handle);
63  if (handle.isValid()) {
64  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Used Processname: " << handle->usedProcessName() << endl;
65  const size_type nC(handle->sizeCollections());
66  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of packed Collections: " << nC << endl;
67  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Collections: #, tag, 1-past-end index" << endl;
68  for (size_type iC = 0; iC != nC; ++iC) {
69  LogVerbatim("TriggerSummaryAnalyzerAOD")
70  << iC << " " << handle->collectionTag(iC).encode() << " " << handle->collectionKey(iC) << endl;
71  }
72  const size_type nO(handle->sizeObjects());
73  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerObjects: " << nO << endl;
74  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The TriggerObjects: #, id, pt, eta, phi, mass" << endl;
75  const TriggerObjectCollection& TOC(handle->getObjects());
76  for (size_type iO = 0; iO != nO; ++iO) {
77  const TriggerObject& TO(TOC[iO]);
78  LogVerbatim("TriggerSummaryAnalyzerAOD")
79  << iO << " " << TO.id() << " " << TO.pt() << " " << TO.eta() << " " << TO.phi() << " " << TO.mass() << endl;
80  }
81  const size_type nF(handle->sizeFilters());
82  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Number of TriggerFilters: " << nF << endl;
83  LogVerbatim("TriggerSummaryAnalyzerAOD") << "The Filters: #, tag, #ids/#keys, the id/key pairs" << endl;
84  for (size_type iF = 0; iF != nF; ++iF) {
85  const Vids& VIDS(handle->filterIds(iF));
86  const Keys& KEYS(handle->filterKeys(iF));
87  const size_type nI(VIDS.size());
88  const size_type nK(KEYS.size());
89  LogVerbatim("TriggerSummaryAnalyzerAOD")
90  << iF << " " << handle->filterTag(iF).encode() << " " << nI << "/" << nK << " the pairs: ";
91  const size_type n(max(nI, nK));
92  for (size_type i = 0; i != n; ++i) {
93  LogVerbatim("TriggerSummaryAnalyzerAOD") << " " << VIDS[i] << "/" << KEYS[i];
94  }
95  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
96  assert(nI == nK);
97  }
98  } else {
99  LogVerbatim("TriggerSummaryAnalyzerAOD") << "Handle invalid! Check InputTag provided." << endl;
100  }
101  LogVerbatim("TriggerSummaryAnalyzerAOD") << endl;
102 
103  return;
104 }
Log< level::Info, true > LogVerbatim
std::string encode() const
Definition: InputTag.cc:159
const edm::EDGetTokenT< trigger::TriggerEvent > inputToken_
assert(be >=bs)
uint16_t size_type
int iEvent
Definition: GenABIO.cc:224
const 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:75
std::vector< size_type > Keys
fixed size matrix
HLT enums.
std::vector< int > Vids

◆ fillDescriptions()

void TriggerSummaryAnalyzerAOD::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 44 of file TriggerSummaryAnalyzerAOD.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

44  {
46  desc.add<edm::InputTag>("inputTag", edm::InputTag("hltTriggerSummaryAOD"));
47  descriptions.add("triggerSummaryAnalyzerAOD", desc);
48 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ inputTag_

const edm::InputTag TriggerSummaryAnalyzerAOD::inputTag_
private

InputTag of TriggerEvent to analyze.

Definition at line 30 of file TriggerSummaryAnalyzerAOD.cc.

Referenced by analyze().

◆ inputToken_

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

Definition at line 31 of file TriggerSummaryAnalyzerAOD.cc.

Referenced by analyze().