CMS 3D CMS Logo

Public Member Functions | Private Attributes

trigger::HLTPrescaleTable Class Reference

The single EDProduct containing the HLT Prescale Table. More...

#include <HLTPrescaleTable.h>

List of all members.

Public Member Functions

 HLTPrescaleTable ()
 default constructor
 HLTPrescaleTable (unsigned int set, const std::vector< std::string > &labels, const std::map< std::string, std::vector< unsigned int > > &table)
 real constructor taking payload
bool isProductEqual (const HLTPrescaleTable &that) const
 merge rule - just checking equality
const std::vector< std::string > & labels () const
unsigned int prescale (const std::string &trigger) const
 high-level user access method: prescale for given trigger path
unsigned int prescale (unsigned int set, const std::string &trigger) const
 high-level user access method: prescale for given trigger path
unsigned int set () const
 low-level const accessors for data members
unsigned int size () const
 consistency condition: all vectors must have the same length
const std::map< std::string,
std::vector< unsigned int > > & 
table () const

Private Attributes

std::vector< std::string > labels_
 names of prescale sets
unsigned int set_
 data members
std::map< std::string,
std::vector< unsigned int > > 
table_
 prescale sets keyed on trigger path name

Detailed Description

The single EDProduct containing the HLT Prescale Table.

The single EDProduct containing the HLT Prescale Table

Date:
2010/10/14 23:00:36
Revision:
1.7
Author:
Martin Grunewald

Definition at line 23 of file HLTPrescaleTable.h.


Constructor & Destructor Documentation

trigger::HLTPrescaleTable::HLTPrescaleTable ( ) [inline]

default constructor

Definition at line 57 of file HLTPrescaleTable.h.

: set_(0), labels_(), table_() { }
trigger::HLTPrescaleTable::HLTPrescaleTable ( unsigned int  set,
const std::vector< std::string > &  labels,
const std::map< std::string, std::vector< unsigned int > > &  table 
) [inline]

real constructor taking payload

checking consistency

Definition at line 60 of file HLTPrescaleTable.h.

References labels_, Association::map, n, set_, and table_.

                                                                                                                                   :
     set_(set), labels_(labels), table_(table) {
      const unsigned int n(labels_.size());
      assert((((set_==0)&&(n==0)) || (set_<n)));
      const std::map<std::string,std::vector<unsigned int> >::const_iterator ib(table_.begin());
      const std::map<std::string,std::vector<unsigned int> >::const_iterator ie(table_.end());
      for (std::map<std::string,std::vector<unsigned int> >::const_iterator it=ib; it!=ie; ++it) {
        assert (it->second.size()==n);
      }
    }

Member Function Documentation

bool trigger::HLTPrescaleTable::isProductEqual ( const HLTPrescaleTable that) const [inline]

merge rule - just checking equality

Definition at line 73 of file HLTPrescaleTable.h.

References labels(), set(), and table().

                                                            {
      return ((set()==that.set()) && (labels()==that.labels()) && (table()==that.table()));
    }
const std::vector<std::string>& trigger::HLTPrescaleTable::labels ( ) const [inline]
unsigned int trigger::HLTPrescaleTable::prescale ( const std::string &  trigger) const [inline]

high-level user access method: prescale for given trigger path

Definition at line 42 of file HLTPrescaleTable.h.

References set_.

Referenced by HLTConfigData::prescaleValue().

                                                          {
      return prescale(set_,trigger);
    }
unsigned int trigger::HLTPrescaleTable::prescale ( unsigned int  set,
const std::string &  trigger 
) const [inline]

high-level user access method: prescale for given trigger path

Definition at line 47 of file HLTPrescaleTable.h.

References table_.

                                                                            {
      const std::map<std::string,std::vector<unsigned int> >::const_iterator it(table_.find(trigger));
      if ((it==table_.end()) || (set>=it->second.size())) {
        return 1;
      } else {
        return it->second[set];
      }
    }
unsigned int trigger::HLTPrescaleTable::set ( ) const [inline]

low-level const accessors for data members

Definition at line 78 of file HLTPrescaleTable.h.

References set_.

Referenced by pat::PATTriggerProducer::beginLuminosityBlock(), isProductEqual(), and pat::PATTriggerProducer::produce().

{return set_;}
unsigned int trigger::HLTPrescaleTable::size ( void  ) const [inline]

consistency condition: all vectors must have the same length

methods number of prescale sets available

Definition at line 39 of file HLTPrescaleTable.h.

References labels_.

Referenced by HLTConfigData::dump(), HLTPrescaleRecorder::endRun(), and HLTConfigData::prescaleSize().

{return labels_.size();}
const std::map<std::string,std::vector<unsigned int> >& trigger::HLTPrescaleTable::table ( ) const [inline]

Member Data Documentation

std::vector<std::string> trigger::HLTPrescaleTable::labels_ [private]

names of prescale sets

Definition at line 30 of file HLTPrescaleTable.h.

Referenced by HLTPrescaleTable(), labels(), and size().

unsigned int trigger::HLTPrescaleTable::set_ [private]

data members

index number of default prescale set to use

Definition at line 28 of file HLTPrescaleTable.h.

Referenced by HLTPrescaleTable(), prescale(), and set().

std::map<std::string,std::vector<unsigned int> > trigger::HLTPrescaleTable::table_ [private]

prescale sets keyed on trigger path name

Definition at line 32 of file HLTPrescaleTable.h.

Referenced by HLTPrescaleTable(), prescale(), and table().