From 65f677d922e689fc5e7a4f52065d7c2737a5955b Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 23 May 2019 19:05:22 -0400 Subject: [PATCH] - add support for the SKIP card in control.in [rtj] - fix a bug in the support for the TLOG card in control.in [rtj] --- src/GlueXPrimaryGeneratorAction.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/GlueXPrimaryGeneratorAction.cc b/src/GlueXPrimaryGeneratorAction.cc index 79da3c9..287d59c 100644 --- a/src/GlueXPrimaryGeneratorAction.cc +++ b/src/GlueXPrimaryGeneratorAction.cc @@ -234,6 +234,15 @@ GlueXPrimaryGeneratorAction::GlueXPrimaryGeneratorAction() } fHDDMistream = new hddm_s::istream(*fHDDMinfile); G4cout << "Opened input file: " << infile[1] << G4endl; + std::map skippars; + if (user_opts->Find("SKIP", skippars)) + { + if (skippars[1] > 0) + { + fHDDMistream->skip(skippars[1]); + G4cout << "skipped first " << skippars[1] << " input events." << G4endl; + } + } fPrimaryGenerator = new GlueXPrimaryGenerator(fHDDMistream); fSourceType = SOURCE_TYPE_HDDM; } @@ -336,7 +345,7 @@ GlueXPrimaryGeneratorAction::GlueXPrimaryGeneratorAction() } fGunParticle.tlogOption = 0; std::map tlogpars; - if (user_opts->Find("PLOG", tlogpars)) { + if (user_opts->Find("TLOG", tlogpars)) { fGunParticle.tlogOption = tlogpars[1]; }