1
|
void treeviewer() {
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
open_session();
|
8
|
}
|
9
|
|
10
|
open_session(void *p = 0) {
|
11
|
gSystem->Load("libTreeViewer");
|
12
|
TTreeViewer *treeview = (TTreeViewer *) p;
|
13
|
if (!treeview) treeview = new TTreeViewer();
|
14
|
TTree *tv_tree = (TTree*)gROOT->FindObject("cbmsim");
|
15
|
TFile *tv_file = (TFile*)gROOT->GetListOfFiles()->FindObject("full.root");
|
16
|
if (!tv_tree) {
|
17
|
if (!tv_file) tv_file = new TFile("full.root");
|
18
|
if (tv_file) tv_tree = (TTree*)tv_file->Get("cbmsim");
|
19
|
if(!tv_tree) {
|
20
|
printf("Tree %s not found", fTree->GetName());
|
21
|
return;
|
22
|
}
|
23
|
}
|
24
|
|
25
|
treeview->SetTreeName("cbmsim");
|
26
|
treeview->SetNexpressions(10);
|
27
|
|
28
|
TTVLVEntry *item;
|
29
|
|
30
|
item = treeview->ExpressionItem(0);
|
31
|
item->SetExpression("BeamDetMWPCPoint.fELoss", "~BeamDetMWPCPoint.fELoss");
|
32
|
|
33
|
item = treeview->ExpressionItem(1);
|
34
|
item->SetExpression("", "-empty-");
|
35
|
|
36
|
item = treeview->ExpressionItem(2);
|
37
|
item->SetExpression("", "-empty-");
|
38
|
|
39
|
item = treeview->ExpressionItem(3);
|
40
|
item->SetExpression("BeamDetMWPCPoint.fPlaneNb == 2 && BeamDetMWPCPoint.fMWPCNb == 2 && BeamDetMWPCPoint.fPid > 3000", "~BeamDetMWPCPoint.fPlaneNb");
|
41
|
|
42
|
item = treeview->ExpressionItem(4);
|
43
|
item->SetExpression("", "Scan box");
|
44
|
|
45
|
item = treeview->ExpressionItem(5);
|
46
|
item->SetExpression("BeamDetMWPCPoint.fPlaneNb == 2 && BeamDetMWPCPoint.fMWPCNb == 2 && BeamDetMWPCPoint.fPid > 3000", "~name", kTRUE);
|
47
|
item = treeview->ExpressionItem(6);
|
48
|
item->SetExpression("", "-empty-", kFALSE);
|
49
|
item = treeview->ExpressionItem(7);
|
50
|
item->SetExpression("", "-empty-", kFALSE);
|
51
|
item = treeview->ExpressionItem(8);
|
52
|
item->SetExpression("", "-empty-", kFALSE);
|
53
|
item = treeview->ExpressionItem(9);
|
54
|
item->SetExpression("", "-empty-", kFALSE);
|
55
|
item = treeview->ExpressionItem(10);
|
56
|
item->SetExpression("", "-empty-", kFALSE);
|
57
|
item = treeview->ExpressionItem(11);
|
58
|
item->SetExpression("", "-empty-", kFALSE);
|
59
|
item = treeview->ExpressionItem(12);
|
60
|
item->SetExpression("", "-empty-", kFALSE);
|
61
|
item = treeview->ExpressionItem(13);
|
62
|
item->SetExpression("", "-empty-", kFALSE);
|
63
|
item = treeview->ExpressionItem(14);
|
64
|
item->SetExpression("", "-empty-", kFALSE);
|
65
|
|
66
|
tv_session = new TTVSession(treeview);
|
67
|
treeview->SetSession(tv_session);
|
68
|
|
69
|
tv_session->First();
|
70
|
}
|