25 TString macroName = gROOT->GetTutorialDir();
26 macroName.Append(
"/foam/foam_demo.C");
27 gROOT->ProcessLine(TString::Format(
".L %s+",macroName.Data()));
30 cout<<
"====================== TestVector ================================"<<endl;
31 TFile fileA(
"foam_demo.root");
33 cout<<
"------------------------------------------------------------------"<<endl;
35 cout<<
"------------------------------------------------------------------"<<endl;
37 cout<<
"------------------------------------------------------------------"<<endl;
38 fileA.ShowStreamerInfo();
39 cout<<
"------------------------------------------------------------------"<<endl;
40 fileA.GetListOfKeys()->Print();
41 cout<<
"------------------------------------------------------------------"<<endl;
43 TFoam *FoamX = (TFoam*)fileA.Get(
"FoamX");
50 TFoamIntegrand * rho = (TFoamIntegrand*) gROOT->ProcessLine(
"return new TFDISTR();");
53 Double_t *MCvect =
new Double_t[2];
55 for(
long loop=0; loop<50000; loop++){
57 FoamX->GetMCvect( MCvect);
60 if(loop<10) cout<<
"(x,y) = ( "<< x <<
", "<< y <<
" )"<<endl;
63 Double_t IntNorm, Errel;
64 FoamX->Finalize( IntNorm, Errel);
65 Double_t MCresult, MCerror;
66 FoamX->GetIntegMC( MCresult, MCerror);
67 cout <<
" MCresult= " << MCresult <<
" +- " << MCerror <<endl;
68 cout<<
"===================== TestPers FINISHED ======================="<<endl;