Trouble with Branch

Hi,

I am using v5.34/14 on Windows.

I use the struct below to store data:

struct stats {

unsigned int counter[2][3][4];
double x[2][3][4];
double y[2][2];

#if !defined (NET_CINT) && (!defined (CINT) || defined (MAKECINT))
ClassDef(stats,1);
#endif
};

The above struct is used by a class which among others has the following members:

stats Statistics;
TTree * tree;

The pointer “tree” is initialized in the class constructor and the class is part of a package compiled into a dll using VC++ 10 and ran from CINT.

The data in Statistics is updated in a loop and at the end of each iteration tree->Fill() is called.

If I define

tree->Branch(“Queue_Statistics”, &Statistics);

what happens is the data in Structure and in the tree are set in the first call of the first iteration and subsequently do not change. It is strange because other methods overwrite the data during subsequent iterations, but when a TTree using Structure is defined the data are frozen to the values of the first call and the subsequent overwrites have no effect.

If I comment out the branch definition above, then the data are updated normally (but are not saved in the tree).

Any idea what is going on and how to get the branch to work properly?

Thanks!

Marios