Avoiding very long name in TDirectory

Dear experts,

I have a TFile with a directory structure like

  • exp1
    — fits
  • exp2
    — fits
    In the real case, the maximum depth is more than 2.
    The problem is that, since the name of a TDirectory is also the TKey name, every TDirectory must have a unique name, so I end up having TDirectories with name like “exp1_cat1_[…]_fits”: basically, every TDirectory’s name is the same as the parent plus a suffix.
    You can imagine that with increasing depth, the names become very long.
    I really would like the path of a TDirectory to behave like a real file system: exp1/cat1/fits instead of exp1/exp1_cat1/exp1_cat1_fits
    Is there a way to achieve this?