I am using Root 5.26.00a and I want to loop over a list of root-trees which i copied from castor to my local machine.
While looping over all Events in my root-trees i get error messages similar to the following:
The error messages occurs to different files each run.
From other topics in this forum I know that the reason could be corrupted root-files. I tried to exchange the files with error messages but the error still remains.
Refering to /viewtopic.php?p=38863 I tried to load one of the files as TFile and to run Map() on it. The resulting output has some “gaps” in it:
[quote]Could those gaps be the origin of my error messages? Where do those gaps come from? Is there a way to fix them?[/quote]No they are normal occurence and should result in nothing more than a little bit of wasted space on disk. The only way to get rid of them is to rewrite the file making absolutely sure that no key is ever deleted (i.e. you need to disable the TTree Autosave mechanism).
[quote] I tried to exchange the files with error messages but the error still remains.[/quote]What do you mean by exchange?
I noted that in your example the same exact error is repeated twice. Is there error in other files and/or in other places in the file?
Thanks for your answer and sorry if I was not clear enough.
The posted error message is a fragment of one of the error messages I get. It consists of two parts.
The first part is:
which is repeated several times.
Then the second part (
) follows and is repeated even more times.
For my analysis I read in a list of root-files (each of them containing a root-tree) and then I loop over all events included in these trees. The script uses the MakeClass-function and works well for other analysis(i.e. other type of trees).
During this loop the error messages occur. There is usually more than one error message during a run. And the files which lead to the errors change each run.
By exchange I meant that I deleted the files producing error messages from my local machine and copied them again from castor.
Any idea what the reason for the error could be? What could I do to get more information about the problem (or to solve it)?
[quote]By exchange I meant that I deleted the files producing error messages from my local machine and copied them again from castor.[/quote]This is likely to mean that this file is corrupted as written in castor. There is also a possibly that your code has memory over-writte problem. To assert which is which, can you send me one of your failing files?
I managed to find a file which produced an error some time ago and which is small enough to be uploaded here. Most of the files are much larger.
Usually when running over a single file no error message occurs even if there was an error in that file in the complete run (with all files). Only in some rare cases there was an error message while running over a single file. Therefore I do not know whether you can reproduce my error messages with the uploaded file.
[quote]Usually when running over a single file no error message occurs even if there was an error in that file in the complete run (with all files). Only in some rare cases there was an error message while running over a single file. [/quote]This usually means that the problem is not with the files but with the scripts and/or the way the user object addresses are set. I recommend that you either send us a simple complete running example showing the problem or that you try to use valgrind to pinpoint the (potential) memory error.