{
TH2F *hpxpy =
new TH2F(
"hpxpy",
"py vs px",40,-4,4,40,-4,4);
for (
Int_t i = 0; i < 50000; i++) {
}
c1->AddExec(
"dynamic",
"DynamicExec()");
}
void DynamicExec()
{
if(!select) return;
int pyold =
gPad->GetUniqueID();
int px =
gPad->GetEventX();
int py =
gPad->GetEventY();
float uxmin =
gPad->GetUxmin();
float uxmax =
gPad->GetUxmax();
int pxmin =
gPad->XtoAbsPixel(uxmin);
int pxmax =
gPad->XtoAbsPixel(uxmax);
if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
if(
c2)
delete c2->GetPrimitive(
"Projection");
else c2 =
new TCanvas(
"c2",
"Projection Canvas",710,10,700,500);
Int_t biny =
h->GetYaxis()->FindBin(
y);
TH1D *hp =
h->ProjectionX(
"",biny,biny);
char title[80];
sprintf(title,"Projection of biny=%d",biny);
}
R__EXTERN TRandom * gRandom
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)}
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
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.
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetName(const char *name)
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-Dim histogram classes.
Int_t Fill(Double_t)
Invalid Fill method.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0