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.

◆ 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.

66  triggerFilters_() {
67  collectionTags_.reserve(nc);
68  collectionKeys_.reserve(nc);
69  triggerObjects_.reserve(no);
70  triggerFilters_.reserve(nf);
71  }

References collectionKeys_, collectionTags_, triggerFilters_, and triggerObjects_.

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.

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  }

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

◆ 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.

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  }

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

◆ addFilter()

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

Definition at line 93 of file TriggerEvent.h.

93  {
94  triggerFilters_.push_back(TriggerFilterObject(filterTag, filterIds, filterKeys));
95  }

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

◆ addObjects()

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

setters

Definition at line 74 of file TriggerEvent.h.

74  {
75  triggerObjects_.insert(triggerObjects_.end(), triggerObjects.begin(), triggerObjects.end());
76  }

References triggerMatchMonitor_cfi::triggerObjects, and triggerObjects_.

◆ 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.

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  }

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

◆ collectionKey()

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

Definition at line 107 of file TriggerEvent.h.

107 { return collectionKeys_.at(index); }

References collectionKeys_.

◆ collectionKeys()

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

Definition at line 100 of file TriggerEvent.h.

100 { return collectionKeys_; }

References collectionKeys_.

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

◆ collectionTag()

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

Definition at line 103 of file TriggerEvent.h.

103  {
104  return edm::InputTag(collectionTags_.at(index));
105  }

References collectionTags_, and HLT_FULL_cff::InputTag.

Referenced by collectionIndex().

◆ collectionTagEncoded()

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

Definition at line 106 of file TriggerEvent.h.

106 { return collectionTags_.at(index); }

References collectionTags_.

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

◆ collectionTags()

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

Definition at line 99 of file TriggerEvent.h.

99 { return collectionTags_; }

References collectionTags_.

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

◆ filterIds()

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

◆ filterIndex()

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

◆ 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.

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  }

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

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

◆ 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.

111 { return triggerFilters_.at(index).filterTag_; }

References triggerFilters_.

◆ 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.

144 { return collectionTags_.size(); }

References collectionTags_.

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

◆ 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.

145 { return triggerObjects_.size(); }

References triggerObjects_.

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

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

mps_fire.i
i
Definition: mps_fire.py:428
trigger::TriggerEvent::filterKeys
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
trigger::TriggerEvent::collectionTags_
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:49
triggerMatchMonitor_cfi.triggerObjects
triggerObjects
Definition: triggerMatchMonitor_cfi.py:15
trigger::TriggerEvent::collectionKeys
const Keys & collectionKeys() const
Definition: TriggerEvent.h:100
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
cms::cuda::assert
assert(be >=bs)
trigger::TriggerEvent::collectionTag
const edm::InputTag collectionTag(trigger::size_type index) const
Definition: TriggerEvent.h:103
trigger::TriggerEvent::collectionTags
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:99
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
trigger::TriggerEvent::filterTag
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:108
trigger::TriggerEvent::triggerObjects_
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:53
trigger::TriggerEvent::collectionKeys_
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:51
trigger::TriggerEvent::triggerFilters_
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:55
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
trigger::TriggerEvent::usedProcessName_
std::string usedProcessName_
data members
Definition: TriggerEvent.h:47
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trigger::TriggerEvent::filterIds
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:117
alcaDQMUpload.encode
def encode(args, files)
Definition: alcaDQMUpload.py:32
trigger::TriggerEvent::usedProcessName
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:98
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46