Hi I am asking this because I want to change the directory flexibly. (Looping through the .root files in different mass100, mass200 directory. ) I wonder if there is a way to convert a string to a file name?
This:
string file ="tag_1_pythia_lhe_events.root";
TFile *f = new TFile(file);
returns the error of
Error: Can’t call TFile::TFile(file) in current scope Partoncut.c:32:
Possible candidates are…
(in TFile)
/usr/local/Cellar/root/5.34.26/lib/root/libRIO.so -1:-1 0 private: TFile TFile::TFile(const TFile&); //Files cannot be copied
/usr/local/Cellar/root/5.34.26/lib/root/libRIO.so -1:-1 0 public: TFile TFile::TFile(void);
/usr/local/Cellar/root/5.34.26/lib/root/libRIO.so -1:-1 0 public: TFile TFile::TFile(const char* fname,Option_t* option="",const char* ftitle="",Int_t compress=1);
(in TDirectoryFile)
*** Interpreter error recovered ***
Thanks in advance.