CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
trigger::TriggerEvent Class Reference

The single EDProduct to be saved for each event (AOD case) More...

#include <TriggerEvent.h>

Inheritance diagram for trigger::TriggerEvent:
edm::DoNotRecordParents

Classes

class  TriggerFilterObject
 Helper class: recording trigger objects firing a single filter. More...
 

Public Member Functions

void addCollections (const std::vector< edm::InputTag > &collectionTags, const Keys &collectionKeys)
 
void addCollections (const std::vector< std::string > &collectionTags, const Keys &collectionKeys)
 
void addFilter (const edm::InputTag &filterTag, const Vids &filterIds, const Keys &filterKeys)
 
void addObjects (const TriggerObjectCollection &triggerObjects)
 setters More...
 
trigger::size_type collectionIndex (const edm::InputTag &collectionTag) const
 find index of collection from collection tag More...
 
trigger::size_type collectionKey (trigger::size_type index) const
 
const KeyscollectionKeys () const
 
const edm::InputTag collectionTag (trigger::size_type index) const
 
const std::string & collectionTagEncoded (trigger::size_type index) const
 
const std::vector< std::string > & collectionTags () const
 
const VidsfilterIds (trigger::size_type index) const
 
trigger::size_type filterIndex (const edm::InputTag &filterTag) const
 find index of filter in data-member vector from filter tag More...
 
const KeysfilterKeys (trigger::size_type index) const
 
std::string_view filterLabel (trigger::size_type index) const
 
const edm::InputTag filterTag (trigger::size_type index) const
 
const std::string & filterTagEncoded (trigger::size_type index) const
 
const TriggerObjectCollectiongetObjects () const
 
trigger::size_type sizeCollections () const
 other More...
 
trigger::size_type sizeFilters () const
 
trigger::size_type sizeObjects () const
 
 TriggerEvent ()
 methods More...
 
 TriggerEvent (const std::string &usedProcessName, trigger::size_type nc, trigger::size_type no, trigger::size_type nf)
 
const std::string & usedProcessName () const
 getters More...
 

Private Attributes

Keys collectionKeys_
 1-past-end indices into linearised vector More...
 
std::vector< std::string > collectionTags_
 Input tags of packed up collections. More...
 
std::vector< TriggerFilterObjecttriggerFilters_
 collection of all TriggerFilterObjects More...
 
TriggerObjectCollection triggerObjects_
 collection of all unique physics objects (linearised vector) More...
 
std::string usedProcessName_
 data members More...
 

Detailed Description

The single EDProduct to be saved for each event (AOD case)

The single EDProduct to be saved for each event (AOD case) describing the (HLT) trigger table

Author
Martin Grunewald

Definition at line 26 of file TriggerEvent.h.

Constructor & Destructor Documentation

◆ TriggerEvent() [1/2]

trigger::TriggerEvent::TriggerEvent ( )
inline

methods

constructors

Definition at line 61 of file TriggerEvent.h.

std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:54
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52
std::string usedProcessName_
data members
Definition: TriggerEvent.h:48
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ TriggerEvent() [2/2]

trigger::TriggerEvent::TriggerEvent ( const std::string &  usedProcessName,
trigger::size_type  nc,
trigger::size_type  no,
trigger::size_type  nf 
)
inline

Definition at line 62 of file TriggerEvent.h.

References collectionKeys_, collectionTags_, triggerFilters_, and triggerObjects_.

67  triggerFilters_() {
68  collectionTags_.reserve(nc);
69  collectionKeys_.reserve(nc);
70  triggerObjects_.reserve(no);
71  triggerFilters_.reserve(nf);
72  }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:54
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52
std::string usedProcessName_
data members
Definition: TriggerEvent.h:48
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:99

Member Function Documentation

◆ addCollections() [1/2]

void trigger::TriggerEvent::addCollections ( const std::vector< edm::InputTag > &  collectionTags,
const Keys collectionKeys 
)
inline

Definition at line 79 of file TriggerEvent.h.

References cms::cuda::assert(), collectionKeys(), collectionKeys_, collectionTags(), collectionTags_, alcaDQMUpload::encode(), mps_fire::i, and dqmiodumpmetadata::n.

79  {
80  assert(collectionTags.size() == collectionKeys.size());
81  const trigger::size_type n(collectionTags.size());
82  for (trigger::size_type i = 0; i != n; ++i) {
83  collectionTags_.push_back(collectionTags[i].encode());
84  }
85  collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
86  }
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:100
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50
assert(be >=bs)
uint16_t size_type
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52
def encode(args, files)
const Keys & collectionKeys() const
Definition: TriggerEvent.h:101

◆ addCollections() [2/2]

void trigger::TriggerEvent::addCollections ( const std::vector< std::string > &  collectionTags,
const Keys collectionKeys 
)
inline

Definition at line 88 of file TriggerEvent.h.

References cms::cuda::assert(), collectionKeys(), collectionKeys_, collectionTags(), and collectionTags_.

