test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 21 of file HLTPrescaleTable.h.

Constructor & Destructor Documentation

trigger::HLTPrescaleTable::HLTPrescaleTable ( )
inline

default constructor

Definition at line 55 of file HLTPrescaleTable.h.

55 : 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
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 58 of file HLTPrescaleTable.h.

References assert(), cuy::ib, labels_, gen::n, set_, AlCaHLTBitMon_QueryRunRegistry::string, and table_.

58  :
61  const unsigned int n(labels_.size());
62  assert((((set_==0)&&(n==0)) || (set_<n)));
63  const std::map<std::string,std::vector<unsigned int> >::const_iterator ib(table_.begin());
64  const std::map<std::string,std::vector<unsigned int> >::const_iterator ie(table_.end());
65  for (std::map<std::string,std::vector<unsigned int> >::const_iterator it=ib; it!=ie; ++it) {
66  assert (it->second.size()==n);
67  }
68  }
unsigned int set() const
low-level const accessors for data members
int ib
Definition: cuy.py:660
assert(m_qm.get())
const std::map< std::string, std::vector< unsigned int > > & table() const
const std::vector< std::string > & labels() const
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

Member Function Documentation

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

merge rule - just checking equality

Definition at line 71 of file HLTPrescaleTable.h.

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

71  {
72  return ((set()==that.set()) && (labels()==that.labels()) && (table()==that.table()));
73  }
unsigned int set() const
low-level const accessors for data members
const std::map< std::string, std::vector< unsigned int > > & table() const
const std::vector< std::string > & labels() const
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 40 of file HLTPrescaleTable.h.

References set_.

Referenced by HLTConfigData::prescaleValue().

40  {
41  return prescale(set_,trigger);
42  }
unsigned int set_
data members
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
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 45 of file HLTPrescaleTable.h.

References set(), and table_.

45  {
46  const std::map<std::string,std::vector<unsigned int> >::const_iterator it(table_.find(trigger));
47  if ((it==table_.end()) || (set>=it->second.size())) {
48  return 1;
49  } else {
50  return it->second[set];
51  }
52  }
unsigned int set() const
low-level const accessors for data members
std::map< std::string, std::vector< unsigned int > > table_
prescale sets keyed on trigger path name
unsigned int trigger::HLTPrescaleTable::set ( ) const
inline
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 37 of file HLTPrescaleTable.h.

References labels_.

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

37 {return labels_.size();}
std::vector< std::string > labels_
names of prescale sets
const std::map<std::string,std::vector<unsigned int> >& trigger::HLTPrescaleTable::table ( ) const
inline

Definition at line 78 of file HLTPrescaleTable.h.

References table_.

Referenced by pat::PATTriggerProducer::beginLuminosityBlock(), HLTConfigData::dump(), HLTPrescaleRecorder::endRun(), isProductEqual(), HLTConfigData::prescaleTable(), pat::PATTriggerProducer::produce(), and boost::serialization::save().

78 {return table_;}
std::map< std::string, std::vector< unsigned int > > table_
prescale sets keyed on trigger path name

Member Data Documentation

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

names of prescale sets

Definition at line 28 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 26 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 30 of file HLTPrescaleTable.h.

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