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

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.

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 alcaDQMUpload::encode(), mps_fire::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  }
const std::vector< std::string > & collectionTags() const
Definition: TriggerEvent.h:96
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
def encode(args, files)
void trigger::TriggerEvent::addCollections ( const std::vector< std::string > &  collectionTags,
const Keys collectionKeys 
)
inline

Definition at line 86 of file TriggerEvent.h.

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
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 trigger::TriggerEvent::TriggerFilterObject::TriggerFilterObject().

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.

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 edm::InputTag::encode(), mps_fire::i, gen::n, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by HLTSummaryFilter::hltFilter().

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  }
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:165
trigger::size_type trigger::TriggerEvent::collectionKey ( trigger::size_type  index) const
inline

Definition at line 102 of file TriggerEvent.h.

Referenced by TriggerSummaryAnalyzerAOD::analyze(), and 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_.

Referenced by HLTSummaryFilter::hltFilter(), and pat::PATTriggerProducer::produce().

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.

Referenced by TriggerSummaryAnalyzerAOD::analyze().

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.

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

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 HltDiff::compare(), and 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
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(), trigger::TriggerEvent::TriggerFilterObject::filterTag_, mps_fire::i, gen::n, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SUSY_HLT_InclusiveHT::analyze(), SUSY_HLT_PhotonHT::analyze(), SUSY_HLT_Muon_BJet::analyze(), SUSY_HLT_DoubleMuon_Hadronic::analyze(), SUSY_HLT_DoubleEle_Hadronic::analyze(), SUSY_HLT_Electron_BJet::analyze(), SUSY_HLT_alphaT::analyze(), SUSY_HLT_Muon_Hadronic::analyze(), SUSY_HLT_MuonFakes::analyze(), SUSY_HLT_VBF_Mu::analyze(), SUSY_HLT_DiJet_MET::analyze(), SUSY_HLT_ElecFakes::analyze(), SUSY_HLT_MuEle_Hadronic::analyze(), SUSY_HLT_Razor::analyze(), HotlineDQM::analyze(), FourVectorHLT::analyze(), DQMExample_Step1::analyze(), SUSY_HLT_SingleLepton::analyze(), HLTObjectMonitorProtonLead::analyze(), ErsatzMEt::analyze(), HLTObjectMonitor::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), GeneralHLTOffline::fillHltMatrix(), egHLT::trigTools::fillHLTposition(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforMonAllTrigger(), JetMETHLTOfflineSource::fillMEforTriggerNTfired(), ZeeCandidateFilter::filter(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), HLTTauDQMPath::getFilterObjects(), egHLT::trigTools::getFiltersPassed(), HLTSummaryFilter::hltFilter(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), JetMETHLTOfflineSource::isTriggerObjectFound(), L1Muon2RecoTreeProducer::match_trigger(), L1MuonRecoTreeProducer::match_trigger(), L1TEfficiencyMuons_Offline::matchHlt(), print_trigger_candidates(), CandidateTriggerObjectProducer::produce(), pat::PATTriggerProducer::produce(), 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  }
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:165
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:57
const Keys& trigger::TriggerEvent::filterKeys ( trigger::size_type  index) const
inline

Definition at line 111 of file TriggerEvent.h.

