Skip to content

Commit

Permalink
allow scram_arch and cmssw version manipulation from the ExternalLHEP…
Browse files Browse the repository at this point in the history
…roducer
  • Loading branch information
perrozzi committed Jun 28, 2017
1 parent 201897f commit 748dac6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -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 ]]
Expand All @@ -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/

Expand Down
Expand Up @@ -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

Expand All @@ -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];
Expand Down

0 comments on commit 748dac6

Please sign in to comment.