CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Date:
2012/08/02 10:10:11
Revision:
1.16
Author
Martin Grunewald

Definition at line 27 of file TriggerEvent.h.

Constructor & Destructor Documentation

trigger::TriggerEvent::TriggerEvent ( )
inline

methods

constructors

Definition at line 64 of file TriggerEvent.h.

std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:57
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
std::string usedProcessName_
data members
Definition: TriggerEvent.h:51
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
trigger::TriggerEvent::TriggerEvent ( const std::string &  usedProcessName,
trigger::size_type  nc,
trigger::size_type  no,
trigger::size_type  nf 
)
inline

Definition at line 65 of file TriggerEvent.h.

References collectionKeys_, collectionTags_, triggerFilters_, and triggerObjects_.

65  :
69  triggerObjects_(),
71  {
72  collectionTags_.reserve(nc); collectionKeys_.reserve(nc);
73  triggerObjects_.reserve(no); triggerFilters_.reserve(nf);
74  }
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:57
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:97
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
std::string usedProcessName_
data members
Definition: TriggerEvent.h:51
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59

Member Function Documentation

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

Definition at line 79 of file TriggerEvent.h.

References collectionKeys_, collectionTags_, alcaDQMUpload::encode(), i, and 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  }
int i
Definition: DBlmapReader.cc:9
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:98
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
uint16_t size_type
const Keys & collectionKeys() const
Definition: TriggerEvent.h:99
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
void trigger::TriggerEvent::addCollections ( const std::vector< std::string > &  collectionTags,
const Keys collectionKeys 
)
inline

Definition at line 88 of file TriggerEvent.h.

References collectionKeys_, 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:98
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
const Keys & collectionKeys() const
Definition: TriggerEvent.h:99
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
void trigger::TriggerEvent::addFilter ( const edm::InputTag filterTag,
const Vids filterIds,
const Keys filterKeys 
)
inline

Definition at line 94 of file TriggerEvent.h.

References triggerFilters_.

94 {triggerFilters_.push_back(TriggerFilterObject(filterTag, filterIds, filterKeys));}
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:113
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:112
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
void trigger::TriggerEvent::addObjects ( const TriggerObjectCollection triggerObjects)
inline

setters

Definition at line 77 of file TriggerEvent.h.

References triggerObjects_.

77 {triggerObjects_.insert(triggerObjects_.end(), triggerObjects.begin(), triggerObjects.end());}
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:57
trigger::size_type trigger::TriggerEvent::collectionIndex ( const edm::InputTag collectionTag) const
inline

find index of collection from collection tag

Definition at line 116 of file TriggerEvent.h.

References collectionTags_, edm::InputTag::encode(), i, and n.

