CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trigger::HLTPrescaleTable Class Reference

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

#include <HLTPrescaleTable.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

The single EDProduct containing the HLT Prescale Table.

The single EDProduct containing the HLT Prescale Table

Author
Martin Grunewald

Definition at line 20 of file HLTPrescaleTable.h.

Constructor & Destructor Documentation

◆ HLTPrescaleTable() [1/2]

trigger::HLTPrescaleTable::HLTPrescaleTable ( )
inline

default constructor

Definition at line 50 of file HLTPrescaleTable.h.

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

◆ HLTPrescaleTable() [2/2]

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 53 of file HLTPrescaleTable.h.

References cms::cuda::assert(), cuy::ib, labels_, genParticles_cff::map, dqmiodumpmetadata::n, set_, AlCaHLTBitMon_QueryRunRegistry::string, and table_.

56  : set_(set), labels_(labels), table_(table) {
58  const unsigned int n(labels_.size());
59  assert((((set_ == 0) && (n == 0)) || (set_ < n)));
60  const std::map<std::string, std::vector<unsigned int> >::const_iterator ib(table_.begin());
61  const std::map<std::string, std::vector<unsigned int> >::const_iterator ie(table_.end());
62  for (std::map<std::string, std::vector<unsigned int> >::const_iterator it = ib; it != ie; ++it) {
63  assert(it->second.size() == n);
64  }
65  }
const std::vector< std::string > & labels() const
assert(be >=bs)
std::map< std::string, std::vector< unsigned int > > table_
prescale sets keyed on trigger path name
const std::map< std::string, std::vector< unsigned int > > & table() const
unsigned int set_
data members
ib
Definition: cuy.py:661
std::vector< std::string > labels_
names of prescale sets

Member Function Documentation

◆ isProductEqual()

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

merge rule - just checking equality

Definition at line 68 of file HLTPrescaleTable.h.

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

68  {
69  return ((set() == that.set()) && (labels() == that.labels()) && (table() == that.table()));
70  }
const std::vector< std::string > & labels() const
const std::map< std::string, std::vector< unsigned int > > & table() const

◆ labels()

const std::vector<std::string>& trigger::HLTPrescaleTable::labels ( ) const
inline

◆ prescale() [1/2]

unsigned int trigger::HLTPrescaleTable::prescale ( const std::string &  trigger) const
inline

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

Definition at line 37 of file HLTPrescaleTable.h.

References prescale(), and set_.

Referenced by prescale(), and HLTConfigData::prescaleValue().

37 { return prescale(set_, trigger); }
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
unsigned int set_
data members

◆ prescale() [2/2]

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 40 of file HLTPrescaleTable.h.

References table_.

40  {
41  const std::map<std::string, std::vector<unsigned int> >::const_iterator it(table_.find(trigger));
42  if ((it == table_.end()) || (set >= it->second.size())) {
43  return 1;
44  } else {
45  return it->second[set];
46  }
47  }
std::map< std::string, std::vector< unsigned int > > table_
prescale sets keyed on trigger path name

◆ set()

unsigned int trigger::HLTPrescaleTable::set ( ) const
inline

low-level const accessors for data members

Definition at line 73 of file HLTPrescaleTable.h.

References set_.

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

73 { return set_; }
unsigned int set_
data members

◆ size()

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 34 of file HLTPrescaleTable.h.

References labels_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), HLTConfigData::dump(), HLTPrescaleRecorder::endRun(), and HLTConfigData::prescaleSize().

34 { return labels_.size(); }
std::vector< std::string > labels_
names of prescale sets

◆ table()

const std::map<std::string, std::vector<unsigned int> >& trigger::HLTPrescaleTable::table ( ) const
inline

Member Data Documentation

◆ labels_

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

names of prescale sets

Definition at line 26 of file HLTPrescaleTable.h.

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

◆ set_

unsigned int trigger::HLTPrescaleTable::set_
private

data members

index number of default prescale set to use

Definition at line 24 of file HLTPrescaleTable.h.

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

◆ table_

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

prescale sets keyed on trigger path name

Definition at line 28 of file HLTPrescaleTable.h.

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