Skip to content

Commit

Permalink
Add default to case statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hank committed Nov 8, 2024
1 parent 4b8ac58 commit 7bdb962
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Root/BJetEfficiencyCorrector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ EL::StatusCode BJetEfficiencyCorrector :: initialize ()
gridName=wk()->metaData()->castString(SH::MetaFields::sampleName);
sampleShowerType=HelperFunctions::getMCShowerType(gridName,m_taggerName);
}

if(m_taggerName=="DL1dv01"){
if(m_isRun3){
switch(sampleShowerType)
Expand Down Expand Up @@ -285,18 +285,18 @@ EL::StatusCode BJetEfficiencyCorrector :: initialize ()
case HelperFunctions::AmcH7:
calibration="412116";
break;
case HelperFunctions::Unknown:
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
default:
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
}
}
}
}
} else if(m_taggerName=="GN2v01"){
Expand Down Expand Up @@ -357,18 +357,18 @@ EL::StatusCode BJetEfficiencyCorrector :: initialize ()
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="700660";
break;
case HelperFunctions::Unknown:
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
}
default:
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
}
}
}
} else {
Expand Down

0 comments on commit 7bdb962

Please sign in to comment.