Referenced by TriggerSummaryAnalyzerAOD::analyze(), SUSY_HLT_InclusiveHT::analyze(), SUSY_HLT_PhotonHT::analyze(), EwkMuLumiMonitorDQM::analyze(), SUSY_HLT_DoubleMuon_Hadronic::analyze(), SUSY_HLT_Muon_BJet::analyze(), SUSY_HLT_Electron_BJet::analyze(), SUSY_HLT_DoubleEle_Hadronic::analyze(), SUSY_HLT_alphaT::analyze(), SUSY_HLT_DiJet_MET::analyze(), SUSY_HLT_ElecFakes::analyze(), SUSY_HLT_MuEle_Hadronic::analyze(), SUSY_HLT_Muon_Hadronic::analyze(), SUSY_HLT_MuonFakes::analyze(), SUSY_HLT_VBF_Mu::analyze(), HotlineDQM::analyze(), SUSY_HLT_Razor::analyze(), DQMHcalIsoTrackAlCaReco::analyze(), MuTriggerAnalyzer::analyze(), FourVectorHLT::analyze(), DQMExample_Step1::analyze(), SUSY_HLT_SingleLepton::analyze(), HeavyFlavorValidation::analyze(), IsoTrig::analyze(), HLTObjectMonitorProtonLead::analyze(), HLTObjectMonitor::analyze(), ZToMuMuGammaAnalyzer::analyze(), PhotonAnalyzer::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), electronSelector(), egHLT::trigTools::fillHLTposition(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforMonAllTrigger(), ZeeCandidateFilter::filter(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), HLTTauDQMPath::getFilterObjects(), egHLT::trigTools::getFiltersPassed(), HLTSummaryFilter::hltFilter(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), JetMETHLTOfflineSource::isTriggerObjectFound(), L1Muon2RecoTreeProducer::match_trigger(), L1MuonRecoTreeProducer::match_trigger(), L1TEfficiencyMuons_Offline::matchHlt(), ZGoldenFilter::operator()(), print_trigger_candidates(), CandidateTriggerObjectProducer::produce(), pat::PATTriggerProducer::produce(), HLTMuonMatchAndPlot::selectedTriggerObjects(), and egHLT::trigTools::setFiltersObjPasses().

111 {return triggerFilters_.at(index).filterKeys_;}
std::vector< TriggerFilterObject > triggerFilters_
collection of all TriggerFilterObjects
Definition: TriggerEvent.h:57
std::string trigger::TriggerEvent::filterLabel ( trigger::size_type  index) const
inline

Definition at line 105 of file TriggerEvent.h.

References training_settings::idx, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

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

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
const edm::InputTag trigger::TriggerEvent::filterTag ( trigger::size_type  index) const
inline
const std::string& trigger::TriggerEvent::filterTagEncoded ( trigger::size_type  index) const
inline

Definition at line 104 of file TriggerEvent.h.

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

Definition at line 98 of file TriggerEvent.h.

References triggerObjects_.

Referenced by TriggerSummaryAnalyzerAOD::analyze(), SUSY_HLT_InclusiveHT::analyze(), SUSY_HLT_PhotonHT::analyze(), EwkMuLumiMonitorDQM::analyze(), SUSY_HLT_DoubleMuon_Hadronic::analyze(), SUSY_HLT_Muon_BJet::analyze(), SUSY_HLT_Electron_BJet::analyze(), SUSY_HLT_DoubleEle_Hadronic::analyze(), SUSY_HLT_alphaT::analyze(), SUSY_HLT_ElecFakes::analyze(), SUSY_HLT_MuEle_Hadronic::analyze(), SUSY_HLT_Muon_Hadronic::analyze(), SUSY_HLT_MuonFakes::analyze(), SUSY_HLT_VBF_Mu::analyze(), SUSY_HLT_DiJet_MET::analyze(), SUSY_HLT_Razor::analyze(), HotlineDQM::analyze(), DQMHcalIsoTrackAlCaReco::analyze(), MuTriggerAnalyzer::analyze(), FourVectorHLT::analyze(), DQMExample_Step1::analyze(), SUSY_HLT_SingleLepton::analyze(), HeavyFlavorValidation::analyze(), HLTMuonMatchAndPlot::analyze(), IsoTrig::analyze(), L1Muon2RecoTreeProducer::analyze(), HLTObjectMonitorProtonLead::analyze(), HLTObjectMonitor::analyze(), PhotonAnalyzer::analyze(), L1MuonRecoTreeProducer::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), electronSelector(), egHLT::trigTools::fillHLTposition(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforMonAllTrigger(), ZeeCandidateFilter::filter(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), HLTTauDQMPath::getFilterObjects(), HLTSummaryFilter::hltFilter(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), L1TEfficiencyMuons_Offline::matchHlt(), ZGoldenFilter::operator()(), print_trigger_candidates(), print_trigger_collection(), CandidateTriggerObjectProducer::produce(), pat::PATTriggerProducer::produce(), and egHLT::trigTools::setFiltersObjPasses().

98 {return triggerObjects_;}
TriggerObjectCollection triggerObjects_
collection of all unique physics objects (linearised vector)
Definition: TriggerEvent.h:55
trigger::size_type trigger::TriggerEvent::sizeCollections ( ) const
inline

other

Definition at line 133 of file TriggerEvent.h.

Referenced by TriggerSummaryAnalyzerAOD::analyze(), and pat::PATTriggerProducer::produce().

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

Definition at line 135 of file TriggerEvent.h.

Referenced by TriggerSummaryAnalyzerAOD::analyze(), SUSY_HLT_InclusiveHT::analyze(), EwkMuLumiMonitorDQM::analyze(), SUSY_HLT_Muon_BJet::analyze(), SUSY_HLT_DoubleMuon_Hadronic::analyze(), SUSY_HLT_DoubleEle_Hadronic::analyze(), SUSY_HLT_Electron_BJet::analyze(), SUSY_HLT_alphaT::analyze(), SUSY_HLT_MuEle_Hadronic::analyze(), SUSY_HLT_Muon_Hadronic::analyze(), SUSY_HLT_MuonFakes::analyze(), SUSY_HLT_VBF_Mu::analyze(), SUSY_HLT_DiJet_MET::analyze(), SUSY_HLT_ElecFakes::analyze(), SUSY_HLT_Razor::analyze(), HotlineDQM::analyze(), DQMHcalIsoTrackAlCaReco::analyze(), MuTriggerAnalyzer::analyze(), FourVectorHLT::analyze(), DQMExample_Step1::analyze(), HeavyFlavorValidation::analyze(), SUSY_HLT_SingleLepton::analyze(), IsoTrig::analyze(), HLTObjectMonitorProtonLead::analyze(), HLTObjectMonitor::analyze(), ZToMuMuGammaAnalyzer::analyze(), PhotonAnalyzer::analyze(), GeneralHLTOffline::fillHltMatrix(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforMonAllTrigger(), ZeeCandidateFilter::filter(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >::getFilteredCands(), HLTTauDQMPath::getFilterObjects(), HSCPHLTFilter::IncreasedTreshold(), HSCPValidator::IncreasedTreshold(), JetMETHLTOfflineSource::isTriggerObjectFound(), ZGoldenFilter::operator()(), print_trigger_candidates(), pat::PATTriggerProducer::produce(), TriggerSummaryProducerAOD::produce(), and HLTMuonMatchAndPlot::selectedTriggerObjects().

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

Definition at line 134 of file TriggerEvent.h.

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

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

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

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

Input tags of packed up collections.

Definition at line 51 of file TriggerEvent.h.

Referenced by collectionTags().

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

collection of all TriggerFilterObjects

Definition at line 57 of file TriggerEvent.h.

TriggerObjectCollection trigger::TriggerEvent::triggerObjects_
private

collection of all unique physics objects (linearised vector)

Definition at line 55 of file TriggerEvent.h.

Referenced by getObjects().

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