CMS 3D CMS Logo

LumiSummaryRunHeader.cc
Go to the documentation of this file.
1 
3 
5  m_l1Names.swap(l1names);
6  m_hltNames.swap(hltnames);
7 }
8 
10  return m_l1Names == o.m_l1Names && m_hltNames == o.m_hltNames;
11 }
12 
13 //==============================================================================
14 
15 void LumiSummaryRunHeader::setL1Names(const vstring_t& l1names) { m_l1Names.assign(l1names.begin(), l1names.end()); }
16 
18  m_hltNames.assign(hltnames.begin(), hltnames.end());
19 }
20 
21 void LumiSummaryRunHeader::swapL1Names(vstring_t& l1names) { m_l1Names.swap(l1names); }
22 
23 void LumiSummaryRunHeader::swapHLTNames(vstring_t& hltnames) { m_hltNames.swap(hltnames); }
24 
25 //==============================================================================
26 
28  const unsigned int size = m_l1Names.size();
29  for (unsigned int i = 0; i < size; ++i) {
30  if (m_l1Names[i] == name)
31  return i;
32  }
33  return -1;
34 }
35 
37  const unsigned int size = m_hltNames.size();
38  for (unsigned int i = 0; i < size; ++i) {
39  if (m_hltNames[i] == name)
40  return i;
41  }
42  return -1;
43 }
size
Write out results.
unsigned int getL1Index(const std::string &name) const
Get index of given L1 trigger-name. Returns -1 if not found.
std::vector< std::string > vstring_t
bool isProductEqual(LumiSummaryRunHeader const &o) const
Product compare function.
void setHLTNames(const vstring_t &hltnames)
Set HLT name vector.
LumiSummaryRunHeader()
Default constructor.
void swapL1Names(vstring_t &l1names)
Swap L1 name vector.
unsigned int getHLTIndex(const std::string &name) const
Get index of given HLT path-name. Returns -1 if not found.
void swapHLTNames(vstring_t &hltnames)
Swap HLT name vector.
void setL1Names(const vstring_t &l1names)
Set L1 name vector.