Skip to content

Commit

Permalink
Merge pull request cms-sw#100 from jshlee/nanoAOD
Browse files Browse the repository at this point in the history
TriggerOutputBranches bug
  • Loading branch information
arizzi authored Jan 30, 2018
2 parents f13c75e + 3eff33a commit 98a93e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion PhysicsTools/NanoAOD/plugins/TriggerOutputBranches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ TriggerOutputBranches::updateTriggerNames(TTree & tree, const edm::TriggerNames
{
existing.idx=-1;// reset all triggers as not found
for(unsigned int j=0;j<newNames.size();j++) {
if(newNames[j]==existing.name) existing.idx=j;
std::string name=newNames[j]; // no const & as it will be modified below!
std::size_t vfound = name.rfind("_v");
if (vfound!=std::string::npos){
name.replace(vfound,name.size()-vfound,"");
}
if(name==existing.name) existing.idx=j;
}
}
// Find new ones
Expand Down

0 comments on commit 98a93e9

Please sign in to comment.