|
23 | 23 | #include <cmath> |
24 | 24 | #include "TClonesArray.h" |
25 | 25 | #include "TParticle.h" |
| 26 | +#include "TString.h" |
26 | 27 | #include "TSystem.h" |
27 | 28 | #include "TGrid.h" |
28 | 29 | #include "CCDB/BasicCCDBManager.h" |
@@ -117,13 +118,18 @@ bool Generator::initTPCLoopersGen() |
117 | 118 | { |
118 | 119 | // Expand all environment paths |
119 | 120 | const auto& loopersParam = o2::eventgen::GenTPCLoopersParam::Instance(); |
120 | | - std::string model_pairs = gSystem->ExpandPathName(loopersParam.model_pairs.c_str()); |
121 | | - std::string model_compton = gSystem->ExpandPathName(loopersParam.model_compton.c_str()); |
122 | | - std::string nclxrate = gSystem->ExpandPathName(loopersParam.nclxrate.c_str()); |
123 | | - const auto& scaler_pair = gSystem->ExpandPathName(loopersParam.scaler_pair.c_str()); |
124 | | - const auto& scaler_compton = gSystem->ExpandPathName(loopersParam.scaler_compton.c_str()); |
125 | | - const auto& poisson = gSystem->ExpandPathName(loopersParam.poisson.c_str()); |
126 | | - const auto& gauss = gSystem->ExpandPathName(loopersParam.gauss.c_str()); |
| 121 | + auto expandPathName = [](const std::string& path) { |
| 122 | + TString expandedPath = path; |
| 123 | + gSystem->ExpandPathName(expandedPath); |
| 124 | + return std::string(expandedPath.Data()); |
| 125 | + }; |
| 126 | + std::string model_pairs = expandPathName(loopersParam.model_pairs); |
| 127 | + std::string model_compton = expandPathName(loopersParam.model_compton); |
| 128 | + std::string nclxrate = expandPathName(loopersParam.nclxrate); |
| 129 | + const std::string scaler_pair = expandPathName(loopersParam.scaler_pair); |
| 130 | + const std::string scaler_compton = expandPathName(loopersParam.scaler_compton); |
| 131 | + const std::string poisson = expandPathName(loopersParam.poisson); |
| 132 | + const std::string gauss = expandPathName(loopersParam.gauss); |
127 | 133 | const auto& flat_gas = loopersParam.flat_gas; |
128 | 134 | const auto& colsys = loopersParam.colsys; |
129 | 135 | if (flat_gas) { |
|
0 commit comments