116  {
117  const std::string encodedCollectionTag(collectionTag.encode());
118  const trigger::size_type n(collectionTags_.size());
119  for (trigger::size_type i=0; i!=n; ++i) {
120  if (encodedCollectionTag==collectionTags_[i]) {return i;}
121  }
122  return n;
123  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:72
trigger::size_type trigger::TriggerEvent::collectionKey ( trigger::size_type  index) const
inline

Definition at line 104 of file TriggerEvent.h.

References collectionKeys_.

104 {return collectionKeys_.at(index);}
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
const Keys& trigger::TriggerEvent::collectionKeys ( ) const
inline

Definition at line 99 of file TriggerEvent.h.

References collectionKeys_.

99 {return collectionKeys_;}
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:55
const edm::InputTag trigger::TriggerEvent::collectionTag ( trigger::size_type  index) const
inline

Definition at line 102 of file TriggerEvent.h.

References collectionTags_.

102 {return edm::InputTag(collectionTags_.at(index));}
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
const std::string& trigger::TriggerEvent::collectionTagEncoded ( trigger::size_type  index) const
inline

Definition at line 103 of file TriggerEvent.h.

References collectionTags_.

103 {return collectionTags_.at(index);}
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
const std::vector<std::string>& trigger::TriggerEvent::collectionTags ( ) const
inline

Definition at line 98 of file TriggerEvent.h.

References collectionTags_.

98 {return collectionTags_;}
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
const Vids& trigger::TriggerEvent::filterIds ( trigger::size_type  index) const
inline

Definition at line 112 of file TriggerEvent.h.

References triggerFilters_.

Referenced by HSCPHLTFilter::IncreasedTreshold(), and HSCPValidator::IncreasedTreshold().

112 {return triggerFilters_.at(index).filterIds_;}
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
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 125 of file TriggerEvent.h.

References edm::InputTag::encode(), i, n, and triggerFilters_.

Referenced by egHLT::trigTools::fillHLTposition(), egHLT::trigTools::getFiltersPassed(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), HLTMuonMatchAndPlot::selectedTriggerObjects(), and egHLT::trigTools::setFiltersObjPasses().

125  {
126  const std::string encodedFilterTag(filterTag.encode());
127  const trigger::size_type n(triggerFilters_.size());
128  for (trigger::size_type i=0; i!=n; ++i) {
129  if (encodedFilterTag==triggerFilters_[i].filterTag_) {return i;}
130  }
131  return n;
132  }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:72
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
const Keys& trigger::TriggerEvent::filterKeys ( trigger::size_type  index) const
inline
std::string trigger::TriggerEvent::filterLabel ( trigger::size_type  index) const
inline

Definition at line 107 of file TriggerEvent.h.

References GlobalPosition_Frontier_DevDB_cff::tag, and triggerFilters_.

107  {
108  const std::string & tag = triggerFilters_.at(index).filterTag_;
109  std::string::size_type idx = tag.find(':');
110  return (idx == std::string::npos ? tag : tag.substr(0,idx));
111  }
uint16_t size_type
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
const edm::InputTag trigger::TriggerEvent::filterTag ( trigger::size_type  index) const
inline

Definition at line 105 of file TriggerEvent.h.

References triggerFilters_.

105 {return edm::InputTag(triggerFilters_.at(index).filterTag_);}
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
const std::string& trigger::TriggerEvent::filterTagEncoded ( trigger::size_type  index) const
inline

Definition at line 106 of file TriggerEvent.h.

References triggerFilters_.

106 {return triggerFilters_.at(index).filterTag_;}
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
const TriggerObjectCollection& trigger::TriggerEvent::getObjects ( ) const
inline
trigger::size_type trigger::TriggerEvent::sizeCollections ( ) const
inline

other

Definition at line 135 of file TriggerEvent.h.

References collectionTags_.

135 {return collectionTags_.size();}
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:53
trigger::size_type trigger::TriggerEvent::sizeFilters ( ) const
inline

Definition at line 137 of file TriggerEvent.h.

References triggerFilters_.

Referenced by HLTTauDQMLitePathPlotter::getFilterCollection(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), and HLTMuonMatchAndPlot::selectedTriggerObjects().

137 {return triggerFilters_.size();}
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:59
trigger::size_type trigger::TriggerEvent::sizeObjects ( ) const
inline

Definition at line 136 of file TriggerEvent.h.

References triggerObjects_.

136 {return triggerObjects_.size();}
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:57
const std::string& trigger::TriggerEvent::usedProcessName ( ) const
inline

getters

Definition at line 97 of file TriggerEvent.h.

References usedProcessName_.

97 {return usedProcessName_;}
std::string usedProcessName_
data members
Definition: TriggerEvent.h:51

Member Data Documentation

Keys trigger::TriggerEvent::collectionKeys_
private

1-past-end indices into linearised vector

Definition at line 55 of file TriggerEvent.h.

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

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

Input tags of packed up collections.

Definition at line 53 of file TriggerEvent.h.

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

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

collection of all TriggerFilterObjects

Definition at line 59 of file TriggerEvent.h.

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

TriggerObjectCollection trigger::TriggerEvent::triggerObjects_
private

collection of all unique physics objects (linearised vector)

Definition at line 57 of file TriggerEvent.h.

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

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

data members

processName used to select products packed up

Definition at line 51 of file TriggerEvent.h.

Referenced by usedProcessName().