Thanks Rene for your answer, but it doesn’t work properly.
In fact I have to execute the Atlas template ROOt file (the “rootlogon.C” which I copied to “atlas.C”) ant then use objects defined there in my compiled c++ code.
If I do the following at the ROOT prompt (interactevely), it works well:
root [0] .x ~/rootmacros/atlas.C
Welcome to the ATLAS rootlogon.C
root [1] atlasStyle->SetTitleSize(0.06,“Y”);
root [2]
But if I do the following on my c++ compiled code, I get errors; it seems that the macro is not executed:
**** my code *******
void RPlot::PlotCSC(TString histoname, TString linlog, TString savename, Int_t rebin, TString xlabel, TString ylabel, TString title)
{
gROOT->ProcessLine(".X ~/rootmacros/atlas.C");
atlasStyle->SetTitleSize(0.06,“Y”);
gROOT->ForceStyle();
…
myMarkerText(0.73,0.75,4,20,“tt”);
…
}
******** Errors I get: *************
~/trunk/src/RPlot.C: In member function ‘void RPlot::PlotCSC(TString, TString, TString, Int_t, TString, TString, TString)’:
~/trunk/src/RPlot.C:1790: error: ‘atlasStyle’ was not declared in this scope
~/trunk/src/RPlot.C:1940: error: ‘myMarkerText’ was not declared in this scope
make: *** [/localscratch/COMPILE_CUSTOM/objs/RPlot.o] Error 1
[rbianchi@hefr34] ~/trunk $
You can find the “rootlogon.C” ATLAS file (that I copied to "atlas.C’), I want to execute within my code, at:
http://atlas.web.cern.ch/Atlas/GROUPS/GENERAL/SCINOTES/templates/root/rootlogon.C
Thanks again for your precious help!
Ric.