A problem writing histograms to a file

Also, say I want to include the file names in a config file (“in” format), and read them to the program, how would you do that? I’m confused as to how you do that.

Say I create the file with the names of my files, and then I read it like so:

TEnv *input_file = new TEnv("config_file");
input_file->ReadFile("names.in", kEnvChange);

How do I loop over the file names?