Re: RFIO file corruption

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Mon, 25 Jun 2012 16:13:36 +0200


Hi Yannick,

    do you see the same problem when directly using rfio:// protocol and not via DPM? I've no idea which version of RFIO and how it is used via the DPM plugin.

Cheers, Fons.

On 25/06/2012 14:18, Yannick Patois wrote:
> Hi,
>
> I have a very simple code that write a root file through RFIO.
>
> For small files it works fine, with big ones, the resulting root file is
> corrupted. Any suggestion? Thanks.
>
>
>
> $ /libcern/root/5.32.01/sl5.7-x86_64/bin/root AGATREE-rfio.root
> * W E L C O M E to R O O T *
>
> ROOT 5.32/01 (tags/v5-32-01_at_43181, Feb 29 2012, 16:46:43 on linuxx8664gcc)
>
> CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0]
> Attaching file AGATREE-rfio.root as _file0...
> Error in <TCint::CheckClassInfo>: unexpected token : in
> ??(j4E?u??W????6?????>????~c?????8??0;b"n???p,K;>?cbm?xB[??8?}:c.?B??>?t?-_??3k??}-?\?A??P??;????y
> ????7?R??*mf???v*???+??2@?w?K??N???N??q(7n)??H??'iry8?u:?(?7X?
> Error in <TKey::ReadObjWithBuffer>: Unknown class
> ??(j4E?u??W????6?????>????~c?????8??0;b"n???p,K;>?cbm?xB[??8?}:c.?B??>?t?-_??3k??}-?\?A??P??;????y
> ????7?R??*mf???v*???+??2@?w?K??N???N??q(7n)??H??'iry8?u:?(?7X?
> Info in <TFile::GetStreamerInfoList>: cannot find the StreamerInfo
> record in file AGATREE-rfio.root
>
> The actual code is below:
>
> <<<<<
> #include <iostream>
> #include <string>
>
> #include <TROOT.h>
> #include <TFile.h>
> #include <TTree.h>
> #include <TRandom.h>
> #include <TRFIOFile.h>
>
>
> int main(void) {
> std::string fn1;
> //fn1 = "AGATREE-local.root";
> fn1 =
> "rfio:////dpm/in2p3.fr/home/vo.agata.org/ypatois/agata/AGATREE-rfio.root";
> TFile *rootfile;
> TTree *tree;
> int intmax=10;
> Float_t *gE = new Float_t[intmax];;
> Float_t *gT = new Float_t[intmax];
> int ng=intmax;
> rootfile = TFile::Open(fn1.c_str(),"RECREATE");
> rootfile->cd();
>
> tree = new TTree("Events","Events");
> tree->Branch("ng",&ng,"ng/I"); // FIXME
> tree->Branch("gE", gE, "gE[ng]/F");
> tree->Branch("gT", gT, "gT[ng]/F");
>
> TRandom r;
> for (int i=0;i<1000000;i++) {
> if (! (i%10000) ) {
> std::cout << "Event: " << i << std::endl;
> }
> for (int j=0;j<8;j++) {
> gE[j]=r.Rndm()*1000;
> gT[j]=r.Rndm()*1000;
> }
> tree->Fill();
> }
> tree->Write();
> rootfile->Close();
> delete rootfile;
> return 0;
> }
>>>>>>
>
>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers_at_cern.ch              Phone: +41 22 7679248
WWW:    http://fons.rademakers.org           Fax:   +41 22 7669640




Received on Mon Jun 25 2012 - 16:13:48 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 26 2012 - 11:50:01 CEST