#include "HIEventUtils/HIEventSelectionToolRun3.h"
#include <fstream>
#include <nlohmann/json.hpp>
#include "PathResolver/PathResolver.h"
Go to the source code of this file.
◆ ENUMDEF [1/3]
Value: case HI::IonDataType::_N: \
return #_N;
◆ ENUMDEF [2/3]
Value: case HI::PileupVariation::_N: \
return #_N;
◆ ENUMDEF [3/3]
Value: case HI::SelectionMask::_N: \
return #_N;
◆ loadHist()
| std::unique_ptr< TH1D > loadHist |
( |
const std::string & | file | ) |
|
Definition at line 70 of file HIEventSelectionToolRun3.cxx.
70 {
71 const std::string
path =
73 std::ifstream
i(path);
74 if (not i) {
75 throw std::runtime_error(path + " does nto exist");
76 }
77
81
82 const size_t nbins =
j.at(
"fNbins").get<
size_t>();
83
84 auto h = std::make_unique<TH1D>(
j.at(
"fName").get<std::string>().c_str(),
85 j.at(
"fTitle").get<std::string>().c_str(),
86 nbins,
j.at(
"fXmin").get<
double>(),
87 j.at(
"fXmax").get<
double>());
88 const std::vector<double>
bins =
j.at(
"fArray").get<std::vector<double>>();
89 if (
bins.size() !=
j.at(
"fNbins").get<
size_t>() + 2) {
90 throw std::runtime_error(
91 "Histogram " +
j.at(
"fName").get<std::string>() +
92 " has inconsistent number of bins and fNbins (should +2) value " +
93 std::to_string(
bins.size()) +
" and " + std::to_string(nbins));
94 }
95
98 }
101}
static const std::vector< std::string > bins
Header file for AthHistogramAlgorithm.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
path
python interpreter configuration --------------------------------------—