88  {
89  assert(collectionTags.size() == collectionKeys.size());
90  collectionTags_.insert(collectionTags_.end(), collectionTags.begin(), collectionTags.end());
91  collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
92  }
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:100
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50
assert(be >=bs)
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52
const Keys & collectionKeys() const
Definition: TriggerEvent.h:101

◆ addFilter()

void trigger::TriggerEvent::addFilter ( const edm::InputTag filterTag,
const Vids filterIds,
const Keys filterKeys 
)
inline

Definition at line 94 of file TriggerEvent.h.

References filterIds(), filterKeys(), filterTag(), and triggerFilters_.

94  {
95  triggerFilters_.push_back(TriggerFilterObject(filterTag, filterIds, filterKeys));
96  }
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:119
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:109
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:118
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ addObjects()

void trigger::TriggerEvent::addObjects ( const TriggerObjectCollection triggerObjects)
inline

setters

Definition at line 75 of file TriggerEvent.h.

References triggerMatchMonitor_cfi::triggerObjects, and triggerObjects_.

75  {
76  triggerObjects_.insert(triggerObjects_.end(), triggerObjects.begin(), triggerObjects.end());
77  }
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:54

◆ collectionIndex()

trigger::size_type trigger::TriggerEvent::collectionIndex ( const edm::InputTag collectionTag) const
inline

find index of collection from collection tag

Definition at line 122 of file TriggerEvent.h.

References collectionTag(), collectionTags_, edm::InputTag::encode(), mps_fire::i, dqmiodumpmetadata::n, and AlCaHLTBitMon_QueryRunRegistry::string.

122  {
123  const std::string encodedCollectionTag(collectionTag.encode());
124  const trigger::size_type n(collectionTags_.size());
125  for (trigger::size_type i = 0; i != n; ++i) {
126  if (encodedCollectionTag == collectionTags_[i]) {
127  return i;
128  }
129  }
130  return n;
131  }
std::string encode() const
Definition: InputTag.cc:159
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50
const edm::InputTag collectionTag(trigger::size_type index) const
Definition: TriggerEvent.h:104
uint16_t size_type

◆ collectionKey()

trigger::size_type trigger::TriggerEvent::collectionKey ( trigger::size_type  index) const
inline

Definition at line 108 of file TriggerEvent.h.

References collectionKeys_.

108 { return collectionKeys_.at(index); }
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52

◆ collectionKeys()

const Keys& trigger::TriggerEvent::collectionKeys ( ) const
inline

Definition at line 101 of file TriggerEvent.h.

References collectionKeys_.

Referenced by addCollections(), and pat::PATTriggerProducer::produce().

101 { return collectionKeys_; }
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:52

◆ collectionTag()

const edm::InputTag trigger::TriggerEvent::collectionTag ( trigger::size_type  index) const
inline

Definition at line 104 of file TriggerEvent.h.

References collectionTags_, and ProducerED_cfi::InputTag.

Referenced by collectionIndex().

104  {
105  return edm::InputTag(collectionTags_.at(index));
106  }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50

◆ collectionTagEncoded()

const std::string& trigger::TriggerEvent::collectionTagEncoded ( trigger::size_type  index) const
inline

Definition at line 107 of file TriggerEvent.h.

References collectionTags_.

Referenced by pat::PATTriggerProducer::produce().

107 { return collectionTags_.at(index); }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50

◆ collectionTags()

const std::vector<std::string>& trigger::TriggerEvent::collectionTags ( ) const
inline

Definition at line 100 of file TriggerEvent.h.

References collectionTags_.

Referenced by addCollections(), and HltDiff::compare().

100 { return collectionTags_; }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50

◆ filterIds()

const Vids& trigger::TriggerEvent::filterIds ( trigger::size_type  index) const
inline

Definition at line 118 of file TriggerEvent.h.

References triggerFilters_.

Referenced by addFilter(), HLTEventAnalyzerAOD::analyzeTrigger(), CandidateTriggerObjectProducer::produce(), and pat::PATTriggerProducer::produce().

118 { return triggerFilters_.at(index).filterIds_; }
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ filterIndex()

trigger::size_type trigger::TriggerEvent::filterIndex ( const edm::InputTag filterTag) const
inline

find index of filter in data-member vector from filter tag

Definition at line 133 of file TriggerEvent.h.

References edm::InputTag::encode(), filterTag(), mps_fire::i, dqmiodumpmetadata::n, AlCaHLTBitMon_QueryRunRegistry::string, and triggerFilters_.

