//ThreadTest.cpp #include "ThreadTest.h" #include "TString.h" #include "TRandom1.h" #include "TStopwatch.h" #include using namespace std; ThreadTest::ThreadTest(Int_t n):s1(0),s2(0),N(n),sections(100),iterations(100){ data=new Double_t[sections]; for(Int_t i=0;iRun(); } } ThreadTest::~ThreadTest(){ delete[] data; for(Int_t i=0;is1.Wait(); Bool_t more; Int_t thisSection; do{ thisSection=test->getNextSection(); more=thisSection>=0; if(more){ test->analyzeSection(thisSection); } }while(more); test->s2.Post(); } return NULL; } void ThreadTest::run(){ TStopwatch stopwatch; stopwatch.Start(); for(Int_t index=0;index