Errors: Statement parameter too long ; and Warning in <TF

Dear All

I am using Version 5.13/04e 13 December 2006 *
Compiled on 14 December 2006 for linux with thread support.

I have 2 problems as following

  1. Statement parameter too long
    eg. First line (with which I got the above error) has more than 1000 characters and also after about 1000 characters it says ; missing. Then I changed the name of the leaves and made it within 1000 characters. It runs successfully. So my first question is can I increase the limit of characters so that I would not have to change the name of the leaves?
    //newtree->Branch(“Inclinometer”,&Inclinometer.In1X_1p1,“MEp1_incline1_Xp_Ym_OUT_X/F:MEp1_incline2_Xp_Ym_OUT_X:MEp1_incline3_Xm_Yp_OUT_X:MEp1_incline4_Xm_Yp_OUT_X:MEp1_incline5_Xm_Yp_OUT_X:MEp1_incline6_Xm_Yp_OUT_X:MEp1_incline1_Xp_Ym_OUT_Y:MEp1_incline2_Xp_Ym_OUT_Y:MEp1_incline3_Xm_Yp_OUT_Y:MEp1_incline4_Xm_Yp_OUT_Y:MEp1_incline5_Xm_Yp_OUT_Y:MEp1_incline6_Xm_Yp_OUT_Y:MEp2_incline1_Xp_Ym_OUT_X:MEp2_incline2_Xp_Ym_OUT_X:MEp2_incline3_Xm_Yp_OUT_X:MEp2_incline4_Xm_Yp_OUT_X:MEp2_incline5_Xm_Yp_OUT_X:MEp2_incline6_Xm_Yp_OUT_X:MEp2_incline1_Xp_Ym_OUT_Y:MEp2_incline2_Xp_Ym_OUT_Y:MEp2_incline3_Xm_Yp_OUT_Y:MEp2_incline4_Xm_Yp_OUT_Y:MEp2_incline5_Xm_Yp_OUT_Y:MEp2_incline6_Xm_Yp_OUT_Y:MEp3_incline1_Xp_Ym_OUT_X:MEp3_incline2_Xp_Ym_OUT_X:MEp3_incline3_Xm_Yp_OUT_X:MEp3_incline4_Xm_Yp_OUT_X:MEp3_incline5_Xm_Yp_OUT_X:MEp3_incline6_Xm_Yp_OUT_X:MEp3_incline1_Xp_Ym_OUT_Y:MEp3_incline2_Xp_Ym_OUT_Y:MEp3_incline3_Xm_Yp_OUT_Y:MEp3_incline4_Xm_Yp_OUT_Y:MEp3_incline5_Xm_Yp_OUT_Y:MEp3_incline6_Xm_Yp_OUT_Y:MEp4_incline1_Xp_Ym_OUT_X:MEp4_incline2_Xp_Ym_OUT_X:MEp4_incline3_Xm_Yp_OUT_X:MEp4_incline4_Xm_Yp_OUT_X:MEp4_incline5_Xm_Yp_OUT_X:MEp4_incline6_Xm_Yp_OUT_X:MEp4_incline1_Xp_Ym_OUT_Y:MEp4_incline2_Xp_Ym_OUT_Y:MEp4_incline3_Xm_Yp_OUT_Y:MEp4_incline4_Xm_Yp_OUT_Y:MEp4_incline5_Xm_Yp_OUT_Y:MEp4_incline6_Xm_Yp_OUT_Y:MEp1_2_2_incline1_Xm_Yp_OUT_X:MEp1_2_8_incline2_Xm_Yp_OUT_X:MEp1_2_14_incline3_Xm_Yp_OUT_X:MEp1_2_20_incline4_Xm_Yp_OUT_X:MEp1_2_26_incline5_Xm_Yp_OUT_X:MEp1_2_32_incline6_Xm_Yp_OUT_X:MEp1_2_2_incline1_Xm_Yp_OUT_Y:MEp1_2_8_incline2_Xm_Yp_OUT_Y:MEp1_2_14_incline3_Xm_Yp_OUT_Y:MEp1_2_20_incline4_Xm_Yp_OUT_Y:MEp1_2_26_incline5_Xm_Yp_OUT_Y:MEp1_2_32_incline6_Xm_Yp_OUT_Y”);
    newtree->Branch(“Inclinometer”,&Inclinometer.In1X_1p1,“MEp1incline1_X/F:MEp1incline2_X:MEp1incline3_X:MEp1incline4_X:MEp1incline5_X:MEp1incline6_X:MEp1incline1_Y:MEp1incline2_Y:MEp1incline3_Y:MEp1incline4_Y:MEp1incline5_Y:MEp1incline6_Y:MEp2incline1_X:MEp2incline2_X:MEp2incline3_X:MEp2incline4_X:MEp2incline5_X:MEp2incline6_X:MEp2incline1_Y:MEp2incline2_Y:MEp2incline3_Y:MEp2incline4_Y:MEp2incline5_Y:MEp2incline6_Y:MEp3incline1_X:MEp3incline2_X:MEp3incline3_X:MEp3incline4_X:MEp3incline5_X:MEp3incline6_X:MEp3incline1_Y:MEp3incline2_Y:MEp3incline3_Y:MEp3incline4_Y:MEp3incline5_Y:MEp3incline6_Y:MEp4incline1_X:MEp4incline2_X:MEp4incline3_X:MEp4incline4_X:MEp4incline5_X:MEp4incline6_X:MEp4incline1_Y:MEp4incline2_Y:MEp4incline3_Y:MEp4incline4_Y:MEp4incline5_Y:MEp4incline6_Y:In2X_1p1:In2X_1p2:In2X_1p3:In2X_1p4:In2X_1p5:In2X_1p6:In2Y_1p1:In2Y_1p2:In2Y_1p3:In2Y_1p4:In2Y_1p5:In2Y_1p6”);

  2. Warning in TFile::Init: file MTCC_II_Analog_Calibrated.root probably not closed, trying to recover
    Warning in TFile::Init: no keys recovered, file has been made a Zombie
    After it runs successfully. the root file appears but when I try to open, there is nothing when the number of events are larger about 7000 events (but works fine with 3000) with the above warning.
    Can anybody help on these issues?
    Thanks
    samir

