23void *handle(
void *ptr)
 
   30   sprintf(
name,
"hpx%ld",nr);
 
   32   hpx[nr] = 
new TH1F(
name,
"This is the px distribution",100,-4,4);
 
   37   for (
Int_t i = 0; i < nfills; i++) {
 
   41      if (i && (i%upd) == 0) {
 
   48         if (
c[nr]) 
c[nr]->Modified();
 
   82   c[0] = 
new TCanvas(
"c0",
"Dynamic Filling Example",100,20,400,300);
 
   83   c[0]->SetFillColor(42);
 
   84   c[0]->GetFrame()->SetFillColor(21);
 
   85   c[0]->GetFrame()->SetBorderSize(6);
 
   86   c[0]->GetFrame()->SetBorderMode(-1);
 
   87   c[1] = 
new TCanvas(
"c1",
"Dynamic Filling Example",510,20,400,300);
 
   88   c[1]->SetFillColor(42);
 
   89   c[1]->GetFrame()->SetFillColor(21);
 
   90   c[1]->GetFrame()->SetBorderSize(6);
 
   91   c[1]->GetFrame()->SetBorderMode(-1);
 
   92   c[2] = 
new TCanvas(
"c2",
"Dynamic Filling Example",100,350,400,300);
 
   93   c[2]->SetFillColor(42);
 
   94   c[2]->GetFrame()->SetFillColor(21);
 
   95   c[2]->GetFrame()->SetBorderSize(6);
 
   96   c[2]->GetFrame()->SetBorderMode(-1);
 
   97   c[3] = 
new TCanvas(
"c3",
"Dynamic Filling Example",510,350,400,300);
 
   98   c[3]->SetFillColor(42);
 
   99   c[3]->GetFrame()->SetFillColor(21);
 
  100   c[3]->GetFrame()->SetBorderSize(6);
 
  101   c[3]->GetFrame()->SetBorderMode(-1);
 
  104   c[0]->Connect(
"Closed()", 0, 0, 
"closed(Int_t=0)");
 
  105   c[1]->Connect(
"Closed()", 0, 0, 
"closed(Int_t=1)");
 
  106   c[2]->Connect(
"Closed()", 0, 0, 
"closed(Int_t=2)");
 
  107   c[3]->Connect(
"Closed()", 0, 0, 
"closed(Int_t=3)");
 
  114   printf(
"Starting Thread 0\n");
 
  115   t[0] = 
new TThread(
"t0", handle, (
void*) 0);
 
  117   printf(
"Starting Thread 1\n");
 
  118   t[1] = 
new TThread(
"t1", handle, (
void*) 1);
 
  120   printf(
"Starting Thread 2\n");
 
  121   t[2] = 
new TThread(
"t2", handle, (
void*) 2);
 
  123   printf(
"Starting Thread 3\n");
 
  124   t[3] = 
new TThread(
"t3", handle, (
void*) 3);
 
  126   printf(
"Starting Thread 4\n");
 
  127   t[4] = 
new TThread(
"t4", joiner, (
void*) 3);
 
  133      for (
int i = 0; i < 4; i++) {
 
  134         if (
c[i] && 
c[i]->IsModified()) {
 
  146   delete t[0]; t[0] = 
nullptr; 
 
  147   delete t[1]; t[1] = 
nullptr;
 
  148   delete t[2]; t[2] = 
nullptr;
 
  149   delete t[3]; t[3] = 
nullptr;
 
  150   delete t[4]; t[4] = 
nullptr;
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
 
R__EXTERN TSystem * gSystem
 
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
 
1-D histogram with a float per channel (see TH1 documentation)}
 
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
Random number generator class based on M.
 
This is the base class for the ROOT Random number generators.
 
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 void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
 
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
 
<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.
 
Int_t Kill()
Kill this thread.
 
Long_t Join(void **ret=nullptr)
Join this thread.
 
Int_t Run(void *arg=nullptr, const int affinity=-1)
Start the thread.
 
static Int_t Lock()
Static method to lock the main thread mutex.