Skip to content

Commit

Permalink
Merge branch 'fileListDF' of github.com:rest-for-physics/framework in…
Browse files Browse the repository at this point in the history
…to fileListDF
  • Loading branch information
juanangp committed Apr 12, 2024
2 parents 8314255 + 8124fa4 commit 34f56bf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions source/framework/core/src/TRestDataSet.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ std::vector<std::string> TRestDataSet::FileSelection() {
}

std::vector<std::string> fileList;
for(const auto &pattern : fFilePatternList){
for (const auto& pattern : fFilePatternList) {
auto list = TRestTools::GetFilesMatchingPattern(pattern);
fileList.insert(end(fileList), begin(list), end(list));
}
}

RESTInfo << "TRestDataSet::FileSelection. Starting file selection." << RESTendl;
RESTInfo << "Total files : " << fileList.size() << RESTendl;
Expand Down Expand Up @@ -562,9 +562,9 @@ void TRestDataSet::PrintMetadata() {

RESTMetadata << " - StartTime : " << REST_StringHelper::ToDateTimeString(fStartTime) << RESTendl;
RESTMetadata << " - EndTime : " << REST_StringHelper::ToDateTimeString(fEndTime) << RESTendl;
for(const auto& pattern : fFilePatternList){
RESTMetadata << " - Path : " << TRestTools::SeparatePathAndName(pattern).first << RESTendl;
RESTMetadata << " - File pattern : " << TRestTools::SeparatePathAndName(pattern).second << RESTendl;
for (const auto& pattern : fFilePatternList) {
RESTMetadata << " - Path : " << TRestTools::SeparatePathAndName(pattern).first << RESTendl;
RESTMetadata << " - File pattern : " << TRestTools::SeparatePathAndName(pattern).second << RESTendl;
}
RESTMetadata << " " << RESTendl;
RESTMetadata << " - Accumulated run time (seconds) : " << fTotalDuration << RESTendl;
Expand Down Expand Up @@ -661,8 +661,8 @@ void TRestDataSet::PrintMetadata() {
void TRestDataSet::InitFromConfigFile() {
TRestMetadata::InitFromConfigFile();

std::string filePattern = GetParameter("filePattern","");
if(!filePattern.empty())fFilePatternList.push_back(filePattern);
std::string filePattern = GetParameter("filePattern", "");
if (!filePattern.empty()) fFilePatternList.push_back(filePattern);

/// Reading filters
TiXmlElement* filterDefinition = GetElement("filter");
Expand Down Expand Up @@ -852,9 +852,9 @@ void TRestDataSet::Export(const std::string& filename, std::vector<std::string>
fprintf(f, "### Accumulated run time (hours) : %lf\n", fTotalDuration / 3600.);
fprintf(f, "### Accumulated run time (days) : %lf\n", fTotalDuration / 3600. / 24.);
fprintf(f, "###\n");
for(const auto& pattern : fFilePatternList){
fprintf(f, "### Data path : %s\n", TRestTools::SeparatePathAndName(pattern).first.c_str());
fprintf(f, "### File pattern : %s\n", TRestTools::SeparatePathAndName(pattern).second.c_str());
for (const auto& pattern : fFilePatternList) {
fprintf(f, "### Data path : %s\n", TRestTools::SeparatePathAndName(pattern).first.c_str());
fprintf(f, "### File pattern : %s\n", TRestTools::SeparatePathAndName(pattern).second.c_str());
}
fprintf(f, "###\n");
if (!fFilterMetadata.empty()) {
Expand Down

0 comments on commit 34f56bf

Please sign in to comment.