44 ::Info(
"AliElasticSearchRoot::AliElasticSearchRootTest",
"KeyValue-Begin");
50 ::Info(
"AliElasticSearchRoot::AliElasticSearchRootTest",
"KeyValue-EndOK");
66 ::Info(
"AliElasticSearchRoot::ExportBinary",
"KeyValue-Begin");
69 TString exportInfo=
"%IprodName:";
70 Int_t nBranches = tree->GetListOfBranches()->GetEntries();
71 for (Int_t iBranch=0; iBranch<nBranches; iBranch++){
72 exportInfo+= tree->GetListOfBranches()->At(iBranch)->GetName();
73 if (iBranch<nBranches) exportInfo+=
":";
76 pelastic->
ExportBinary(
"/alice_mc/passguess/",
"mctableAnchor.json",
"xxx");
77 ::Info(
"AliElasticSearchRoot::ExportBinary",
"KeyValue-EndOK");
79 tree = info.
GetTree(
"QA.TPC",
"LHC15n",
"pass2",
"Logbook");
83 nBranches = tree->GetListOfBranches()->GetEntries();
84 for (Int_t iBranch=0; iBranch<nBranches; iBranch++){
85 exportInfo+= tree->GetListOfBranches()->At(iBranch)->GetName();
90 pelastic->
ExportBinary(
"/alice/qatpcbulk/",
"qatpcbulk.json",
"xxx");
92 TString exportInfo=
"%ILogbook.LHCperiod:%Ipass.GetName():%Irun:%Prun:";
93 exportInfo+=
"period.GetName():pass.GetName():run:Logbook.run:";
94 exportInfo+=
"meanTPCncl:meanMIP;1.5:meanMIPele;1.5:";
95 exportInfo+=
"grdcar_neg_ASidePhi.fY:grdcar_neg_CSidePhi.fY:grdcar_pos_ASidePhi.fY:grdcar_pos_CSidePhi.fY";
98 pelastic->
ExportBinary(
"/alice/qatpc_test0/",
"qatpc_test0.json",
"xxx");
103 ::Info(
"AliElasticSearchRoot::testExportClass",
"KeyValue-Begin");
105 TTree *
tree = info.
GetTree(
"QA.TPC",
"LHC15n",
"pass2",
"Logbook");
106 TString exportInfo=
"%Irun:";
107 exportInfo+=
"period.GetName():";
108 exportInfo+=
"period.:";
110 exportInfo+=
"grdcar_neg_ASidePhi.";
112 pelastic->
ExportBinary(
"/alice/qatpc_testClass1/",
"qatpc_testClass.json",
"xxx");
113 ::Info(
"AliElasticSearchRoot::testExportClass",
"KeyValue-End");
117 ::Info(
"AliElasticSearchRoot::testExportClass",
"KeyValue-Begin");
119 TTree *
tree = info.
GetTree(
"QA.TPC",
"LHC15n",
"pass2",
"Logbook:QA.ITS:QA.TRD");
127 ::Info(
"AliElasticSearchRoot::GetIndexLayout",
"KeyValue-Begin");
128 pelastic->
GetIndexLayout(
"alice_mc",
"passguess",
"text").Tokenize(
"\n")->Print();
129 pelastic->
GetIndexLayout(
"alice_mc",
"passguess",0,kTRUE).Tokenize(
"\n")->Print();
130 pelastic->
GetIndexLayout(
"alice",
"qatpc_test0",
"float").Tokenize(
"\n")->Print();
131 pelastic->
GetIndexLayout(
"alice",
"qatpc_test0",0,kTRUE).Tokenize(
"\n")->Print();
133 ::Info(
"AliElasticSearchRoot::GetIndexLayout",
"KeyValue-EndOK");
137 ::Info(
"AliElasticSearchRoot::select",
"KeyValue-Begin");
139 select= pelastic->
select(
"/alice/qatpc_test0/",
"*",
"run>240000&&run<246844&&meanMIP>50",0,1000,
"jqEQueryStat,jqEQueryHeader");
140 select= pelastic->
select(
"/alice/qatpc_test0/",
"*",
"run>240000&&run<246844&&meanMIP>50",0,1000,
"jqEQueryArrayNamed,jqEQueryStat,jqEQueryHeader");
142 select= pelastic->
select(
"/alice/qatpcbulk/",
"*",
"run>0&&meanMIP>0",0,1000,
",jqEQueryHeader,jqEQueryStat");
144 ::Info(
"AliElasticSearchRoot::select",
"KeyValue-EndOK");
AliElasticSearchRoot - C++ interface to the Elastic –> root tree like- using gSystem->GetFromPipe, Exec, Elastic, painless scripting, curl, jq.
TTree * GetTreeMCPassGuess()
TObjArray * GetIndexLayout(const char *indexName)
TString select(const char *indexName, TString fields, TString query, Int_t first, Int_t size, TString filterArray="")
void AliElasticSearchRootTest(char *phostName=0)
void Print(Option_t *option="") const
TTree * GetTree(TString type, TString period, TString pass, Int_t buildIndex=1)
static Int_t selectWhatWhereOrderBy(TTree *tree, TString what, TString where, TString orderBy, Int_t firstentry, Int_t nentries, TString outputFormat, TString outputName)
AliElasticSearchRoot * pelastic
void testGetIndexLayout()
This class gives you an interface to different trees of information spread throughout ALICE...
Int_t ExportBinary(std::string indexName, std::string jsonFile, std::string option)
void SetCertificate(std::string certification="--cacert $HOME/.globus/CERNGridCertificationAuthority.crt --netrc-file $HOME/.globus/.elastic/.netrc")
virtual void ls(Option_t *option="") const
List indices in the Elastic server.