12void hist105_TExec_dynamic_slice()
18 TH2F *hpxpy =
new TH2F(
"hpxpy",
"py vs px", 40, -4, 4, 40, -4, 4);
21 for (
Int_t i = 0; i < 50000; i++) {
28 c1->AddExec(
"dynamic",
"DynamicExec()");
44 float uxmin =
gPad->GetUxmin();
45 float uxmax =
gPad->GetUxmax();
46 int pxmin =
gPad->XtoAbsPixel(uxmin);
47 int pxmax =
gPad->XtoAbsPixel(uxmax);
48 int px =
gPad->GetEventX();
49 int py =
gPad->GetEventY();
55 gVirtualX->DrawLine(pxmin, pyold, pxmax, pyold);
65 gVirtualX->DrawLine(pxmin, py, pxmax, py);
75 delete c2->GetPrimitive(
"Projection");
77 c2 =
new TCanvas(
"c2",
"Projection Canvas", 710, 10, 700, 500);
82 Int_t biny =
h->GetYaxis()->FindBin(
y);
83 TH1D *hp =
h->ProjectionX(
"", biny, biny);
87 hp->
Fit(
"gaus",
"ql");
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
1-D histogram with a double per channel (see TH1 documentation)
void SetTitle(const char *title) override
Change/set the title.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
void SetName(const char *name) override
Change the name of this histogram.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
2-D histogram with a float per channel (see TH1 documentation)
Service class for 2-D histogram classes.
Int_t Fill(Double_t) override
Invalid Fill method.
Mother of all ROOT objects.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0