I am running a compiled program in which I have included some Root libraries. I use this program to create a TTree and fill it with data. I then use the TreeViewer in a Root session to view the data. This has worked until I attempted to include a TVector3 object in the tree.
I have tried the following ways of defining the TBranch:
TVector3* drift1 = new TVector3;
AMStree->Branch(“drift1”, drift1, “fX:fY:fZ”); //one way
AMStree->Branch(“drift1”, “TVector3”, drift1); //other way
Neither of these seem to work. The error that occurs is that all the TVector3 entries appear to be zero. I have confirmed that there are in fact values in the vector before it is put in the tree. Can anyone suggest a reason for this?