May be you can find some help with these posts:
https://root.cern.ch/root/roottalk/roottalk01/2640.html