RFIO file corruption

From: Yannick Patois <yannick.patois_at_iphc.cnrs.fr>
Date: Mon, 25 Jun 2012 14:18:28 +0200


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

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;
}
>>>>>
-- 
Yannick Patois <yannick.patois_at_iphc.cnrs.fr>
IPHC - IN2P3 / CNRS - 23 rue du Loess 67037 Strasbourg
Tel: 03 88 10 61 83



Received on Mon Jun 25 2012 - 14:18:43 CEST

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