any suggestions on how to avoid this problem? it seems strictly related to the length of the title.
void test(){
TH2F* tempTH2F1 = new TH2F("testName1", "testTitle1", 32, 0.5, 32.5, 68, 0.5, 68.5);
TH2F* tempTH2F2 = new TH2F("testName2", "testTitle2", 32, 0.5, 32.5, 68, 0.5, 68.5);
string histName1 = tempTH2F1->GetName();
string histName2 = tempTH2F2->GetName();
tempTH2F1->SetTitle("Simulated (50ns BC) Pixel Hit Rate (Hits/cm^{2}/s) per ROC for Disk -1");
tempTH2F2->SetTitle("Simulated (50ns BC) Pixel Hit Rate (Hits/cm^{2}/s) per ROC for Disk -10");
TCanvas* tempCanvas1 = new TCanvas(histName1.c_str());
TCanvas* tempCanvas2 = new TCanvas(histName2.c_str());
tempCanvas1->cd();
tempTH2F1->Draw();
tempCanvas1->Print((histName1 + ".png").c_str());
tempCanvas2->cd();
tempTH2F2->Draw();
tempCanvas2->Print((histName2 + ".png").c_str());
delete tempTH2F1;
delete tempTH2F2;
}