TPDF error with caractor

I have faced on mysterious error when I save some pictures.
It does not matter which kind of format used. e.g. pdf, png.

Following is test of canvas saving code.

const Int_t DNum = 7564;
const TString Suffix = "official";
const Int_t MC = 0;
const Int_t var = 12;
for(Int_t inorm = 0; inorm < 6; inorm++)
   TCanvas* c1 = new TCanvas("c1", "", 0, 0, 600, 600);
   c1->SaveAs(Form("Scaled/var%d_%d_MC%d_N%d_%s.pdf", var, DNum, MC, inorm, Suffix.Data()));

This code just make canvas and save to the directory “Scaled”.
If I save in the current directory, the code works well.
But error occurs when I save in the “Scaled” directory.

This is the error message.

ERROR in TPDF::Open: Cannot open file:Scaled/N0_v0_PR7564_MC0_official.pdf

Mysterious thing is that if I use different name instead of PR7564 like PR6543, it works.

What is the reason of this error and how can I fix it?

Thank you.

_ROOT Version: 6.06/01
_Platform: CentOS 7.3
_Compiler: gcc700

May be te file PR7564 already exits and cannot be overwritten ? (see its write permissions)

No its not matter of existence of result file.
And it is my own directory. I don’t need permission.

I don’t know what is the exact process inside root.
But it is related with files inside directory.
I have separated the stored directory.
Then it is resolved.

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