I am running this program for n number of files.
void test()
{
TChain *chTree = new TChain(“tree”);
char *filespec = “file”;
chTree->Add(filespec);
int numEvts= chTree->GetEntries();
for ( int jentry=0; jentry<numEvts ; jentry++ ){
chTree->GetEntry(jentry); // -->LINE:112
}//jentry
It works when I use small n number of files but when I use large number of files it turns the following error.
Error: G__getvariable: expression test.C:112:
Error: Can not access pointer to function 0x0 from interpreter(1)
FILE:/./test.C LINE:112
Error: $()2076181688 Syntax error? test.C:112:
Syntax Error: * test.C:112:
Error: Illegal pointer operation (tovalue) test.C:112:
Error: memory allocation for ((*)2076181688) size=4 pinc=1
FILE:./test.C LINE:112
*** Interpreter error recovered ***
Do you have an idea on how to solve this problem. Please let me know if I did not include enough information.
The process is running out of memory in your case. Your ‘tree’ has many friends tree. Some of those friend trees contains std::vector of object and some event have a very large number of elements. For example look at the result of [code]root [0] TFile *_file0 = TFile::Open(“file.root”)
root [1] InitialHitSeriesReco->Scan(“I3RecoHit@.size()”,"",“colsize=20”)
Row * I3RecoHit@.size() *
0 * 22 *
1 * 186 *
2 * 307 *
…
146 * 17251 *
147 * 1777502 *
148 * 137 *
[/code]So in the entry number 147, there is more than one million and a half elements in the array. Is that really what you expect?
In addition, the compression factor of this tree is 10 (see the output of InitialHitSeriesReco->Print()) which usually means that their might be a problem with the data.