Adding Metadata to TCanvas Printed File

Dear Experts,

I’d like to store some data in the file which is not necessarily useful on the plots itself, like the version of the software (running on top of ROOT) that is being used to generate such plots. Is there any way to set metadata on the file which is saved when using TCanvas::Print(). If so, how?

Thanks a lot,

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

as far as I know there is no such tool in ROOT (Olivier correct me)
But you could use exiftool as afterburner
This works at least for jpg, png, gif pdf

exiftool -Comment=rootversion6.14.04 myfile.png
exiftool -Keyords=rootversion6.14.04 myfile.pdf

To find out which fields you may (ab)use just do:

exiftool myfile.jpg

It does not work with ps files


I’d like to understand your idea better. What do you print the TCanvas into (which file format)?

This exist for PostScript files

   TCanvas *C = new TCanvas("C","C");

   gStyle->SetHeaderPS("\n%% HELLO\n");
   C ->DrawFrame(0.,0.,1.,1.);