The problem is already solved, just want to post it here for others.
I created my user class to hold the event data. A very basic one with only two members. One is UInt_t variable, the other is an array with the size determined by the first (Uint_t) variable. Everything compiles and links without any error. The tree is filled and written to the file without error. But when accessing the array variable - seg fault.
So what I found out is that if one branch is used as the size for another one, which is a variable length array, it must be int (Int_t)!!! Actually if you try to make it of type long, you will get an error message during the dictionary generation and the branch will simply not be created. But for some reason for type unsigned integer the error is not generated and you have a frustrating seg fault, when trying to read the branch back.
This behaviour is easily reproducible with the tree2a.C example. Just change the nmec member type to UInt_t, and you will get a running program, but trying to access lmec and namec branches from the file will cause seg fault. If you change nmec to be long int, an error will be issued and the branch will not be created.
My ROOT version is 6.05/02