You need to finish your tree filling session with something like file->Write();

[quote]First line (with which I got the above error) has more than 1000 characters and also after about 1000 characters it says ; missing[/quote]Either compile your code (via ACliC) or separate your branch is several smaller branches …

Better yet, do NOT use this leaflist method, instead generate the dictionary for your struct and use:newtree->Branch(""Inclinometer",&pointer_to_Inclinometer);

Cheers,
Philippe

Thanks Philippe
I have used file->Write(); and working for less number of events. Only for higher number of events, this message appears. weird !!!

newtree->Branch("“Inclinometer”,&pointer_to_Inclinometer);

we would like to have these leaves in a folder. So i am using struct method. There are many sensors so I want them to group and put in folder. Is there any way for folder options?

cheers
samir

[quote]There are many sensors so I want them to group and put in folder. Is there any way for folder options?[/quote]Yes, generating the dictionary for your struct and using the method I describe will give a ‘folder’.
Even better you can sub-divise your sensors in sub-groups by creating several struct/class containing a sub group and one main class containing one object of each sub-group. (Then you would have folder within folder).

Possibly your reach the number of event where ROOT switch over to a new file. In which case, the correct syntax is:tree->GetDirectory()->GetFile()->Write();.
You can also set the switch to a (much) large value by calling TTree:: SetMaxTreeSize

Cheers,
Philippe

Hi Phillippe

Thanks.
I was able o run the script without any change locally and there was no warning while opening the root file. When I was running it at afs, there was warning and no contents in root file. But the generating dictionary, I could not do it. So I made the the name of the leaves short temporarily. I tried to use the code but did not work for me due to my lack of experience.
newtree->Branch(“Inclinometer”,&pointer_to_Inclinometer);

cheers
samir

Let me know if you need any additional help.

Cheers,
Philippe