You can try to replace:
"slatc==i"
with:
(TString(“slatc==”) + ((Long_t)i)).Data()
or:
(TString::Format(“slatc==%i”, i)).Data()
Are you really trying to create 96 (= 192 - 97 +1) canvases?
If yes, each of them should have a different “name” (the “title” doesn’t matter).
You can try to replace (btw. no “spaces” in object’s “name”):
"mc8 "
with:
(TString(“mc8_”) + ((Long_t)i)).Data()
or:
(TString::Format(“mc8_%i”, i)).Data()
it works thank you ,
but the canvas is disappearing when the other creates ,
so maybe if i write other “for loop” inside the first one to make a loop over canvases like this :
for(i=97;i<=192;i++){
for(j=1;j<=96;j++){
m_j->cd(); // here is the problem again
ch1.Draw("((trt.tracks.tdctc)+(trt.tracks.tdcbc))/2:sqrt((trt.tracks.adcbc)*(trt.tracks.adctc))",(TString::Format(“slatc==%i”, i)).Data());
}}