Hello again,
I’m reading in a tree and using it to generate a TGraph:
void GetTimeComp(char *infilename) {
gStyle->SetOptFit(1111);
TFile* fin = new TFile(infilename,"read");
TTree* uin = (TTree*) fin->Get("tUCN");
static const Int_t n = uin->GetEntries();
Double_t entry[n],timeE[n];
ULong_t prev = 0;
for(int i=0;i<n;i++) {
sin->GetEvent(i);
timeE[i] = tTimeE;
entry[i] = tEntry - prev;
prev = tEntry;
}
TGraph *gEventE = new TGraph(n,timeE,entry);
...
}
However, I get the error,
I tried moving the static declaration as high up as possible, but the error remains. I do NOT have a gROOT->Reset() command. It will run if I do
[midas@localhost UCNAnalyzer]$ root GetTimeComp.C+
root [0]
Processing GetTimeComp.C+...
[midas@localhost UCNAnalyzer]$
So presumably it compiles, but the output.root won’t open and I would prefer to view the output in CINT before converting to a compiled program. Is there a workaround so that I can run this on CINT instead of ACLiC?