You can find an example in $ROOTSYS/test/Event.
This example shows how to create your own class (files Event.h,
Event.cxx), make a DLL.
To invoke the DLL from an interactive session:
Root > gSystem->Load("libEvent");
Root > Event myevent;
To be able to call your classes interactively, you have to run
your class header files through the preprocessor rootcint.
rootcint generates the C++ code that makes the interactive interface
to the compiled code.
Rene Brun