CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
LumiSummaryRunHeader Class Reference

#include <LumiSummaryRunHeader.h>

Public Types

typedef std::vector< std::string > vstring_t
 

Public Member Functions

unsigned int getHLTIndex (const std::string &name) const
 Get index of given HLT path-name. Returns -1 if not found. More...
 
std::string getHLTName (unsigned int idx) const
 Get HLT name at given position. More...
 
const vstring_tgetHLTNames (vstring_t &hltnames) const
 Get HLT name vector. More...
 
unsigned int getL1Index (const std::string &name) const
 Get index of given L1 trigger-name. Returns -1 if not found. More...
 
std::string getL1Name (unsigned int idx) const
 Get L1 name at given position. More...
 
const vstring_tgetL1Names (vstring_t &l1names) const
 Get L1 name vector. More...
 
bool isProductEqual (LumiSummaryRunHeader const &o) const
 Product compare function. More...
 
 LumiSummaryRunHeader ()
 Default constructor. More...
 
 LumiSummaryRunHeader (vstring_t &l1names, vstring_t &hltnames)
 
void setHLTNames (const vstring_t &hltnames)
 Set HLT name vector. More...
 
void setL1Names (const vstring_t &l1names)
 Set L1 name vector. More...
 
void swapHLTNames (vstring_t &hltnames)
 Swap HLT name vector. More...
 
void swapL1Names (vstring_t &l1names)
 Swap L1 name vector. More...
 
 ~LumiSummaryRunHeader ()
 Destructor. More...
 

Private Attributes

vstring_t m_hltNames
 
vstring_t m_l1Names
 

Detailed Description

LumiSummaryRunHeader contains LumiSummary data which remains valid during the whole run.

  1. Vectors of L1 and HLT trigger / path names. LumiSummary uses integer indices into these two vectors to minimize disk-usage in highly selective skim files.
Author
Matevz Tadel
Date
2011-02-22

Definition at line 21 of file LumiSummaryRunHeader.h.

Member Typedef Documentation

◆ vstring_t

typedef std::vector<std::string> LumiSummaryRunHeader::vstring_t

Definition at line 23 of file LumiSummaryRunHeader.h.

Constructor & Destructor Documentation

◆ LumiSummaryRunHeader() [1/2]

LumiSummaryRunHeader::LumiSummaryRunHeader ( )
inline

Default constructor.

Definition at line 28 of file LumiSummaryRunHeader.h.

28 {}

◆ LumiSummaryRunHeader() [2/2]

LumiSummaryRunHeader::LumiSummaryRunHeader ( vstring_t l1names,
vstring_t hltnames 
)

Constructor with names. Vectors are swapped so they are empty on return.

Definition at line 4 of file LumiSummaryRunHeader.cc.

4  {
5  m_l1Names.swap(l1names);
6  m_hltNames.swap(hltnames);
7 }

References m_hltNames, and m_l1Names.

◆ ~LumiSummaryRunHeader()

LumiSummaryRunHeader::~LumiSummaryRunHeader ( )
inline

Destructor.

Definition at line 35 of file LumiSummaryRunHeader.h.

35 {}

Member Function Documentation

◆ getHLTIndex()

unsigned int LumiSummaryRunHeader::getHLTIndex ( const std::string &  name) const

Get index of given HLT path-name. Returns -1 if not found.

Definition at line 36 of file LumiSummaryRunHeader.cc.

36  {
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 }

References mps_fire::i, m_hltNames, Skims_PA_cff::name, and findQualityFiles::size.

◆ getHLTName()

std::string LumiSummaryRunHeader::getHLTName ( unsigned int  idx) const
inline

Get HLT name at given position.

Definition at line 60 of file LumiSummaryRunHeader.h.

60 { return m_hltNames.at(idx); }

References training_settings::idx, and m_hltNames.

◆ getHLTNames()

const vstring_t& LumiSummaryRunHeader::getHLTNames ( vstring_t hltnames) const
inline

Get HLT name vector.

Definition at line 66 of file LumiSummaryRunHeader.h.

66 { return m_hltNames; }

References m_hltNames.

◆ getL1Index()

unsigned int LumiSummaryRunHeader::getL1Index ( const std::string &  name) const

Get index of given L1 trigger-name. Returns -1 if not found.

Definition at line 27 of file LumiSummaryRunHeader.cc.

27  {
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 }

References mps_fire::i, m_l1Names, Skims_PA_cff::name, and findQualityFiles::size.

Referenced by LumiCalculator::endLuminosityBlock().

◆ getL1Name()

std::string LumiSummaryRunHeader::getL1Name ( unsigned int  idx) const
inline

Get L1 name at given position.

Definition at line 57 of file LumiSummaryRunHeader.h.

57 { return m_l1Names.at(idx); }

References training_settings::idx, and m_l1Names.

Referenced by LumiCalculator::endLuminosityBlock().

◆ getL1Names()

const vstring_t& LumiSummaryRunHeader::getL1Names ( vstring_t l1names) const
inline

Get L1 name vector.

Definition at line 63 of file LumiSummaryRunHeader.h.

63 { return m_l1Names; }

References m_l1Names.

◆ isProductEqual()

bool LumiSummaryRunHeader::isProductEqual ( LumiSummaryRunHeader const &  o) const

Product compare function.

Definition at line 9 of file LumiSummaryRunHeader.cc.

9  {
10  return m_l1Names == o.m_l1Names && m_hltNames == o.m_hltNames;
11 }

References m_hltNames, m_l1Names, and EcalTangentSkim_cfg::o.

◆ setHLTNames()

void LumiSummaryRunHeader::setHLTNames ( const vstring_t hltnames)

Set HLT name vector.

Definition at line 17 of file LumiSummaryRunHeader.cc.

17  {
18  m_hltNames.assign(hltnames.begin(), hltnames.end());
19 }

References m_hltNames.

◆ setL1Names()

void LumiSummaryRunHeader::setL1Names ( const vstring_t l1names)

Set L1 name vector.

Definition at line 15 of file LumiSummaryRunHeader.cc.

15 { m_l1Names.assign(l1names.begin(), l1names.end()); }

References m_l1Names.

◆ swapHLTNames()

void LumiSummaryRunHeader::swapHLTNames ( vstring_t hltnames)

Swap HLT name vector.

Definition at line 23 of file LumiSummaryRunHeader.cc.

23 { m_hltNames.swap(hltnames); }

References m_hltNames.

◆ swapL1Names()

void LumiSummaryRunHeader::swapL1Names ( vstring_t l1names)

Swap L1 name vector.

Definition at line 21 of file LumiSummaryRunHeader.cc.

21 { m_l1Names.swap(l1names); }

References m_l1Names.

Member Data Documentation

◆ m_hltNames

vstring_t LumiSummaryRunHeader::m_hltNames
private

◆ m_l1Names

vstring_t LumiSummaryRunHeader::m_l1Names
private
mps_fire.i
i
Definition: mps_fire.py:355
training_settings.idx
idx
Definition: training_settings.py:16
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
LumiSummaryRunHeader::m_l1Names
vstring_t m_l1Names
Definition: LumiSummaryRunHeader.h:77
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
LumiSummaryRunHeader::m_hltNames
vstring_t m_hltNames
Definition: LumiSummaryRunHeader.h:78
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443