CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LumiSummaryRunHeader.cc
Go to the documentation of this file.
1 // $Id: LumiSummaryRunHeader.cc,v 1.1 2011/02/22 16:23:57 matevz Exp $
2 
4 
6 {
7  m_l1Names.swap(l1names);
8  m_hltNames.swap(hltnames);
9 }
10 
12 {
13  return m_l1Names == o.m_l1Names && m_hltNames == o.m_hltNames;
14 }
15 
16 //==============================================================================
17 
19 {
20  m_l1Names.assign(l1names.begin(), l1names.end());
21 }
22 
24 {
25  m_hltNames.assign(hltnames.begin(), hltnames.end());
26 }
27 
29 {
30  m_l1Names.swap(l1names);
31 }
32 
34 {
35  m_hltNames.swap(hltnames);
36 }
37 
38 //==============================================================================
39 
40 unsigned int LumiSummaryRunHeader::getL1Index(const std::string& name) const
41 {
42  const unsigned int size = m_l1Names.size();
43  for (unsigned int i = 0; i < size; ++i)
44  {
45  if (m_l1Names[i] == name) return i;
46  }
47  return -1;
48 }
49 
50 unsigned int LumiSummaryRunHeader::getHLTIndex(const std::string& name) const
51 {
52  const unsigned int size = m_hltNames.size();
53  for (unsigned int i = 0; i < size; ++i)
54  {
55  if (m_hltNames[i] == name) return i;
56  }
57  return -1;
58 }
int i
Definition: DBlmapReader.cc:9
unsigned int getHLTIndex(const std::string &name) const
Get index of given HLT path-name. Returns -1 if not found.
std::vector< std::string > vstring_t
void setHLTNames(const vstring_t &hltnames)
Set HLT name vector.
LumiSummaryRunHeader()
Default constructor.
bool isProductEqual(LumiSummaryRunHeader const &o) const
Product compare function.
void swapL1Names(vstring_t &l1names)
Swap L1 name vector.
unsigned int getL1Index(const std::string &name) const
Get index of given L1 trigger-name. Returns -1 if not found.
void swapHLTNames(vstring_t &hltnames)
Swap HLT name vector.
tuple size
Write out results.
void setL1Names(const vstring_t &l1names)
Set L1 name vector.