I have to pass a directory to look for a .root file, like:
TFile* file1D = new TFile("pngResults/2019-09-18/Results.root");
As you can see, I am passing the date inside the string.
At the moment I am using a handful of files, so I can change them each time, but it is a bit unhealthy.
I was thinking of doing something like:
TFile* file1D = new TFile(Form("pngResults/%s/Results.root", DateOfToday);
that is because I am running a bash script to redo everything each time with a new folder for each day I am running it in.
I understand that there is a ROOT class to provide the date (TDatime?).
Could you please help me a bit, and tell me if this way is feasible…?