Store GUID of a file in a TTree


I’m just wondering whether there is some class like TDatime for GUID, which is a string like:

If so, it would be easier store GUID in a TTree and play with them, e.g., compare the GUID from two TTrees to see whether there are from the same file.

If not, could please suggest a way to store them?

Thanks a lot.

The GUID is in ROOT since more than 10 years. Each ROOT directory (hence TFile) has a UUID (see class TUUID at If you have a file you can query its UIID via

myfile->GetUUID or mydirectory->GetUUID In case of a TTree, if you have a TTree *T

TFile *file = T->GetFile(); TUUID *uuid = file->GetUUID()