Skip to content

Commit 5b379fb

Browse files
njacaziogconesab
authored andcommitted
Add safety
1 parent 2e0d070 commit 5b379fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MC/config/PWGLF/pythia8/generator_pythia8_longlived_multiple.C

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
///
22
/// \file generator_pythia8_longlived_multiple.C
33
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
4+
/// \since 05/08/2022
45
/// \brief Implementation of a gun generator for multiple particles, built on generator_pythia8_longlived.C
56
/// usage:
67
/// 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
137138
while (getline(inputFile, l)) {
138139
TString line = l;
139140
line.Strip(TString::kBoth, ' ');
141+
std::cout << n++ << " '" << line << "'" << endl;
142+
if (line.IsNull() || line.IsWhitespace()) {
143+
continue;
144+
}
140145

141-
std::cout << n++ << " " << line << endl;
142146
if (line.BeginsWith("#")) {
143147
std::cout << "Skipping\n";
144148
continue;

0 commit comments

Comments
 (0)