13 void poptest1(
int a=5,
int b = 56);
14 void poptest2(
int a,
int b, TObject* c);
15 void poptest2bis(TObject* c);
17 void poptest4(
char* ch);
20 void customContextMenu()
28 h =
new TH1F(
"h",
"Schtroumpf",100,-4,4);
29 h->FillRandom(
"gaus");
32 h2 =
new TH1F(
"h2",
"h2",1000,-4,4);
33 h2->FillRandom(
"gaus",30000);
36 TClass *cl = h->IsA();
37 l = cl->GetMenuList();
40 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
41 "Test object, draw a second h",
"Draw",h2,
"Option_t*");
43 n =
new TClassMenuItem(TClassMenuItem::kPopupSeparator,cl);
46 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
47 "test no 4",
"poptest4",0,
"const char*");
49 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
50 "test no 3",
"poptest3",0,
"");
52 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
53 "test no 2 bis",
"poptest2bis",0,
"TObject*",2);
55 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
56 "test no 2",
"poptest2",0,
"int,int,TObject*",2);
58 n =
new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,
59 "test no 1",
"poptest1",0,
"int,int");
63 void poptest1(
int a,
int b)
65 printf(
"poptest1 %d %d\n",a,b);
68 void poptest2(
int a,
int b, TObject *c)
71 printf(
"poptest2 %d %d\n",a,b);
72 printf(
"histo : %lx\n",(Long_t)c);
73 printf(
"title of the histogram : %s\n",((TH1F*)c)->GetTitle());
76 void poptest2bis(TObject *c)
79 printf(
"poptest2bis\n");
80 printf(
"histo : %lx\n",(Long_t)c);
81 printf(
"title of the histogram : %s\n",((TH1F*)c)->GetTitle());
90 void poptest4(
const char *ch)
92 printf(
"poptest4 %s\n",ch);