Skip to content

Commit

Permalink
Merge pull request #6340 from bendavid/lheweightfix_73x
Browse files Browse the repository at this point in the history
fix parsing issue for lhe per-event weights
  • Loading branch information
cmsbuild committed Nov 11, 2014
2 parents 4fc0e17 + c7ca4d4 commit 9b02930
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions GeneratorInterface/LHEInterface/src/LHEReader.cc
Expand Up @@ -528,9 +528,8 @@ LHEReader::~LHEReader()
lheevent.reset(new LHEEvent(curRunInfo, data));
const XMLHandler::wgt_info& info = handler->weightsinevent;
for( size_t i=0; i< info.size(); ++i ) {
std::string snum = info[i].second.substr(0,info[i].second.size()-1);
double num = -1.0;
sscanf(snum.c_str(),"%le",&num);
sscanf(info[i].second.c_str(),"%le",&num);
lheevent->addWeight(gen::WeightsInfo(info[i].first,num));
}
lheevent->setNpLO(handler->npLO);
Expand Down

0 comments on commit 9b02930

Please sign in to comment.