-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathhyperk_fitqun_display.C
55 lines (44 loc) · 1.37 KB
/
hyperk_fitqun_display.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Based on alice_esd.C from ROOT tutorials
// Modified for hyperk by Alex Finch
TFile* f;
TTree * fiTQun;
void load_fitqun_event();
/******************************************************************************/
// Initialization and steering functions
/******************************************************************************/
//______________________________________________________________________________
void hyperk_fitqun_display()
{
// Main function, initializes the application.
gROOT->LoadMacro("selector.C");
const char *filetypes[] = {
"ROOT files", "*.root",
"All files", "*",
0, 0
};
TString CurrentDirectory=gSystem->pwd();
TString originalDirectory=CurrentDirectory;
TGFileInfo fi;
fi.fFileTypes = filetypes;
fi.fIniDir = StrDup(CurrentDirectory);
new TGFileDialog(gClient->GetRoot(), 0, kFDOpen, &fi);
if (!fi.fFilename) {
cout<<" No file chosen "<<endl;
return;
}
f = new TFile(fi.fFilename);
gSystem->cd(originalDirectory);
fiTQun=(TTree *) f->Get("fiTQun");
TEveManager::Create(kTRUE,"V");
selector S(fiTQun);
S.Init(fiTQun);
S.Process(0);
//fiTQun->GetEvent(0);
// load_fitqun_event();
gEve->GetDefaultGLViewer()->UpdateScene();
gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown.
}
void load_fitqun_event()
{
cout<<" hi "<<endl;
}