22 void *handle(
void *ptr)
29 sprintf(name,
"hpx%ld",nr);
31 hpx[nr] =
new TH1F(name,
"This is the px distribution",100,-4,4);
36 for (
Int_t i = 0; i < nfills; i++) {
40 if (i && (i%upd) == 0) {
80 c[0] =
new TCanvas(
"c0",
"Dynamic Filling Example",100,20,400,300);
85 c[1] =
new TCanvas(
"c1",
"Dynamic Filling Example",510,20,400,300);
90 c[2] =
new TCanvas(
"c2",
"Dynamic Filling Example",100,350,400,300);
95 c[3] =
new TCanvas(
"c3",
"Dynamic Filling Example",510,350,400,300);
102 c[0]->
Connect(
"Closed()", 0, 0,
"closed(Int_t=0)");
103 c[1]->
Connect(
"Closed()", 0, 0,
"closed(Int_t=1)");
104 c[2]->
Connect(
"Closed()", 0, 0,
"closed(Int_t=2)");
105 c[3]->
Connect(
"Closed()", 0, 0,
"closed(Int_t=3)");
107 printf(
"Starting Thread 0\n");
108 t[0] =
new TThread(
"t0", handle, (
void*) 0);
110 printf(
"Starting Thread 1\n");
111 t[1] =
new TThread(
"t1", handle, (
void*) 1);
113 printf(
"Starting Thread 2\n");
114 t[2] =
new TThread(
"t2", handle, (
void*) 2);
116 printf(
"Starting Thread 3\n");
117 t[3] =
new TThread(
"t3", handle, (
void*) 3);
119 printf(
"Starting Thread 4\n");
120 t[4] =
new TThread(
"t4", joiner, (
void*) 3);
126 for (
int i = 0; i < 4; i++) {
127 if (c[i] && c[i]->IsModified()) {
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual void SetBorderMode(Short_t bordermode)
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
tomato 1-D histogram with a float per channel (see TH1 documentation)}
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
TFrame * GetFrame()
Get frame.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Int_t Run(void *arg=0)
Start the thread.
virtual void SetBorderSize(Short_t bordersize)
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Long_t Join(void **ret=0)
Join this thread.
Int_t Kill()
Kill this thread.
static Int_t Lock()
Static method to lock the main thread mutex.
R__EXTERN TRandom * gRandom
static void Ps()
Static method listing the existing threads.
static Int_t UnLock()
Static method to unlock the main thread mutex.
virtual void Update()
Update canvas pad buffers.
void Modified(Bool_t flag=1)