Using the library made by ACLiC

Hi,
I have written the analysis code and compiled it by using the ACLiC.
And I use macro code to open the root file.
I found that I got different result of certain file whether the file is processed firstly or not.
To figure out that it is bug in my code or not, I just put the following code in front of the analysis part.

void analysis(){

TFile * f = new TFile(“filename”);
TTree t = (TTree)f->Get(“treename”);
t->GetEntry();
delete f;
// my analysis part
for (){
TFile * file = new TFile(“filenameforloop”);
TTree tree = (TTree)f->Get(“treename”);

delete file;
}

return;
}
and execute by

root -l preanalysis.cxx+ analysis.cxx

Then the result of first file just changed into the result as this file is not processed firstly.
The root file contains the format of my own class.
Is there anything wrong on using the library?

Regards,

Yi-Lin Yang

Since there is no code involving (or showing the use of) the preanalysis.cxx code in your example, I’m afraid there is too little information to guess what could be wrong…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.