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
root -l foam_demopers.C
Definition in file foam_demopers.C.