CMS 3D CMS Logo

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

List of all members.

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
trigger::size_type collectionIndex (const edm::InputTag &collectionTag) const
 find index of collection from collection tag
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
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
trigger::size_type sizeFilters () const
trigger::size_type sizeObjects () const
 TriggerEvent ()
 methods
 TriggerEvent (const std::string &usedProcessName, trigger::size_type nc, trigger::size_type no, trigger::size_type nf)
const std::string & usedProcessName () const
 getters

Private Attributes

Keys collectionKeys_
 1-past-end indices into linearised vector
std::vector< std::string > collectionTags_
 Input tags of packed up collections.
std::vector< TriggerFilterObjecttriggerFilters_
 collection of all TriggerFilterObjects
TriggerObjectCollection triggerObjects_
 collection of all unique physics objects (linearised vector)
std::string usedProcessName_
 data members

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.

trigger::TriggerEvent::TriggerEvent ( const std::string &  usedProcessName,
trigger::size_type  nc,
trigger::size_type  no,
trigger::size_type  nf 
) [inline]

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.

                                                                                                  {
      assert(collectionTags.size()==collectionKeys.size());
      const trigger::size_type n(collectionTags.size());
      for (trigger::size_type i=0; i!=n; ++i) {
        collectionTags_.push_back(collectionTags[i].encode());
      }
      collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
    }
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_.

                                                                                                {
      assert(collectionTags.size()==collectionKeys.size());
      collectionTags_.insert(collectionTags_.end(), collectionTags.begin(), collectionTags.end());
      collectionKeys_.insert(collectionKeys_.end(), collectionKeys.begin(), collectionKeys.end());
    }
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_.

{triggerFilters_.push_back(TriggerFilterObject(filterTag, filterIds, filterKeys));}
void trigger::TriggerEvent::addObjects ( const TriggerObjectCollection triggerObjects) [inline]

setters

Definition at line 77 of file TriggerEvent.h.

References triggerObjects_.

{triggerObjects_.insert(triggerObjects_.end(), triggerObjects.begin(), triggerObjects.end());}
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, n, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                             {
      const std::string encodedCollectionTag(collectionTag.encode());
      const trigger::size_type n(collectionTags_.size());
      for (trigger::size_type i=0; i!=n; ++i) {
        if (encodedCollectionTag==collectionTags_[i]) {return i;}
      }
      return n;
    }
trigger::size_type trigger::TriggerEvent::collectionKey ( trigger::size_type  index) const [inline]

Definition at line 104 of file TriggerEvent.h.

References collectionKeys_.

{return collectionKeys_.at(index);}
const Keys& trigger::TriggerEvent::collectionKeys ( ) const [inline]

Definition at line 99 of file TriggerEvent.h.

References collectionKeys_.

{return collectionKeys_;}
const edm::InputTag trigger::TriggerEvent::collectionTag ( trigger::size_type  index) const [inline]

Definition at line 102 of file TriggerEvent.h.

References collectionTags_.

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

Definition at line 103 of file TriggerEvent.h.

References collectionTags_.

{return collectionTags_.at(index);}
const std::vector<std::string>& trigger::TriggerEvent::collectionTags ( ) const [inline]

Definition at line 98 of file TriggerEvent.h.

References collectionTags_.

{return collectionTags_;}
const Vids& trigger::TriggerEvent::filterIds ( trigger::size_type  index) const [inline]

Definition at line 112 of file TriggerEvent.h.

References triggerFilters_.

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

{return triggerFilters_.at(index).filterIds_;}
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, AlCaHLTBitMon_QueryRunRegistry::string, and triggerFilters_.

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

                                                                     {
      const std::string encodedFilterTag(filterTag.encode());
      const trigger::size_type n(triggerFilters_.size());
      for (trigger::size_type i=0; i!=n; ++i) {
        if (encodedFilterTag==triggerFilters_[i].filterTag_) {return i;}
      }
      return n;
    }
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 UserOptions_cff::idx, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, and triggerFilters_.

                                                        {
        const std::string & tag = triggerFilters_.at(index).filterTag_;
        std::string::size_type idx = tag.find(':');
        return (idx == std::string::npos ? tag : tag.substr(0,idx));
    }
const edm::InputTag trigger::TriggerEvent::filterTag ( trigger::size_type  index) const [inline]

Definition at line 105 of file TriggerEvent.h.

References triggerFilters_.

Referenced by IsoTrig::analyze().

{return edm::InputTag(triggerFilters_.at(index).filterTag_);}
const std::string& trigger::TriggerEvent::filterTagEncoded ( trigger::size_type  index) const [inline]

Definition at line 106 of file TriggerEvent.h.

References triggerFilters_.

{return triggerFilters_.at(index).filterTag_;}
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_.

{return collectionTags_.size();}
trigger::size_type trigger::TriggerEvent::sizeFilters ( ) const [inline]
trigger::size_type trigger::TriggerEvent::sizeObjects ( ) const [inline]

Definition at line 136 of file TriggerEvent.h.

References triggerObjects_.

{return triggerObjects_.size();}
const std::string& trigger::TriggerEvent::usedProcessName ( ) const [inline]

getters

Definition at line 97 of file TriggerEvent.h.

References usedProcessName_.

{return usedProcessName_;}

Member Data Documentation

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

collection of all TriggerFilterObjects

Definition at line 59 of file TriggerEvent.h.

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

collection of all unique physics objects (linearised vector)

Definition at line 57 of file TriggerEvent.h.

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

data members

processName used to select products packed up

Definition at line 51 of file TriggerEvent.h.

Referenced by usedProcessName().