Ok i’m not sure if this fits here but here it goes
The new ROOT 6 now follows a more rigorous C++ standard, yet the saved cuts are still following ROOT 5 standards. Thus, once you save multiple cuts , e.g. cutsxxx.C, loading them in ROOT6, especially using a script, throw up plenty of warning etc. So after some investigation, I found that my making small modification to the TCutG.cxx file, all saved cut files now play nice in both ROOT 5 and ROOT 6. The modified bits is shown below
//______________________________________________________________________________
void TCutG::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
{
// Save primitive as a C++ statement(s) on output stream out.
char quote = '"';
out<<" "<<std::endl;
if (gROOT->ClassSaved(TCutG::Class())) {
out<<" ";
} else {
out<<" ";
}
out<<GetName()<<"= new TCutG("<<quote<<GetName()<<quote<<","<<fNpoints<<");"<<std::endl;
out<<" "<<GetName()<<"->SetVarX("<<quote<<GetVarX()<<quote<<");"<<std::endl;
out<<" "<<GetName()<<"->SetVarY("<<quote<<GetVarY()<<quote<<");"<<std::endl;
out<<" "<<GetName()<<"->SetTitle("<<quote<<GetTitle()<<quote<<");"<<std::endl;
SaveFillAttributes(out,GetName(),0,1001);
SaveLineAttributes(out,GetName(),1,1,1);
SaveMarkerAttributes(out,GetName(),1,1,1);
for (Int_t i=0;i<fNpoints;i++) {
out<<" "<<GetName()<<"->SetPoint("<<i<<","<<fX[i]<<","<<fY[i]<<");"<<std::endl;
}
out<<" "<<GetName()<<"->Draw("
<<quote<<option<<quote<<");"<<std::endl;
}
[quote=“couet”]I just tried to generate a TCutg using the toolbar then I saved it as a C file. I macro I get is:
…
When I execute it with ROOT I do not get any warning.[/quote]
I see that you are using 6.07/07 ?
I just compiled a stock version of 6.04/02 (just to make sure) and the cuts I produced using the TreeViewer are quite different
The first cut always have TCutG *:[code]{
//========= Macro generated from object: myCUT/Graph
//========= by ROOT version6.06/02