Hi,
I want to merge some TTrees and then write the "big" tree to a file. As I
have to do this with thousands of files, I don't want to have an
interactiv root-macro, but an executable program.
My macro is working interactively, but it doesn't compile!
Here the error message at compiling (you can see the version of root I
use in it):
g++ -g -c -o mergetree.o mergetree.cc
-I/afs/cern.ch/sw/root/v3.04.02/rh72_gcc2953/root/include
g++ -o mergetree mergetree.o
-L/afs/cern.ch/sw/root/v3.04.02/rh72_gcc2953/root/lib -lCore -lCint -ldl
-lHist -lMatrix -lGpad -lGraf -lPostscript
mergetree.o: In function `main':
/afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:18: undefined
reference to `TChain::TChain(char const *, char const *)'
/afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:31: undefined
reference to `TChain::~TChain(void)'
/afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:32: undefined
reference to `TChain::~TChain(void)'
collect2: ld returned 1 exit status
make: *** [mergetree] Error 1
and here my .cc file, where I already made comments for everything else
then defining my tree:
#include <TROOT.h>
#include <TApplication.h>
#include <stdio.h>
#include <TTree.h>
#include <TChain.h>
#include <iostream.h>
int main(int argc, char *argv[]){
TApplication theApp("app",&argc,argv);
gROOT->Reset();
char s[100];
TChain tree("CBNT/h3333");
for (int j=1;j<4;j++){
sprintf(s,"dijet%d.root",j);
cout <<s<<endl;
// tree.Add(s);
}
//tree.Merge("merge.root");
cout <<"done"<<endl;
theApp.Run();
return 0;
}
It would be fine, if you could help me!
Martina
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET