From aa131c35d41344730082a27b079ae527fb75b63f Mon Sep 17 00:00:00 2001 From: Evgeny Kryshen Date: Fri, 21 Jul 2017 13:37:09 +0200 Subject: [PATCH] Return 0 in case of wrong process --- MC/CustomGenerators/PWGUD/Dime.C | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/MC/CustomGenerators/PWGUD/Dime.C b/MC/CustomGenerators/PWGUD/Dime.C index 530e446d..9c30f637 100644 --- a/MC/CustomGenerators/PWGUD/Dime.C +++ b/MC/CustomGenerators/PWGUD/Dime.C @@ -1,20 +1,26 @@ AliGenerator* GeneratorCustom() { printf("Starting DIME generator\n"); + gSystem->Load("libEVGEN"); + gSystem->Load("libTDime"); + gSystem->Load("libdime"); TString proc; if (processConfig.Contains("Pipm")) proc = "pipm"; else if (processConfig.Contains("Kpkm")) proc = "kpkm"; - else printf("ERROR: uknown process\n"); + else { + printf("ERROR: unknown process\n"); + return 0; + } TString ff; if (processConfig.Contains("Orexp")) ff = "orexp"; else if (processConfig.Contains("Exp")) ff = "exp"; else if (processConfig.Contains("Power")) ff = "power"; - else printf("ERROR: uknown process\n"); + else { + printf("ERROR: unknown process\n"); + return 0; + } - gSystem->Load("libEVGEN"); - gSystem->Load("libTDime"); - gSystem->Load("libdime"); AliGenDime* dime = new AliGenDime(1000); AliDimeRndm::GetDimeRandom()->SetSeed(seedConfig); printf("Setting new random seed: %i\n",AliDimeRndm::GetDimeRandom()->GetSeed());