Hello,
I hope it is possible what I am trying to achieve. Basically I have multiple datasets and I want to name their histograms’ output file based on the name of input file.
int main(int argc, const char* argv[])
{
TString inputFile(argv[1]);
// other code...
//Deleting from the arguments the file location and .root
inputFile.Remove(0,9);
inputFile.Remove(inputFile.Sizeof()-6,inputFile.Sizeof());
//.....
histo = (TH1D*)histograms->Get(names[i]);
histo->Draw("e");
c1->SetLogy(1);
c1->Print(Form("out/plots/%s-%s.png",inputFile,names[i]));
So I thought about this, because this is sort of convenient for me… but it does not work…
Thanks in advance,
Barnabas