Skip to content

Commit 14a0a2b

Browse files
committed
Added standard // to ccdb paths
1 parent d6dcd94 commit 14a0a2b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

MC/config/common/external/generator/TPCLoopers.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ class GenTPCLoopers : public Generator
382382
// ONNX model files can be local, on AliEn or in the ALICE CCDB.
383383
// For local and alien files it is mandatory to provide the filenames, for the CCDB instead the
384384
// path to the object in the CCDB is sufficient. The model files will be downloaded locally.
385-
// Example of CCDB path: "ccdb:Users/n/name/test"
385+
// Example of CCDB path: "ccdb://Users/n/name/test"
386386
// Example of alien path: "alien:///alice/cern.ch/user/n/name/test/test.onnx"
387387
FairGenerator *
388388
Generator_TPCLoopers(std::string model_pairs = "tpcloopmodel.onnx", std::string model_compton = "tpcloopmodelcompton.onnx",
@@ -400,7 +400,7 @@ FairGenerator *
400400
const std::array<std::string, 2> models = {model_pairs, model_compton};
401401
const std::array<std::string, 2> local_names = {"WGANpair.onnx", "WGANcompton.onnx"};
402402
const std::array<bool, 2> isAlien = {models[0].starts_with("alien://"), models[1].starts_with("alien://")};
403-
const std::array<bool, 2> isCCDB = {models[0].starts_with("ccdb:"), models[1].starts_with("ccdb:")};
403+
const std::array<bool, 2> isCCDB = {models[0].starts_with("ccdb://"), models[1].starts_with("ccdb://")};
404404
if (std::any_of(isAlien.begin(), isAlien.end(), [](bool v) { return v; }))
405405
{
406406
if (!gGrid) {
@@ -427,8 +427,8 @@ FairGenerator *
427427
{
428428
if (isCCDB[i])
429429
{
430-
auto model_path = models[i].substr(5);
431-
// Treat filename is provided in the CCDB path
430+
auto model_path = models[i].substr(7); // Remove "ccdb://"
431+
// Treat filename if provided in the CCDB path
432432
auto extension = model_path.find(".onnx");
433433
if (extension != std::string::npos)
434434
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Example of tpc loopers generator with a poisson distribution of pairs and gaussian distribution of compton electrons
22
[GeneratorExternal]
33
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/external/generator/TPCLoopers.C
4-
funcName = Generator_TPCLoopers("ccdb:Users/m/mgiacalo/WGAN_ExtGenPair", "ccdb:Users/m/mgiacalo/WGAN_ExtGenCompton", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/poisson_params.csv", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/gaussian_params.csv", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerPairParams.json", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerComptonParams.json")
4+
funcName = Generator_TPCLoopers("ccdb://Users/m/mgiacalo/WGAN_ExtGenPair", "ccdb://Users/m/mgiacalo/WGAN_ExtGenCompton", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/poisson_params.csv", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/gaussian_params.csv", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerPairParams.json", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerComptonParams.json")

MC/config/common/ini/GeneratorTPCloopers_fixNPairs.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#---> GeneratorTPCloopers
44
[GeneratorExternal]
55
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/external/generator/TPCLoopers.C
6-
funcName = Generator_TPCLoopers("ccdb:Users/m/mgiacalo/WGAN_ExtGenPair", "ccdb:Users/m/mgiacalo/WGAN_ExtGenCompton", "", "", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerPairParams.json", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerComptonParams.json",{1.,1.}, 10,10)
6+
funcName = Generator_TPCLoopers("ccdb://Users/m/mgiacalo/WGAN_ExtGenPair", "ccdb://Users/m/mgiacalo/WGAN_ExtGenCompton", "", "", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerPairParams.json", "${O2DPG_MC_CONFIG_ROOT}/MC/config/common/TPCloopers/ScalerComptonParams.json",{1.,1.}, 10,10)

0 commit comments

Comments
 (0)