Problem with TTree::Bronch in ROOT 5.12

Dear Rooters,

I have the strange problem with ROOT 5.12. Some time ago I used successfully the next the two codes (A) and (B). The first code (A) reads data file and creates TTree. The second code (B) reads the created TTree and make something with these data. Both codes used the same class Event. The class Event was translated in to the static library, which was linked with both codes.

Now I retranslated all codes with ROOT 5.12 and found the next error, which arise at the code line

: passed oldsize 64, should be 3342347
Fatal in : unreasonable size <3342347>

I did not touch codes, which were successfully used previosly with ROOT 5.06. The codes are used at the Windows XP+SP2.

What may be changed in the using of TTree?

Thanks in advance,
Andrey Daniel

I excluded static library from the code and compiled it directly with class Event without success. The full code is long. It reads and prepares some data form the mySQL database but the TTrees are opened and created by the next lines:

TChain *TI;
TTree *TO;
EventDSG *pEventG;
EventZ *pEventZ;
TFile FO;

TI = new TChain(“DSGE”);
if(tinout[0] == ‘-’) break;

pEventG = new EventDSG();
pEventZ = new EventZ();


TO = new TTree(“T”,“Argonne 2005”);

The last line generate the error.
File EventZ.h is here

#pragma once

class EventZ :
public TObject
unsigned short run;
unsigned short ngamma;
unsigned short ge_i[20]; //== gamma
unsigned short ge_e[20];
unsigned short ge_t[20];

unsigned short dsax_i;		//== DSAX
unsigned short dsay_i;		//== DSAY
unsigned short dsbx_i;		//== DSBX

unsigned short ma;
unsigned short mb;
float va;
float vb;
float ea;
float eb;
float tke;

virtual ~EventZ(void);
void Reset();



I checked it with Visual Studio 7.1 and 8 with the same results.

Could you please provide a complete running example reproducing the problem?


I attached two projects. The dopplerza project makes an error and it uses mysql project. Files of mysql project were extracted from the ROOT source to create DLL library working with MySQL database. I can not transfer the database and the experimental data having a large volumes. Thus these parts of code were commented.

All of these worked with old ROOT versions. Now I found that the error occures if I load libmysqlr.dll library. Access to MySQL database is necessary to me. Any suggestions will be helpful to me.

Andrey Daniel
mysql.rar (210 KB)
DopplerZA.rar (15.6 KB)

Hi, Daniel

Can you specify which version of MySQL are you using.
I personally has a problem to compile MySQL plugin under CYGWIN.
Only for one particular version - 4.1.21 I was able to find compiler flags
to compile mysql plugin in ROOT.
If you are interested, I can explain you how this can be done - actually,
one should fix it in ROOT CVS too.

As I see, you extract mysql plugin to be able compile it outside of the ROOT. Unfortunately, I do not have full MS VC++ compiler to say that is wrong with you project file.

Another alternative for you - using MySQL ODBC driver.
I had no problem with it before - ODBC plugin for ROOT compiles
normally by default. See class TODBCServer for more information about ODBC plugin.
If you install mysql ODBC connector, you should be able to access your database with the same SQL statements as with native MySQL interface.