From 5ff3d4ec4e62a873a8521dee41b630098da7c2b6 Mon Sep 17 00:00:00 2001 From: Sven Dildick Date: Wed, 3 Nov 2021 10:26:16 -0500 Subject: [PATCH] Get rid of static warnings --- .../src/CSCCathodeLCTProcessor.cc | 24 ++++++++----------- .../src/CSCMotherboard.cc | 24 ++++++++----------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc index 34883f6b32b42..068fdd5be06df 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc @@ -1074,20 +1074,16 @@ std::vector CSCCathodeLCTProcessor::readoutCLCTs() const { const int max_late_tbin = CSCConstants::MAX_CLCT_TBINS - 1; // debugging messages when early_tbin or late_tbin has a suspicious value - bool debugTimeBins = true; - if (debugTimeBins) { - if (early_tbin < 0) { - edm::LogWarning("CSCCathodeLCTProcessor|SuspiciousParameters") - << "Early time bin (early_tbin) smaller than minimum allowed, which is 0. set early_tbin to 0."; - early_tbin = 0; - } - if (late_tbin > max_late_tbin) { - edm::LogWarning("CSCCathodeLCTProcessor|SuspiciousParameters") - << "Late time bin (late_tbin) larger than maximum allowed, which is " << max_late_tbin - << ". set early_tbin to max allowed"; - late_tbin = CSCConstants::MAX_CLCT_TBINS - 1; - } - debugTimeBins = false; + if (early_tbin < 0) { + edm::LogWarning("CSCCathodeLCTProcessor|SuspiciousParameters") + << "Early time bin (early_tbin) smaller than minimum allowed, which is 0. set early_tbin to 0."; + early_tbin = 0; + } + if (late_tbin > max_late_tbin) { + edm::LogWarning("CSCCathodeLCTProcessor|SuspiciousParameters") + << "Late time bin (late_tbin) larger than maximum allowed, which is " << max_late_tbin + << ". set early_tbin to max allowed"; + late_tbin = CSCConstants::MAX_CLCT_TBINS - 1; } // get the valid LCTs. No BX selection is done here diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc index 47d4013ea4900..d920b1f31d02f 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc @@ -280,20 +280,16 @@ std::vector CSCMotherboard::readoutLCTs() const { const int max_late_tbin = CSCConstants::MAX_LCT_TBINS - 1; // debugging messages when early_tbin or late_tbin has a suspicious value - bool debugTimeBins = true; - if (debugTimeBins) { - if (early_tbin < 0) { - edm::LogWarning("CSCMotherboard|SuspiciousParameters") - << "Early time bin (early_tbin) smaller than minimum allowed, which is 0. set early_tbin to 0."; - early_tbin = 0; - } - if (late_tbin > max_late_tbin) { - edm::LogWarning("CSCMotherboard|SuspiciousParameters") - << "Late time bin (late_tbin) larger than maximum allowed, which is " << max_late_tbin - << ". set early_tbin to max allowed"; - late_tbin = CSCConstants::MAX_LCT_TBINS - 1; - } - debugTimeBins = false; + if (early_tbin < 0) { + edm::LogWarning("CSCMotherboard|SuspiciousParameters") + << "Early time bin (early_tbin) smaller than minimum allowed, which is 0. set early_tbin to 0."; + early_tbin = 0; + } + if (late_tbin > max_late_tbin) { + edm::LogWarning("CSCMotherboard|SuspiciousParameters") + << "Late time bin (late_tbin) larger than maximum allowed, which is " << max_late_tbin + << ". set early_tbin to max allowed"; + late_tbin = CSCConstants::MAX_LCT_TBINS - 1; } // Start from the vector of all found correlated LCTs and select