Hi Rooters, I got some peculiar results recently while using different extension on my macro files. I'm using versions 3.02/07 and 3.03/02, "Intel x86 Linux for Redhat 6.1 (glibc 2.1) and gcc2.95.2, version 3.03/02", both precompiled or locally compiled on debian linux. Here is my problem. I try to create some simple histogram from a macro: void macro1() { TFile* outfile = new TFile("rest.root","recreate"); TH1F* exxp = new TH1F("exxp","exxp",1,0,1); outfile->Write(); outfile->Close(); } When stored in a file named macro1.c I get root [0] .L macro1.c root [1] macro1() *** Break *** segmentation violation Root > Function macro1() busy flag cleared or root [0] .x macro1.c *** Break *** segmentation violation Root > Function macro1() busy flag cleared HOWEVER, when I put the same macro in a file called macro1.cpp everything works just fine. But then, after quitting and restarting root, when I try to read my little sample histogram with the following macro: macro2() { TFile* f = new TFile("test.root"); TH2F* h = (TH2F*)f->Get("exxp"); } I get this: root [0] .L macro2.c root [1] macro2() WARNING, the StreamerInfo of class TH1 read from file test.root has the same version (=4) as the active class but a different checksum. You should update the version to ClassDef(TH1,5). Do not try to write objects with the current class definition, the files will not be readable. WARNING, the StreamerInfo of class TAxis read from file test.root has the same version (=7) as the active class but a different checksum. You should update the version to ClassDef(TAxis,8). Do not try to write objects with the current class definition, the files will not be readable. WARNING, the StreamerInfo of class THashList read from file test.root has the same version (=0) as the active class but a different checksum. You should update the version to ClassDef(THashList,1). Do not try to write objects with the current class definition, the files will not be readable. WARNING, the StreamerInfo of class TCollection read from file test.root has the same version (=3) as the active class but a different checksum. You should update the version to ClassDef(TCollection,4). Do not try to write objects with the current class definition, the files will not be readable. whereas using the extension .cpp seems to work OK: root [0] .L macro2.cpp root [1] macro2() root [2] What is going on!??!? Am I doing something stupid or is CINT broken? Greetings, -- Gerco Dr. C.J.G. Onderwater, VRAP Nuclear Physics Laboratory 476 Loomis Laboratory of Physics University of Illinois at Urbana-Champaign 1110 West Green Street Urbana, IL 61801-3080 Phone : (217) 244-7363 Fax : (217) 333-1215 E-mail: onderwat@uiuc.edu
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:47 MET