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_() {}

◆ 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.

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  }

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

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.

68  {
69  return ((set() == that.set()) && (labels() == that.labels()) && (table() == that.table()));
70  }

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

◆ 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.

37 { return prescale(set_, trigger); }

References prescale(), and set_.

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

◆ 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.

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  }

References set(), and table_.

◆ set()

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

low-level const accessors for data members

Definition at line 73 of file HLTPrescaleTable.h.

73 { return set_; }

References set_.

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

◆ 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.

34 { return labels_.size(); }

References labels_.

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

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

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
cms::cuda::assert
assert(be >=bs)
trigger::HLTPrescaleTable::set
unsigned int set() const
low-level const accessors for data members
Definition: HLTPrescaleTable.h:73
trigger::HLTPrescaleTable::table_
std::map< std::string, std::vector< unsigned int > > table_
prescale sets keyed on trigger path name
Definition: HLTPrescaleTable.h:28
trigger::HLTPrescaleTable::set_
unsigned int set_
data members
Definition: HLTPrescaleTable.h:24
trigger::HLTPrescaleTable::table
const std::map< std::string, std::vector< unsigned int > > & table() const
Definition: HLTPrescaleTable.h:75
cuy.ib
ib
Definition: cuy.py:661
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trigger::HLTPrescaleTable::prescale
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
Definition: HLTPrescaleTable.h:37
trigger
Definition: HLTPrescaleTableCond.h:8
trigger::HLTPrescaleTable::labels
const std::vector< std::string > & labels() const
Definition: HLTPrescaleTable.h:74
genParticles_cff.map
map
Definition: genParticles_cff.py:11
trigger::HLTPrescaleTable::labels_
std::vector< std::string > labels_
names of prescale sets
Definition: HLTPrescaleTable.h:26