Skip to content

Commit

Permalink
Add safety
Browse files Browse the repository at this point in the history
  • Loading branch information
njacazio authored and gconesab committed Aug 6, 2022
1 parent 2e0d070 commit 5b379fb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
///
/// \file generator_pythia8_longlived_multiple.C
/// \author Nicolò Jacazio [email protected]
/// \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})'
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5b379fb

Please sign in to comment.