25 hpx =
new TH1F(
"hpx",
"This is the px distribution", 100, -4, 4);
30 for (
Int_t i = 0; i < nfills; i++) {
34 if (i && (i%upd) == 0) {
46 arr[3] = (
void*)
"\"hpxanim.gif+50\"";
47 (*gThreadXAR)(
"METH", 4, arr,
NULL);
56 arr[3] = (
void*)
"\"hpxanim.gif++\"";
57 (*gThreadXAR)(
"METH", 4, arr,
NULL);
67 total =
new TH1F(
"total",
"This is the total distribution",100,-4,4);
68 hmain =
new TH1F(
"hmain",
"Main contributor",100,-4,4);
69 s1 =
new TH1F(
"s1",
"This is the first signal",100,-4,4);
70 s2 =
new TH1F(
"s2",
"This is the second signal",100,-4,4);
80 for (
Int_t i = 0; i < nfills; i++) {
90 if (i && (i%upd) == 0) {
105 arr[3] = (
void*)
"\"hsumanim.gif+50\"";
106 (*gThreadXAR)(
"METH", 4, arr,
NULL);
109 total->
Draw(
"sameaxis");
117 arr[3] = (
void*)
"\"hsumanim.gif++\"";
118 (*gThreadXAR)(
"METH", 4, arr,
NULL);
145 printf(
"This script can only be executed via ACliC: .x threadsh2.C++\n");
149 if (
gROOT->IsBatch()) {
152 c1 =
new TCanvas(
"c1",
"Dynamic Filling Example", 100, 30, 400, 300);
162 rc->
Connect(
"CloseWindow()", 0, 0,
163 "tryclosing(Int_t=1)");
166 c2 =
new TCanvas(
"c2",
"Dynamic Filling Example", 515, 30, 400, 300);
172 rc->
Connect(
"CloseWindow()", 0, 0,
173 "tryclosing(Int_t=2)");
181 printf(
"Starting Thread 0\n");
184 printf(
"Starting Thread 1\n");
187 printf(
"Starting Joiner Thread \n");
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)
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...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetSeed(UInt_t seed=0)
Set the random generator seed.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
TFrame * GetFrame()
Get frame.
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Method or function calling interface.
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)
virtual void SetMarkerStyle(Style_t mstyle=1)
Long_t Join(void **ret=0)
Join 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.
virtual void SetMarkerSize(Size_t msize=1)
static Int_t UnLock()
Static method to unlock the main thread mutex.
TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
void tryclosing(Int_t id)
virtual void Update()
Update canvas pad buffers.
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...
void Modified(Bool_t flag=1)