AliPhysics  master (3d17d9d)
AliRootInteractiveTest.C
Go to the documentation of this file.
1 /*
2  .L $AliPhysics_SRC/PWGPP/AliRootInteractive.h
3  .x $AliPhysics_SRC/PWGPP/AliRootInteractiveTest.C
4 
5  */
6 TTree * tree=0;
7 TMatrixD *testMatrix=0;
9 
10 
11 
12 TTree * makeABCtree(Int_t nPoints){
13  TTreeSRedirector *pcstream = new TTreeSRedirector("treeABCD.root","recreate");
14  Double_t abcd[4];
15  for (Int_t i=0; i<nPoints; i++){
16  for (Int_t j=0; j<4; j++) abcd[j]=gRandom->Rndm();
17  (*pcstream)<<"tree"<<
18  "A="<<abcd[0]<<
19  "B="<<abcd[1]<<
20  "C="<<abcd[2]<<
21  "D="<<abcd[3]<<
22  "\n";
23  }
24  delete pcstream;
25  TFile *f = TFile::Open("treeABCD.root");
26  return (TTree*)f->Get("tree");
27 }
28 
30  tree= makeABCtree(1000);
31  TString query = "A>0";
32  TString figureArray= "["
33  "[['A'], ['D+A','C-A'], {\"size\": 1 , 'colorZvar':'D'}],"
34  "[['A'], ['C+A', 'C-A']],"
35  "[['A'], ['C']], ['table'] ]";
36 
37  TString widgets="query.xx(),slider.A(0,1,0.01,0.1,0.9),slider.B(0,1,0.01,0.1,0.9),"
38  "slider.C(0,1,0.01,0.1,0.9),slider.D(0,1,0.01,0.1,0.9)";
39  TString options = "tooltips=[('VarA', '(@A)'), ('VarB', '(@B)'), ('VarC', '(@C)'), ('VarD', '(@D)')],"
40  "layout= '((0,1,2 ),(3, x_visible=1),commonX=1, x_visible=1,y_visible=0,plot_height=450,plot_width=1000)'";
41 
42  AliRootInteractive::treeBokehDrawArray("tree", query, figureArray, widgets, options);
43 }
44 
47 }
void AliRootInteractiveTest()
double Double_t
Definition: External.C:58
void treeBokehDrawArray(const char *treeName, const char *query, const char *figureArray, const char *widgets, const char *options, const char *htmlOut=nullptr)
TMatrixD * testMatrix
TRandom * gRandom
int Int_t
Definition: External.C:63
TStopwatch timer
TTree * makeABCtree(Int_t nPoints)
void testBokehDrawArray()
TTree * tree