Skip to content
Snippets Groups Projects
Commit b39ac252 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'cppcheck.LArConditionsTest-20210325' into 'master'

LArConditionsTest: Fix cppcheck warnings.

See merge request atlas/athena!41974
parents 80c086fe 690192ee
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!41974LArConditionsTest: Fix cppcheck warnings.
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "LArConditionsTest/LArCablingTest.h"
......@@ -62,10 +62,7 @@ StatusCode LArCablingTest::execute() {
return StatusCode::FAILURE;
}
if (m_mode & 1) {
std::vector<HWIdentifier>::const_iterator it1 = m_onlineId->channel_begin();
std::vector<HWIdentifier>::const_iterator it1_e = m_onlineId->channel_end();
for (;it1!=it1_e;it1++) {
const HWIdentifier hwid = *it1;
for (HWIdentifier hwid : m_onlineId->channel_range()) {
if (m_print)
print(hwid,outfile,cabling,clCont);
const Identifier id=cabling->cnvToIdentifier(hwid);
......@@ -75,10 +72,7 @@ StatusCode LArCablingTest::execute() {
}
}
if (m_mode & 2) {
std::vector<Identifier>::const_iterator it2=m_caloCellId->cell_begin();
std::vector<Identifier>::const_iterator it2_e=m_caloCellId->cell_end();
for(;it2!=it2_e;it2++) {
const Identifier id=*it2;
for (Identifier id : m_caloCellId->cell_range()) {
if (!m_caloCellId->is_tile(id)) {
const HWIdentifier hwid=cabling->createSignalChannelID(id);
if (m_print)
......@@ -87,12 +81,7 @@ StatusCode LArCablingTest::execute() {
}
}
if (m_mode & 4) {
// std::vector<Identifier> ids(200000);
std::vector<HWIdentifier>::const_iterator it1 = m_onlineId->channel_begin();
std::vector<HWIdentifier>::const_iterator it1_e = m_onlineId->channel_end();
size_t nId=0;
for (;it1!=it1_e;it1++,nId++) {
const HWIdentifier hwid = *it1;
for (HWIdentifier hwid : m_onlineId->channel_range()) {
bool result=cabling->isOnlineConnected(hwid);
if (m_print)
std::cout << "Connected 0x" << std::hex << hwid.get_identifier32().get_compact() << ":"<<result << std::dec << std::endl;
......@@ -100,10 +89,7 @@ StatusCode LArCablingTest::execute() {
}
if (m_mode & 8) {
std::vector<HWIdentifier>::const_iterator it3=m_onlineId->feb_begin();
std::vector<HWIdentifier>::const_iterator it3_e=m_onlineId->feb_end();
for(;it3!=it3_e;++it3) {
const HWIdentifier FEBID=*it3;
for (HWIdentifier FEBID : m_onlineId->feb_range()) {
#ifdef LARREADOUTMODULEID_H //Old version
const uint32_t RODID=rodCont->getReadoutModuleID(FEBID).id();
#else //New version, LArReadoutModuleID replaced my HWIdentifier
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment