31 hpx =
new TH1F(
"hpx",
"This is the px distribution", 100, -4, 4);
32 hpx->SetFillColor(48);
40 if (i && (i%
upd) == 0) {
52 arr[3] = (
void*)
"\"hpxanim.gif+50\"";
53 (*gThreadXAR)(
"METH", 4,
arr,
NULL);
62 arr[3] = (
void*)
"\"hpxanim.gif++\"";
63 (*gThreadXAR)(
"METH", 4,
arr,
NULL);
73 total =
new TH1F(
"total",
"This is the total distribution",100,-4,4);
74 hmain =
new TH1F(
"hmain",
"Main contributor",100,-4,4);
75 s1 =
new TH1F(
"s1",
"This is the first signal",100,-4,4);
76 s2 =
new TH1F(
"s2",
"This is the second signal",100,-4,4);
78 total->SetMarkerStyle(21);
79 total->SetMarkerSize(0.7);
80 hmain->SetFillColor(16);
96 if (i && (i%
upd) == 0) {
111 arr[3] = (
void*)
"\"hsumanim.gif+50\"";
112 (*gThreadXAR)(
"METH", 4,
arr,
NULL);
115 total->Draw(
"sameaxis");
123 arr[3] = (
void*)
"\"hsumanim.gif++\"";
124 (*gThreadXAR)(
"METH", 4,
arr,
NULL);
141 if (!finished)
return;
142 if (
id == 1) ((
TRootCanvas *)
c1->GetCanvasImp())->CloseWindow();
143 else if (
id == 2) ((
TRootCanvas *)
c2->GetCanvasImp())->CloseWindow();
150 if (
gROOT->IsBatch()) {
153 c1 =
new TCanvas(
"c1",
"Dynamic Filling Example", 100, 30, 400, 300);
154 c1->SetFillColor(42);
155 c1->GetFrame()->SetFillColor(21);
156 c1->GetFrame()->SetBorderSize(6);
157 c1->GetFrame()->SetBorderMode(-1);
163 rc->Connect(
"CloseWindow()", 0, 0,
164 "tryclosing(Int_t=1)");
167 c2 =
new TCanvas(
"c2",
"Dynamic Filling Example", 515, 30, 400, 300);
173 rc->Connect(
"CloseWindow()", 0, 0,
174 "tryclosing(Int_t=2)");
182 printf(
"Starting Thread 0\n");
185 printf(
"Starting Thread 1\n");
188 printf(
"Starting Joiner Thread \n");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static unsigned int total
R__EXTERN TRandom * gRandom
R__EXTERN TSystem * gSystem
1-D histogram with a float per channel (see TH1 documentation)
Method or function calling interface.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual Double_t Landau(Double_t mean=0, Double_t sigma=1)
Generate a random number following a Landau distribution with location parameter mu and scale paramet...
This class creates a main window with menubar, scrollbars and a drawing area.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual int Unlink(const char *name)
Unlink, i.e.
<div class="legacybox"><h2>Legacy Code</h2> TThread is a legacy interface: there will be no bug fixes...
static void Ps()
Static method listing the existing threads.
static Int_t UnLock()
Static method to unlock the main thread mutex.
static Int_t Lock()
Static method to lock the main thread mutex.