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 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 25 of file TriggerEvent.h.

Constructor & Destructor Documentation

◆ TriggerEvent() [1/2]

trigger::TriggerEvent::TriggerEvent ( )
inline

methods

constructors

Definition at line 60 of file TriggerEvent.h.

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

◆ 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 61 of file TriggerEvent.h.

References collectionKeys_, collectionTags_, triggerFilters_, and triggerObjects_.

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

Member Function Documentation

◆ addCollections() [1/2]

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

Definition at line 78 of file TriggerEvent.h.

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

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

◆ addCollections() [2/2]

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

Definition at line 87 of file TriggerEvent.h.

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

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

◆ addFilter()

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

Definition at line 93 of file TriggerEvent.h.

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

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

◆ addObjects()

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

setters

Definition at line 74 of file TriggerEvent.h.

References triggerMatchMonitor_cfi::triggerObjects, and triggerObjects_.

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

◆ collectionIndex()

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

find index of collection from collection tag

Definition at line 121 of file TriggerEvent.h.

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

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

◆ collectionKey()

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

Definition at line 107 of file TriggerEvent.h.

References collectionKeys_.

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

◆ collectionKeys()

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

Definition at line 100 of file TriggerEvent.h.

References collectionKeys_.

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

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

◆ collectionTag()

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

Definition at line 103 of file TriggerEvent.h.

References collectionTags_, and HLT_2022v12_cff::InputTag.

Referenced by collectionIndex().

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

◆ collectionTagEncoded()

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

Definition at line 106 of file TriggerEvent.h.

References collectionTags_.

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

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

◆ collectionTags()

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

Definition at line 99 of file TriggerEvent.h.

References collectionTags_.

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

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

◆ filterIds()

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

Definition at line 117 of file TriggerEvent.h.

References triggerFilters_.

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

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

◆ 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 132 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(), HLTObjectMonitorProtonLead::analyze(), HLTObjectMonitor::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().

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

◆ filterKeys()

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

◆ filterLabel()

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

Definition at line 112 of file TriggerEvent.h.

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

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

112  {
113  const std::string& tag = triggerFilters_.at(index).filterTag_;
114  std::string::size_type idx = tag.find(':');
115  return (idx == std::string::npos ? tag : tag.substr(0, idx));
116  }
uint16_t size_type
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:55

◆ filterTag()

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

◆ filterTagEncoded()

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

Definition at line 111 of file TriggerEvent.h.

References triggerFilters_.

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

◆ getObjects()

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

◆ sizeCollections()

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

other

Definition at line 144 of file TriggerEvent.h.

References collectionTags_.

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

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

◆ sizeFilters()

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

◆ sizeObjects()

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

Definition at line 145 of file TriggerEvent.h.

References triggerObjects_.

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

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

◆ 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 51 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 49 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 55 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 53 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 47 of file TriggerEvent.h.

Referenced by usedProcessName().