diff --git a/GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh b/GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh index 5fdd706b91236..03dcaf958720e 100755 --- a/GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh +++ b/GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh @@ -23,6 +23,8 @@ echo "%MSG-MG5 number of events requested = $nevt" rnum=${3} echo "%MSG-MG5 random seed used for the run = $rnum" +echo "%MSG-MG5 residual arguments = ${@:4}" + LHEWORKDIR=`pwd` if [[ -d lheevent ]] @@ -37,7 +39,7 @@ mkdir lheevent; cd lheevent tar -xaf ${path} #generate events (call for 1 core always for now until hooks to set number of cores are implemented upstream) -./runcmsgrid.sh $nevt $rnum 1 +./runcmsgrid.sh $nevt $rnum 1 ${@:4} mv cmsgrid_final.lhe $LHEWORKDIR/ diff --git a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc index 5e3c410442c58..06cd55806f5e9 100644 --- a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc +++ b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc @@ -215,7 +215,8 @@ ExternalLHEProducer::beginRunProduce(edm::Run& run, edm::EventSetup const& es) std::ostringstream eventStream; eventStream << nEvents_; - args_.push_back(eventStream.str()); + // args_.push_back(eventStream.str()); + args_.insert(args_.begin() + 1, eventStream.str()); // pass the random number generator seed as last argument @@ -229,7 +230,8 @@ ExternalLHEProducer::beginRunProduce(edm::Run& run, edm::EventSetup const& es) } std::ostringstream randomStream; randomStream << rng->mySeed(); - args_.push_back(randomStream.str()); + // args_.push_back(randomStream.str()); + args_.insert(args_.begin() + 2, randomStream.str()); for ( unsigned int iArg = 0; iArg < args_.size() ; iArg++ ) { LogDebug("LHEInputArgs") << "arg [" << iArg << "] = " << args_[iArg];