I’m just wondering whether there is some class like TDatime for GUID, which is a string like:
8AA5E430-4F99-11DF-8BB8-00074305D05B
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.
The GUID is in ROOT since more than 10 years. Each ROOT directory (hence TFile) has a UUID (see class TUUID at root.cern.ch/root/html/TUUID.html). 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