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

Fix plotting #223

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/CIValidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
test_5: empty
test_6: empty
test_7: empty
test_8: empty
test_9: empty

- name: Covariance Validations
test_1: ./CIValidations/CovarianceValidations
Expand All @@ -38,6 +40,8 @@ jobs:
test_5: empty
test_6: empty
test_7: empty
test_8: empty
test_9: empty

- name: Fitter Validations
test_1: ./CIValidations/FitterValidations
Expand All @@ -47,10 +51,8 @@ jobs:
test_5: ./bin/CombineMaCh3Chains -o MergedChain.root MCMC_Test.root MCMC_Test.root MCMC_Test.root MCMC_Test.root
test_6: ./bin/GetPenaltyTerm MCMC_Test.root bin/TutorialDiagConfig.yaml
test_7: ./bin/MatrixPlotter bin/TutorialDiagConfig.yaml MCMC_Test_drawCorr.root
# TODO
#need fixing config
#test_8: bin/GetPostfitParamPlots -o MCMC_Test_drawCorr.root -c Inputs/PlottingConfig.yaml
#test_9: bin/PlotLLH -o MCMC_Test.root -c Inputs/PlottingConfig.yaml
test_8: bin/GetPostfitParamPlots MCMC_Test_drawCorr.root
test_9: bin/PlotLLH MCMC_Test.root

- name: NuMCMC Tools Validations
test_1: ./CIValidations/NuMCMCvalidations.sh
Expand All @@ -60,6 +62,8 @@ jobs:
test_5: empty
test_6: empty
test_7: empty
test_8: empty
test_9: empty

container:
image: ghcr.io/mach3-software/mach3:alma9latest
Expand Down Expand Up @@ -128,3 +132,16 @@ jobs:
echo "Performing test 7"
${{ matrix.test_7 }}
fi

if [[ "${{ matrix.test_8 }}" != "empty" ]]; then
echo " "
echo "Performing test 8"
${{ matrix.test_8 }}
fi

if [[ "${{ matrix.test_9 }}" != "empty" ]]; then
echo " "
echo "Performing test 9"
${{ matrix.test_9 }}
fi

14 changes: 8 additions & 6 deletions plotting/plottingUtils/inputManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ struct InputFile {
}

/// ptr to an MCMCProcessor instance to be used if this is a MaCh3 input file
MCMCProcessor *mcmcProc;
TTree *posteriorTree;
MCMCProcessor *mcmcProc = nullptr;
TTree *posteriorTree = nullptr;

std::shared_ptr<TFile> file; //!< Pointer to the underlying file for this InputFile instance.
std::string fileName; //!< The location of the underlying file.
Expand Down Expand Up @@ -635,9 +635,11 @@ class InputManager {
}

// helper fn to test if string "str" ends with other string "ending"
inline bool strEndsWith(std::string str, std::string ending) const {
size_t pos = str.find(ending);
return (pos == str.length() - ending.length());
inline bool strEndsWith(const std::string& str, const std::string& ending) const {
if (str.size() >= ending.size()) {
return str.compare(str.size() - ending.size(), ending.size(), ending) == 0;
}
return false;
}


Expand Down Expand Up @@ -669,4 +671,4 @@ class InputManager {
// vector of InputFile objects that this manager is responsible for
std::vector<InputFile> _fileVec;
};
} // namespace MaCh3Plotting
} // namespace MaCh3Plotting
Loading