Hello,
I'm trying to write a macro to read in values from a TTree in a root file. The following minimal example fails:
#include "TFile.h"
#include "TTree.h"
#include "TBrowser.h"
#include "TH2.h"
#include "TRandom.h"
#include "TCanvas.h"
void read_tree_minimal()
{
TFile *f = new TFile("Ca1Mn47d.lowsanidined.20080506.135053.root");
static Double_t energy;
return;
}
root [0] .x read_tree_minimal.C
Error: No memory for static energy\23b\0 read_tree_minimal.C:12:
The same macro compiles without error:
root [1] .x read_tree_minimal.C++
Info in <ACLiC>: script has already been loaded in interpreted mode Info in <ACLiC>: unloading /home/rmason/test/root/./read_tree_minimal.C and compiling it Info in <TUnixSystem::ACLiC>: creating shared library /home/rmason/test/root/./read_tree_minimal_C.so /home/rmason/test/root/./read_tree_minimal.C: In function 'void read_tree_minimal()':/home/rmason/test/root/./read_tree_minimal.C:11: warning: unused variable 'f' /home/rmason/test/root/./read_tree_minimal.C:12: warning: unused variable 'energy'
Perhaps someone would be kind enough to point out what is wrong.
Thanks,
Roger
Gentoo linux:
ROOT 5.20/00 (trunk_at_24524, Oct 01 2008, 15:00:00 on linux) Received on Fri Oct 03 2008 - 18:49:54 CEST
This archive was generated by hypermail 2.2.0 : Fri Oct 03 2008 - 23:50:02 CEST