18#include "AnalysisUtilities.hh"
19#include "BinGeneration.hh"
20#include "RBDSException.hh"
33AnalysisUtilities::AnalysisUtilities()
36AnalysisUtilities::~AnalysisUtilities()
39std::vector<double> AnalysisUtilities::LogSpace(
double start,
43 bool includeLastPoint)
45 return RBDS::LogSpace(start, stop, nBins, base, includeLastPoint);
51 bool includeLastPoint)
57 const std::vector<float>& values,
58 const std::vector<float>& weights)
60 for (
int i=0; i < (int)values.size(); i++)
61 {h1d.Fill(values[i],weights[i]);}
65 const std::string& suffix)
67 std::string result = inputFilePath;
69 std::replace(result.begin(), result.end(),
'*',
'_');
71 auto foundSlash = result.rfind(
'/');
72 if (foundSlash != std::string::npos)
73 {result = result.substr(foundSlash + 1);}
74 std::string key =
".root";
75 auto found = result.rfind(key);
76 if (found != std::string::npos)
77 {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)