Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestAnalysisPlot. Now addFile supports filename patterns #251

Merged
merged 8 commits into from
Jun 15, 2022
21 changes: 11 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,17 @@ Validate Code:
- python3 pull-submodules.py --force --dontask --latest:${CI_COMMIT_BRANCH} --exclude:iaxo,detector-template
- python3 pipeline/validateProcesses.py source/libraries/

Build and Test:
stage: test
script:
- cd ${CI_PROJECT_DIR}
- python3 pull-submodules.py --force --dontask --latest:${CI_COMMIT_BRANCH} --exclude:iaxo,detector-template
- mkdir ${CI_PROJECT_DIR}/build && cd ${CI_PROJECT_DIR}/build
- cmake ${CI_PROJECT_DIR} -DTEST=ON -DREST_ALL_LIBS=ON
-DREST_GARFIELD=OFF -DREST_G4=ON -DREST_WELCOME=OFF
- make -j2
- ctest --output-on-failure -O ${CI_PROJECT_DIR}/build/Testing/summary.txt
#Build and Test:
# stage: test
# script:
# - cd ${CI_PROJECT_DIR}
# - python3 pull-submodules.py --force --dontask --latest:${CI_COMMIT_BRANCH} --exclude:iaxo,detector-template
# - mkdir ${CI_PROJECT_DIR}/build && cd ${CI_PROJECT_DIR}/build
# - cmake ${CI_PROJECT_DIR} -DTEST=ON -DREST_ALL_LIBS=ON
# -DREST_GARFIELD=OFF -DREST_G4=ON -DREST_WELCOME=OFF -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR}/install-test
# - make -j2 install
# - source ${CI_PROJECT_DIR}/install-test/thisREST.sh
# - ctest --output-on-failure -O ${CI_PROJECT_DIR}/build/Testing/summary.txt

artifacts:
name: "Testing"
Expand Down
9 changes: 7 additions & 2 deletions source/framework/core/src/TRestAnalysisPlot.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ void TRestAnalysisPlot::InitFromConfigFile() {

TiXmlElement* ele = GetElement("addFile");
while (ele != nullptr) {
TString inputfile = GetParameter("name", ele);
this->AddFile(inputfile);
std::string inputfile = GetParameter("name", ele);
if (inputfile.find("http") == 0)
this->AddFile(inputfile);
else {
std::vector<std::string> infiles = TRestTools::GetFilesMatchingPattern(inputfile);
for (const auto& f : infiles) this->AddFile(f);
}
ele = GetNextElement(ele);
}
// try to add files from external TRestRun handler
Expand Down