" r = 0x0;\n"
" if (!object) return;\n"
-," if (!object) return 0x0;\n"
-" TH1* h = 0x0;\n\n"
-"// Set bins, xmin and xmax here\n"
+," if (!object) return 0x0;\n\n"
+"// Set bins, xmin and xmax here - you can also use a different histogram type (but must inherit from TH1)\n"
" Int_t n = 1;\n"
" Double_t xmin = 0;\n"
" Double_t xmax = 100;\n\n"
-" if(!(h = (TH1*)gROOT->FindObject(\"h\"))){\n"
-" h = new TH1(\"h\", \"Title\", n, xmin, xmax);\n"
-" h->GetXaxis()->SetTitle("");\n"
-" h->GetYaxis()->SetTitle("");\n"
-" } else h->Reset();\n"
+" TH1S* h = new TH1S(\"h\", \"Your title\", n, xmin, xmax);\n"
+" h->GetXaxis()->SetTitle("");\n"
+" h->GetYaxis()->SetTitle("");\n"
," if (!object) return kFALSE;\n"
" if (!object2) return kFALSE;\n"
" if (!object2) return;\n"
," if (!object) return 0x0;\n"
-" if (!object2) return 0x0;\n"
-" TH1* h = 0x0;\n\n"
-"// Set bins, xmin and xmax here\n"
+" if (!object2) return 0x0;\n\n"
+"// Set bins, xmin and xmax here - you can also use a different histogram type (but must inherit from TH1)\n"
" Int_t n = 1;\n"
" Double_t xmin = 0;\n"
-" Double_t xmax = 100;\n\n"
-" if(!(h = (TH1*)gROOT->FindObject(\"h\"))){\n"
-" h = new TH1(\"h\", \"Title\", n, xmin, xmax);\n"
-" h->GetXaxis()->SetTitle("");\n"
-" h->GetYaxis()->SetTitle("");\n"
-" } else h->Reset();\n"
+" Double_t xmax = 100;\n\n"
+" TH1S* h = new TH1S(\"h\", \"Your title\", n, xmin, xmax);\n"
+" h->GetXaxis()->SetTitle("");\n"
+" h->GetYaxis()->SetTitle("");\n"
};
//______________________________________________________