Example showing how to add a function to the class context menu.
void poptest1(
int a = 5,
int b = 56);
int poptest3();
void poptest4(char *ch);
void customContextMenu()
{
h =
new TH1F(
"h",
"Schtroumpf", 100, -4, 4);
h2 =
new TH1F(
"h2",
"h2", 1000, -4, 4);
"Option_t*");
}
void poptest1(
int a,
int b)
{
printf(
"poptest1 %d %d\n",
a,
b);
}
{
printf(
"poptest2 %d %d\n",
a,
b);
printf(
"histo : %lx\n", (
Long_t)
c);
printf(
"title of the histogram : %s\n", ((
TH1F *)
c)->GetTitle());
}
{
printf("poptest2bis\n");
printf(
"histo : %lx\n", (
Long_t)
c);
printf(
"title of the histogram : %s\n", ((
TH1F *)
c)->GetTitle());
}
int poptest3()
{
printf("poptest3\n");
return 12;
}
void poptest4(const char *ch)
{
printf("poptest4 %s\n", ch);
}
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetMenuList() const
Return the list of menu items associated with the class.
1-D histogram with a float per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
Mother of all ROOT objects.
- Author
- Ilka Antcheva
Definition in file customContextMenu.C.