test
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

Author
Martin Grunewald

Definition at line 25 of file TriggerEvent.h.

Constructor & Destructor Documentation

trigger::TriggerEvent::TriggerEvent ( )
inline

methods

constructors

Definition at line 62 of file TriggerEvent.h.

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

Definition at line 63 of file TriggerEvent.h.

References collectionKeys_, collectionTags_, triggerFilters_, and triggerObjects_.

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

Member Function Documentation

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

Definition at line 77 of file TriggerEvent.h.

References assert(), collectionKeys_, collectionTags_, alcaDQMUpload::encode(), i, and gen::n.

77  {
78  assert(collectionTags.size()==collectionKeys.size());
79  const trigger::size_type n(collectionTags.size());
80  for (trigger::size_type i=0; i!=n; ++i) {
81  collectionTags_.push_back(collectionTags[i].encode());
82  }
83  collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
84  }
int i
Definition: DBlmapReader.cc:9
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:96
assert(m_qm.get())
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:51
uint16_t size_type
const Keys & collectionKeys() const
Definition: TriggerEvent.h:97
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:53
void trigger::TriggerEvent::addCollections ( const std::vector< std::string > &  collectionTags,
const Keys collectionKeys 
)
inline

Definition at line 86 of file TriggerEvent.h.

References assert(), collectionKeys_, and collectionTags_.

86  {
87  assert(collectionTags.size()==collectionKeys.size());
88  collectionTags_.insert(collectionTags_.end(), collectionTags.begin(), collectionTags.end());
89  collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
90  }
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:96
assert(m_qm.get())
std::vector< std::string > collectionTags_
Input tags of packed up collections.
Definition: TriggerEvent.h:51
const Keys & collectionKeys() const
Definition: TriggerEvent.h:97
Keys collectionKeys_
1-past-end indices into linearised vector
Definition: TriggerEvent.h:53
void trigger::TriggerEvent::addFilter ( const edm::InputTag filterTag,
const Vids filterIds,
const Keys filterKeys 
)
inline

Definition at line 92 of file TriggerEvent.h.

References triggerFilters_.

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

setters

Definition at line 75 of file TriggerEvent.h.

References triggerObjects_.

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

find index of collection from collection tag

Definition at line 114 of file TriggerEvent.h.

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

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

Definition at line 102 of file TriggerEvent.h.

References collectionKeys_.

Referenced by print_trigger_collection().

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

Definition at line 97 of file TriggerEvent.h.

References collectionKeys_.

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

Definition at line 100 of file TriggerEvent.h.

References collectionTags_, and HLT_25ns14e33_v1_cff::InputTag.

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

Definition at line 101 of file TriggerEvent.h.

References collectionTags_.

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

Definition at line 96 of file TriggerEvent.h.

References collectionTags_.

Referenced by print_trigger_collection().

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

Definition at line 110 of file TriggerEvent.h.

References triggerFilters_.

Referenced by HLTTauDQMPath::getFilterObjects(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), and print_trigger_candidates().

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

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

Referenced by egHLT::trigTools::fillHLTposition(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), HLTTauDQMPath::getFilterObjects(), egHLT::trigTools::getFiltersPassed(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), print_trigger_candidates(), HLTMuonMatchAndPlot::selectedTriggerObjects(), and egHLT::trigTools::setFiltersObjPasses().

123  {
124  const std::string encodedFilterTag(filterTag.encode());
125  const trigger::size_type n(triggerFilters_.size());
126  for (trigger::size_type i=0; i!=n; ++i) {
127  if (encodedFilterTag==triggerFilters_[i].filterTag_) {return i;}
128  }
129  return n;
130  }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:164
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:57
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 105 of file TriggerEvent.h.

References customizeTrackingMonitorSeedNumber::idx, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, and triggerFilters_.

105  {
106  const std::string & tag = triggerFilters_.at(index).filterTag_;
107  std::string::size_type idx = tag.find(':');
108  return (idx == std::string::npos ? tag : tag.substr(0,idx));
109  }
uint16_t size_type
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:57
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
const edm::InputTag trigger::TriggerEvent::filterTag ( trigger::size_type  index) const
inline

Definition at line 103 of file TriggerEvent.h.

References HLT_25ns14e33_v1_cff::InputTag, and triggerFilters_.

Referenced by HcalIsoTrkAnalyzer::analyze(), IsoTrig::analyze(), IsoTrackCalib::analyze(), and IsoTrackCalibration::analyze().

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

Definition at line 104 of file TriggerEvent.h.

References triggerFilters_.

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

other

Definition at line 133 of file TriggerEvent.h.

References collectionTags_.

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

Definition at line 134 of file TriggerEvent.h.

References triggerObjects_.

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

getters

Definition at line 95 of file TriggerEvent.h.

References usedProcessName_.

Referenced by FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands().

95 {return usedProcessName_;}
std::string usedProcessName_
data members
Definition: TriggerEvent.h:49

Member Data Documentation

Keys trigger::TriggerEvent::collectionKeys_
private

1-past-end indices into linearised vector

Definition at line 53 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 51 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 57 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 55 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 49 of file TriggerEvent.h.

Referenced by usedProcessName().