Getting a branch (or a driectory etc. )with empty space in the name

For some reason, we are using root files with the following directories:

##############################
TDirectoryFile* DQMData DQMData
KEY: TDirectoryFile Run 182124;1 Run 182124
KEY: TDirectoryFile Reference;1 Reference
###################################

It is simple enough to get to “Reference” using

Reference->cd()

How can I go to “Run 182124” directory? That is, how to read a name with an empty space in it?

Hi,

you can start from the current directory, i.e. from the same “place” where you write “Reference->cd()”

gDirectory->cd("Run 182124")

gDirectory can be replaced from any directory.
If what you are doing is related to exploration of DQM files or drawing of a restricted number of histograms, you could look at the rootls and rootdraw utilities (available starting from ROOT 6.05/02).

Cheers,
Danilo

Thank you! :smiley: