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

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.

57 : 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 60 of file HLTPrescaleTable.h.

References cuy::ib, labels_, Association::map, n, set_, AlCaHLTBitMon_QueryRunRegistry::string, and table_.

60  :
63  const unsigned int n(labels_.size());
64  assert((((set_==0)&&(n==0)) || (set_<n)));
65  const std::map<std::string,std::vector<unsigned int> >::const_iterator ib(table_.begin());
66  const std::map<std::string,std::vector<unsigned int> >::const_iterator ie(table_.end());
67  for (std::map<std::string,std::vector<unsigned int> >::const_iterator it=ib; it!=ie; ++it) {
68  assert (it->second.size()==n);
69  }
70  }
unsigned int set() const
low-level const accessors for data members
int ib
Definition: cuy.py:660
const std::map< std::string, std::vector< unsigned int > > & table() const
dictionary map
Definition: Association.py:205
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 73 of file HLTPrescaleTable.h.

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

73  {
74  return ((set()==that.set()) && (labels()==that.labels()) && (table()==that.table()));
75  }
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 42 of file HLTPrescaleTable.h.

References set_.

Referenced by HLTConfigData::prescaleValue().

42  {
43  return prescale(set_,trigger);
44  }
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 47 of file HLTPrescaleTable.h.

References set(), and table_.

47  {
48  const std::map<std::string,std::vector<unsigned int> >::const_iterator it(table_.find(trigger));
49  if ((it==table_.end()) || (set>=it->second.size())) {
50  return 1;
51  } else {
52  return it->second[set];
53  }
54  }
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

low-level const accessors for data members

Definition at line 78 of file HLTPrescaleTable.h.

References set_.

Referenced by pat::PATTriggerProducer::beginLuminosityBlock(), betterConfigParser.BetterConfigParser::getGeneral(), isProductEqual(), prescale(), and pat::PATTriggerProducer::produce().

78 {return set_;}
unsigned int set_
data members
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().

39 {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 80 of file HLTPrescaleTable.h.

References table_.

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

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