This simple macro demonstrates persistency of FOAM object.
First run macro foam_demo.C to create file foam_demo.root with FOAM object.
Next type root -l foam_demopers.C
from shell command line
{
macroName.
Append(
"/foam/foam_demo.C");
cout<<"====================== TestVector ================================"<<endl;
TFile fileA(
"foam_demo.root");
fileA.cd();
cout<<"------------------------------------------------------------------"<<endl;
fileA.ls();
cout<<"------------------------------------------------------------------"<<endl;
fileA.Map();
cout<<"------------------------------------------------------------------"<<endl;
fileA.ShowStreamerInfo();
cout<<"------------------------------------------------------------------"<<endl;
fileA.GetListOfKeys()->Print();
cout<<"------------------------------------------------------------------"<<endl;
for(long loop=0; loop<50000; loop++){
if(loop<10) cout<<"(x,y) = ( "<< x <<", "<< y <<" )"<<endl;
}
cout << " MCresult= " << MCresult << " +- " << MCerror <<endl;
cout<<"===================== TestPers FINISHED ======================="<<endl;
return 0;
}
- Author
- Stascek Jadach
Definition in file foam_demopers.C.