Skip to content

Commit

Permalink
Merge pull request #11312 from deguio/protectL1_76
Browse files Browse the repository at this point in the history
add protection against OOR
  • Loading branch information
cmsbuild committed Sep 18, 2015
2 parents 5e29406 + 6babba0 commit 39a9067
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DQMOffline/L1Trigger/src/L1TRate_Offline.cc
Expand Up @@ -234,7 +234,7 @@ void L1TRate_Offline::endLuminosityBlock(LuminosityBlock const& lumiBlock, Event
//map<TString,double>* rates=0;
double lumi=0;
double deadtime=0;
int prescalesIndex=0;
unsigned int prescalesIndex=0;

bool isDefCount;
map<TString,double>* counts=0;
Expand Down Expand Up @@ -279,7 +279,7 @@ void L1TRate_Offline::endLuminosityBlock(LuminosityBlock const& lumiBlock, Event
prescalesIndex=m_lsPrescaleIndex[lsPreInd];
}

if(isDefCount && isDefLumi && isDefPrescaleIndex){
if(isDefCount && isDefLumi && isDefPrescaleIndex && (prescalesIndex < m_listsPrescaleFactors->size())){

const vector<int>& currentPrescaleFactors = (*m_listsPrescaleFactors).at(prescalesIndex);

Expand Down

0 comments on commit 39a9067

Please sign in to comment.