Re: Problems with reading root files zlib error

From: Michael Mitrovski <Michael.Mitrovski_at_cern.ch>
Date: Wed, 18 Jun 2008 15:35:29 +0200


Thanks a lot. I will check all my files.

Best regards,

Michael

Am 18.06.2008 um 14:47 schrieb Rene Brun:

> Looking at your files, I see that the file pp_14TeV_15.root is
> corrupted. As a result you cannot import
> the tree header from the file. I have protected your code in the
> version of Read_Files.C in the attachment.
>
> Rene Brun
>
>
> Michael Mitrovski wrote:
>> Hi Rene,
>>
>> Yes I need more than 1 file to reproduce the error. You can find
>> my files, classes and Macro at the following website:
>>
>> http://astro.uni-frankfurt.de/~mitrovski
>>
>> Best regards,
>>
>> Michael
>>
>>
>> Am 18.06.2008 um 12:00 schrieb Rene Brun:
>>
>>> Do you need more than 1 file to reproduce the problem? If not
>>> could you post the necessary information to reproduce your problem?
>>> -scripts Track.cxx, Event.cxx and all possibly referenced files
>>> -your data file somewhere in a public area
>>>
>>> Note that in your loop you should delete fTreeFile.
>>> Or better simplify your problem using a TChain instead.
>>>
>>> Rene brun
>>>
>>> Michael Mitrovski wrote:
>>>> Dear Rooters,
>>>>
>>>> I have the following problem. I have copied raw data files into
>>>> TTrees via my own defined classes. When I trying to read the
>>>> files I receive after a couple of files the following error
>>>> message:
>>>>
>>>> Processed Events: 63500
>>>> Processed Events: 63600
>>>> Processed Events: 63700
>>>> Processed Events: 63800
>>>> Processed Events: 63900
>>>> R__unzip: error in inflate (zlib)
>>>>
>>>> I tried to run my macro under root 5.12 and 5.19 and I got the
>>>> same error messages for both versions. How can I solve this
>>>> problem? My macro is attached. Thanks for the help.
>>>>
>>>> Best regards,
>>>>
>>>> Michael
>>>>
>>>
>>
>
> void Read_Files()
> {
> gROOT->ProcessLine(".L Track.cxx+");
> gROOT->ProcessLine(".L Event.cxx+");
>
> // loop over root files
> Char_t InputFile[200];
> Int_t nFiles = 20;
> Int_t iEvent_nocut = 0;
> for(Int_t iFile = 1; iFile<=nFiles; iFile++)
> {
>
> if (iFile==12) continue;
> sprintf(InputFile ,"pp_14TeV_%i.root",iFile);
> printf(" Open file \n%s\n",InputFile);
> TFile *fTreeFile = new TFile(InputFile);
> TTree *treeEvents = (TTree *) fTreeFile->Get("LHC");
> if (!treeEvents) {
> printf("====>CANNOT read tree header\n");
> continue;
> }
> Event *event = new Event();
> treeEvents->SetBranchAddress("LHC",&event);
>
> for(Int_t iEvent =0; iEvent < treeEvents->GetEntries(); iEvent
> ++)
> {
>
> treeEvents->GetEntry(iEvent);
>
> if(!(iEvent_nocut % 1000 && (iEvent_nocut)))
> {
> printf("Processed Events: %i\n",iEvent_nocut);
> }
>
> iEvent_nocut++;
>
>
> }
> delete fTreeFile;
> }
>
> printf("---------------------\n");
> printf("No. of Events = %f\n",iEvent_nocut);
> printf("---------------------\n");
>
> }
Received on Wed Jun 18 2008 - 15:35:35 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 19 2008 - 11:50:01 CEST