CMS 3D CMS Logo

List of all members | Static Public Member Functions | Public Attributes
dqmservices::DQMFileIterator::EorEntry Struct Reference

#include <DQMFileIterator.h>

Static Public Member Functions

static EorEntry load_json (const std::string &run_path, const std::string &filename)
 

Public Attributes

std::string filename
 
bool loaded = false
 
std::size_t n_events
 
std::size_t n_lumi
 
std::string run_path
 

Detailed Description

Definition at line 37 of file DQMFileIterator.h.

Member Function Documentation

DQMFileIterator::EorEntry dqmservices::DQMFileIterator::EorEntry::load_json ( const std::string &  run_path,
const std::string &  filename 
)
static

Definition at line 60 of file DQMFileIterator.cc.

References dqmservices::DQMFileIterator::LumiEntry::filename, filename, loaded, n_events, n_lumi, GetRecoTauVFromDQM_MC_cff::next, EnergyCorrector::pt, dqmservices::DQMFileIterator::LumiEntry::run_path, run_path, and edm::second().

62  {
63  boost::property_tree::ptree pt;
64  read_json(filename, pt);
65 
66  EorEntry eor;
67  eor.filename = filename;
68  eor.run_path = run_path;
69 
70  // We rely on n_events to be the first item on the array...
71  eor.n_events = std::next(pt.get_child("data").begin(), 1)
72  ->second.get_value<std::size_t>();
73  eor.n_lumi = std::next(pt.get_child("data").begin(), 2)
74  ->second.get_value<std::size_t>();
75 
76  eor.loaded = true;
77  return eor;
78 }
U second(std::pair< T, U > const &p)

Member Data Documentation

std::string dqmservices::DQMFileIterator::EorEntry::filename
bool dqmservices::DQMFileIterator::EorEntry::loaded = false
std::size_t dqmservices::DQMFileIterator::EorEntry::n_events

Definition at line 42 of file DQMFileIterator.h.

Referenced by load_json().

std::size_t dqmservices::DQMFileIterator::EorEntry::n_lumi
std::string dqmservices::DQMFileIterator::EorEntry::run_path

Definition at line 40 of file DQMFileIterator.h.

Referenced by load_json().