Referenced by TagAndProbeBtagTriggerMonitor::analyze(), FourVectorHLT::analyze(), HLTObjectMonitor::analyze(), HLTObjectMonitorProtonLead::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), egHLT::trigTools::fillHLTposition(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforMonAllTrigger(), JetMETHLTOfflineSource::fillMEforTriggerNTfired(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), egHLT::trigTools::getFiltersPassed(), TrigObjTnPHistColl::getKeys(), JetMETHLTOfflineSource::isTriggerObjectFound(), BPHMonitor::matchToTrigger(), TriggerTools::passObj(), hltdqm::passTrig(), CandidateTriggerObjectProducer::produce(), TriggerMatchProducer< object >::produce(), pat::PATTriggerProducer::produce(), and egHLT::trigTools::setFiltersObjPasses().

133  {
134  const std::string encodedFilterTag(filterTag.encode());
135  const trigger::size_type n(triggerFilters_.size());
136  for (trigger::size_type i = 0; i != n; ++i) {
137  if (encodedFilterTag == triggerFilters_[i].filterTag_) {
138  return i;
139  }
140  }
141  return n;
142  }
std::string encode() const
Definition: InputTag.cc:159
uint16_t size_type
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:109
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ filterKeys()

const Keys& trigger::TriggerEvent::filterKeys ( trigger::size_type  index) const
inline

◆ filterLabel()

std::string_view trigger::TriggerEvent::filterLabel ( trigger::size_type  index) const
inline

Definition at line 113 of file TriggerEvent.h.

References heavyIonCSV_trainingSettings::idx, makeGlobalPositionRcd_cfg::tag, and triggerFilters_.

Referenced by pat::PATTriggerProducer::produce().

113  {
114  std::string_view tag = triggerFilters_.at(index).filterTag_;
115  auto const idx = tag.find(':');
116  return (idx == tag.npos ? tag : tag.substr(0, idx));
117  }
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ filterTag()

const edm::InputTag trigger::TriggerEvent::filterTag ( trigger::size_type  index) const
inline

Definition at line 109 of file TriggerEvent.h.

References ProducerED_cfi::InputTag, and triggerFilters_.

Referenced by addFilter(), EwkMuLumiMonitorDQM::analyze(), DQMHcalIsoTrackAlCaReco::analyze(), FourVectorHLT::analyze(), HeavyFlavorValidation::analyze(), and filterIndex().

109  {
110  return edm::InputTag(triggerFilters_.at(index).filterTag_);
111  }
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ filterTagEncoded()

const std::string& trigger::TriggerEvent::filterTagEncoded ( trigger::size_type  index) const
inline

Definition at line 112 of file TriggerEvent.h.

References triggerFilters_.

112 { return triggerFilters_.at(index).filterTag_; }
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:56

◆ getObjects()

const TriggerObjectCollection& trigger::TriggerEvent::getObjects ( ) const
inline

◆ sizeCollections()

trigger::size_type trigger::TriggerEvent::sizeCollections ( ) const
inline

other

Definition at line 145 of file TriggerEvent.h.

References collectionTags_.

Referenced by pat::PATTriggerProducer::produce().

145 { return collectionTags_.size(); }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:50

◆ sizeFilters()

trigger::size_type trigger::TriggerEvent::sizeFilters ( ) const
inline

◆ sizeObjects()

trigger::size_type trigger::TriggerEvent::sizeObjects ( ) const
inline

Definition at line 146 of file TriggerEvent.h.

References triggerObjects_.

Referenced by pat::PATTriggerProducer::produce(), and TriggerSummaryProducerAOD::produce().

146 { return triggerObjects_.size(); }
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:54

◆ usedProcessName()

const std::string& trigger::TriggerEvent::usedProcessName ( ) const
inline

Member Data Documentation

◆ collectionKeys_

Keys trigger::TriggerEvent::collectionKeys_
private

1-past-end indices into linearised vector

Definition at line 52 of file TriggerEvent.h.

Referenced by addCollections(), collectionKey(), collectionKeys(), and TriggerEvent().

◆ collectionTags_

std::vector<std::string> trigger::TriggerEvent::collectionTags_
private

Input tags of packed up collections.

Definition at line 50 of file TriggerEvent.h.

Referenced by addCollections(), collectionIndex(), collectionTag(), collectionTagEncoded(), collectionTags(), sizeCollections(), and TriggerEvent().

◆ triggerFilters_

std::vector<TriggerFilterObject> trigger::TriggerEvent::triggerFilters_
private

collection of all TriggerFilterObjects

Definition at line 56 of file TriggerEvent.h.

Referenced by addFilter(), filterIds(), filterIndex(), filterKeys(), filterLabel(), filterTag(), filterTagEncoded(), sizeFilters(), and TriggerEvent().

◆ triggerObjects_

TriggerObjectCollection trigger::TriggerEvent::triggerObjects_
private

collection of all unique physics objects (linearised vector)

Definition at line 54 of file TriggerEvent.h.

Referenced by addObjects(), getObjects(), sizeObjects(), and TriggerEvent().

◆ usedProcessName_

std::string trigger::TriggerEvent::usedProcessName_
private

data members

processName used to select products packed up

Definition at line 48 of file TriggerEvent.h.

Referenced by usedProcessName().