Hi Rooters,
What may be wrong?
I wrote TTree with own class in the TFile
on Alpha computer. It was possible to work with it
by interpreter (2.23/12) and by the translated code.
Now the file was moved on PC working under Windows 98.
I translated my class as a .dll library and it works
with interpreter. Wheh the code that is similar
to using on Alpha has been translated.
The output result was:
TFile** e:\Tf99\tape7.root
TFile* e:\Tf99\tape7.root
KEY: TTree T;58 "Experiment TF99"
KEY: TTree T;57 "Experiment TF99"
KEY: TTree T;56 "Experiment TF99"
Error in <TKey::ReadObj>: Unknown class TTree
The key part of code is inserted. I can not understand
what is wrong. The file is very large to read it by
interpreter only. Thanks in advance.
Andrei
#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
#include <TH1.h>
#include "F3Event.h"
// extern void InitGui();
// VoidFuncPtr_t initfuncs[] = {InitGui,0};
// TROOT root("rint","The Root",initfuncs);
void main()
{
TROOT simple("simple", "Read TFile and write h1 in a new one");
int i,j,n,k;
TFile *Fread = new TFile("e:/Tf99/tape7.root","read");
Fread->ls();
TTree *T = (TTree*)Fread->Get("T");
T->Print(); <== Code stop with error here
F3Event *Event = new F3Event();
T->SetBranchAddress("B",&Event);
n = T->GetEntries();
printf("%i\n",n);
--
*******************************************************
* Andrei V. Daniel
* Department of Physics & Astronomy, P.O. Box 1807-B
* Vanderbilt University Tel: (615) 322 2646
* Nashville, TN 37235, USA Fax: (615) 343 7263
*******************************************************
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET