19#include "AnalysisUtilities.hh"
20#include "BinGeneration.hh"
21#include "RBDSException.hh"
34AnalysisUtilities::AnalysisUtilities()
37AnalysisUtilities::~AnalysisUtilities()
40std::vector<double> AnalysisUtilities::LogSpace(
double start,
44 bool includeLastPoint)
46 return RBDS::LogSpace(start, stop, nBins, base, includeLastPoint);
52 bool includeLastPoint)
58 const std::vector<float>& values,
59 const std::vector<float>& weights)
61 for (
int i=0; i < (int)values.size(); i++)
62 {h1d.Fill(values[i],weights[i]);}
66 const std::string& suffix)
68 std::string result = inputFilePath;
70 std::replace(result.begin(), result.end(),
'*',
'_');
72 auto foundSlash = result.rfind(
'/');
73 if (foundSlash != std::string::npos)
74 {result = result.substr(foundSlash + 1);}
75 std::string key =
".root";
76 auto found = result.rfind(key);
77 if (found != std::string::npos)
78 {result.replace(found, key.length(), suffix +
".root");}
Simple class to hold all unbound functions for ROOT.
void FillTH1D(TH1D &h1d, const std::vector< float > &values, const std::vector< float > &weights)
Fill a vector of entries and weights into a TH1 histogram.
std::vector< double > LinSpace(double start, double stop, int nBins, bool includeLastPoint=true)
Linear range of values.
std::vector< double > LinSpace(double start, double stop, int nBins, bool includeLastPoint=true)
Linear range of values.
std::string DefaultOutputName(const std::string &inputFilePath, const std::string &suffix)