1#ifndef NdmspcCoreUtils_H
2#define NdmspcCoreUtils_H
8#include <nlohmann/json.hpp>
9using json = nlohmann::json;
28 static TFile *
OpenFile(std::string filename, std::string mode =
"READ",
bool createLocalDir =
true);
29 static std::string
OpenRawFile(std::string filename);
30 static bool SaveRawFile(std::string filename, std::string content);
31 static TMacro *
OpenMacro(std::string filename);
34 static Int_t
GetBinFromBase(Int_t bin, Int_t rebin, Int_t rebin_start);
35 static int SetResultValueError(json cfg, THnSparse * output, std::string name, Int_t * point,
double val,
double err,
36 bool normalizeToWidth =
false,
bool onlyPositive =
false,
double times = 1);
37 static std::vector<std::string>
Tokenize(std::string_view input,
const char delim);
static std::string GetCutsPath(json cuts)
static int SetResultValueError(json cfg, THnSparse *output, std::string name, Int_t *point, double val, double err, bool normalizeToWidth=false, bool onlyPositive=false, double times=1)
static std::string OpenRawFile(std::string filename)
static TFile * OpenFile(std::string filename, std::string mode="READ", bool createLocalDir=true)
static Int_t GetBinFromBase(Int_t bin, Int_t rebin, Int_t rebin_start)
static TMacro * OpenMacro(std::string filename)
virtual ~Utils()
Destructor.
static std::vector< std::string > Tokenize(std::string_view input, const char delim)
static bool SaveRawFile(std::string filename, std::string content)