From 5b379fb99559c93cac91c564bfc9c028183958b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 5 Aug 2022 22:31:16 +0200 Subject: [PATCH] Add safety --- .../PWGLF/pythia8/generator_pythia8_longlived_multiple.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MC/config/PWGLF/pythia8/generator_pythia8_longlived_multiple.C b/MC/config/PWGLF/pythia8/generator_pythia8_longlived_multiple.C index 1aa587c10..b17c36107 100644 --- a/MC/config/PWGLF/pythia8/generator_pythia8_longlived_multiple.C +++ b/MC/config/PWGLF/pythia8/generator_pythia8_longlived_multiple.C @@ -1,6 +1,7 @@ /// /// \file generator_pythia8_longlived_multiple.C /// \author Nicolò Jacazio nicolo.jacazio@cern.ch +/// \since 05/08/2022 /// \brief Implementation of a gun generator for multiple particles, built on generator_pythia8_longlived.C /// usage: /// o2-sim -g external --configKeyValues 'GeneratorExternal.fileName=generator_pythia8_longlived_multiple.C;GeneratorExternal.funcName=generateLongLivedMultiple({1010010030}, {10}, {0.5}, {10})' @@ -137,8 +138,11 @@ FairGenerator* generateLongLivedMultiple(std::string configuration = "${O2DPG_RO while (getline(inputFile, l)) { TString line = l; line.Strip(TString::kBoth, ' '); + std::cout << n++ << " '" << line << "'" << endl; + if (line.IsNull() || line.IsWhitespace()) { + continue; + } - std::cout << n++ << " " << line << endl; if (line.BeginsWith("#")) { std::cout << "Skipping\n"; continue;