File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -531,7 +531,26 @@ std::vector<std::string> GeneratorFromEventPool::setupFileUniverse(std::string c
531531 if (typeString.size () == 0 ) {
532532 return result;
533533 } else if (typeString.size () == 1 && typeString.front () == std::string (" Type: f" )) {
534- // this is a file ... simply use it
534+ // this is a file:
535+ // 1) list of files ==> select one of the lines and use it
536+ // 2) evtpool.root ==> use as it is
537+ if (!checkFileName (path)) {
538+ // Assume it is a text file containing a list of pools
539+ auto tmpPath = (std::filesystem::temp_directory_path () / (" list_" + std::to_string (getpid ()) + " .txt" )).string ();
540+ auto res = TFile::Cp (Form (" %s?filetype=raw" , path.c_str ()), tmpPath.c_str ());
541+ if (!res) {
542+ LOG (fatal) << " Failed to copy file from AliEn: " << path;
543+ } else {
544+ auto files = readLines (tmpPath);
545+ if (checkFileUniverse (files)) {
546+ result = files;
547+ } else {
548+ LOG (fatal) << " The list of files in " << path << " is not valid" ;
549+ }
550+ std::filesystem::remove (tmpPath);
551+ }
552+ return result;
553+ }
535554 result.push_back (mConfig .eventPoolPath );
536555 return result;
537556 } else if (typeString.size () == 1 && typeString.front () == std::string (" Type: d" )) {
You can’t perform that action at this time.
0 commit comments