1#ifndef NdmspcCorePointRun_H
2#define NdmspcCorePointRun_H
10#include <nlohmann/json.hpp>
13using json = nlohmann::json;
26 PointRun(std::string macro =
"NdmspcPointRun.C");
29 bool Run(std::string filename, std::string userConfig =
"", std::string environment =
"",
30 std::string userConfigRaw =
"", std::string binnings =
"",
bool show =
false, std::string outfilename =
"");
31 bool GenerateJobs(std::string jobs, std::string filename, std::string userConfig =
"", std::string environment =
"",
32 std::string userConfigRaw =
"", std::string jobDir =
"/tmp/ndmspc-jobs", std::string binnings =
"");
35 json &
Cfg() {
return gCfg; }
61 static bool Generate(std::string name =
"myAnalysis", std::string inFile =
"myFile.root",
62 std::string inObjectName =
"myNDHistogram");
64 static bool Merge(
int from = 0,
int to = 1, std::string name =
"myAnalysis.json", std::string userConfig =
"",
65 std::string environment =
"", std::string userConfigRaw =
"", std::string binning =
"",
66 std::string cacheDir =
"${PWD}/.ndmspc_merge_cache", std::string fileOpt =
"?remote=1");
91 bool LoadConfig(std::string config, std::string userConfig =
"", std::string environment =
"",
92 std::string userConfigRaw =
"", std::string binning =
"",
bool show =
false,
93 std::string outfilename =
"");
94 bool Init(std::string extraPath =
"");
107 bool GenerateRecursiveConfig(Int_t dim, std::vector<std::vector<int>> & ranges, json & cfg, std::string & outfilename,
bool ProcessRecursiveInner(Int_t i, std::vector< std::string > &n)
std::string fCurrentOutputFileName
Current output filename.
bool GenerateRecursiveConfig(Int_t dim, std::vector< std::vector< int > > &ranges, json &cfg, std::string &outfilename, int &count)
void SetProcessExit(bool pe=true)
Sets flag for ending process.
static void SetEnvironment(std::string env)
Sets environment.
THnSparse * GetResultObject() const
Returns retults hnsparse object.
TFile * fInputFile
Input file.
static std::string fgEnvironment
Environment.
THnSparse * fCurrentProccessHistogram
Current processed histogram.
bool Init(std::string extraPath="")
int fBinCount
Bin Count (TODO! rename to axis level maybe)
static bool Merge(int from=0, int to=1, std::string name="myAnalysis.json", std::string userConfig="", std::string environment="", std::string userConfigRaw="", std::string binning="", std::string cacheDir="${PWD}/.ndmspc_merge_cache", std::string fileOpt="?remote=1")
Merge.
int ProcessHistogramRun()
std::vector< std::string > GetCurrentPointLabels()
Returns current point labels.
bool LoadConfig(std::string config, std::string userConfig="", std::string environment="", std::string userConfigRaw="", std::string binning="", bool show=false, std::string outfilename="")
THnSparse * CreateResult()
TList * GetOutputList() const
Returns output list.
PointRun(std::string macro="NdmspcPointRun.C")
TList * fOutputList
Output list.
TH1S * fMapAxesType
Map axis type histogram.
bool Run(std::string filename, std::string userConfig="", std::string environment="", std::string userConfigRaw="", std::string binnings="", bool show=false, std::string outfilename="")
TList * fInputList
Input list.
std::vector< std::string > fCurrentPointLabels
Current labels.
THnSparse * fResultObject
Result object.
int fVerbose
Verbose level.
void SetSkipCurrentBin(bool scb=true)
Sets flag for skupping bin.
json fCurrentPointValue
Current point value.
void SetOutputList(TList *outList)
Sets output list.
bool fIsProcessOk
Flag that process is ok.
bool fIsSkipBin
Flag to skip bin.
TList * GetInputList() const
Returns list of input objects.
std::vector< TAxis * > fCurrentProcessHistogramAxes
Current process histogram axes.
bool fIsProcessExit
Flag to exit process.
json * CfgPtr()
Returns global config pointer to object.
json GetCurrentPointValue()
Return current point value in json.
json & Cfg()
Returns global config object.
TFile * fCurrentOutputFile
Current output file.
static bool Generate(std::string name="myAnalysis", std::string inFile="myFile.root", std::string inObjectName="myNDHistogram")
TDirectory * fCurrentOutputRootDirectory
Current output root directory.
Int_t fCurrentPoint[32]
Current point.
bool ProcessSinglePoint()
bool GenerateJobs(std::string jobs, std::string filename, std::string userConfig="", std::string environment="", std::string userConfigRaw="", std::string jobDir="/tmp/ndmspc-jobs", std::string binnings="")
TFile * GetInputFile() const
Returns input file.
std::vector< int > fCurrentProcessHistogramPoint
Current process histoghram point.
Int_t * GetCurrentPoint()
Returns current point coordinates.
bool ProcessRecursive(int i)