Hello all,
I'm trying to analyse some data I created in GEANT4 using ROOT and I'm using the ROOT book Trees chapter Example 4: A Tree with an Event Class.
The problem is that it doesn't work as expected.
I get the error:
Error: Symbol myTree is not defined in current scope sphericalLEFS60.cc:14:
Error: Failed to evaluate myTree->SetCacheSize(100000000)
Whats bugging me here is that: myTree->Print(); works as expected and shows
all my tree structure, but other operations in myTree simply don't work
(that is, it's not just myTree->SetCacheSize(100000000); that gives my
problems it's also many other things, like: TBranch* bEvent = myTree
->GetBranch("EventBranch");) I really don't know what to do, since I cannot
see any problem with the code and it's exactly as the example on the book.
{ // init macro
gROOT->Reset();
if(!TClassTable::GetDict("hiscaleSimEventTree")) {
gSystem->Load("../libs/libhiscaleSimEventTree.so");
}
// read the tree file generated in GEANT4
TFile* treeFile = new TFile("sphericalLEFS60.root");
treeFile->ls();
TTree *myTree = (TTree*)treeFile->Get("hiscaleSim");
myTree->Print();
myTree->SetCacheSize(100000000); // or many other stuuf like: TBranch* bEvent = myTree->GetBranch("EventBranch");
} Received on Fri Dec 18 2009 - 14:16:08 CET
This archive was generated by hypermail 2.2.0 : Fri Dec 18 2009 - 17:50:03 CET