Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM10] Calibration fix clang warnings #29594

Merged
merged 1 commit into from May 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -375,7 +375,7 @@ bool EcalTPGParamBuilder::checkIfOK(EcalPedestals::Item item) {
int EcalTPGParamBuilder::getEtaSlice(int tccId, int towerInTCC) {
int etaSlice = (towerInTCC - 1) / 4 + 1;
// barrel
if (tccId > 36 || tccId < 73)
if (tccId > 36 && tccId < 73)
return etaSlice;
//endcap
else {
Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiStripObjects/src/SiStripModule.cc
Expand Up @@ -155,7 +155,7 @@ void SiStripModule::addApv(const uint16_t &apv_address) {
edm::LogWarning(mlCabling_) << "SiStripModule::" << __func__ << "]"
<< " Null APV I2C address!";
return;
} else if (apv_address < 32 && apv_address > 37) {
} else if (apv_address < 32 || apv_address > 37) {
edm::LogWarning(mlCabling_) << "SiStripModule::" << __func__ << "]"
<< " Unexpected I2C address (" << apv_address << ") for APV!";
return;
Expand Down
Expand Up @@ -173,7 +173,7 @@ CTPPSPixelDAQMappingESSourceXML::CTPPSPixelDAQMappingESSourceXML(const edm::Para
subSystemName(conf.getUntrackedParameter<string>("subSystem")),
currentBlock(0),
currentBlockValid(false) {
for (const auto it : conf.getParameter<vector<ParameterSet>>("configuration")) {
for (const auto &it : conf.getParameter<vector<ParameterSet>>("configuration")) {
ConfigBlock b;
b.validityRange = it.getParameter<EventRange>("validityRange");
b.mappingFileNames = it.getParameter<vector<string>>("mappingFileNames");
Expand Down
2 changes: 1 addition & 1 deletion CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc
Expand Up @@ -246,7 +246,7 @@ TotemDAQMappingESSourceXML::TotemDAQMappingESSourceXML(const edm::ParameterSet &
subSystemName(conf.getUntrackedParameter<string>("subSystem")),
currentBlock(0),
currentBlockValid(false) {
for (const auto it : conf.getParameter<vector<ParameterSet>>("configuration")) {
for (const auto &it : conf.getParameter<vector<ParameterSet>>("configuration")) {
ConfigBlock b;
b.validityRange = it.getParameter<EventRange>("validityRange");
b.mappingFileNames = it.getParameter<vector<string>>("mappingFileNames");
Expand Down
2 changes: 1 addition & 1 deletion CalibTracker/SiStripCommon/plugins/ShallowTree.cc
Expand Up @@ -150,7 +150,7 @@ ShallowTree::ShallowTree(const edm::ParameterSet& iConfig) {
default: {
std::string leafstring = "";
typedef std::pair<std::string, LEAFTYPE> pair_t;
for (const pair_t& leaf : leafmap) {
for (const pair_t leaf : leafmap) {
leafstring += "\t" + leaf.first + "\n";
}

Expand Down
Expand Up @@ -121,7 +121,7 @@ SiStripBadModuleConfigurableFakeESSource::ReturnType SiStripBadModuleConfigurabl
<< "[produce] number of selected dets to be removed " << selAPVs.size() << std::endl;

std::stringstream ss;
for (const auto selId : selAPVs) {
for (const auto& selId : selAPVs) {
SiStripQuality::InputVector theSiStripVector;
auto the_detid = selId.first;

Expand Down
4 changes: 2 additions & 2 deletions Calibration/HcalCalibAlgos/plugins/RecAnalyzerMinbias.cc
Expand Up @@ -453,7 +453,7 @@ void RecAnalyzerMinbias::analyze(const edm::Event& iEvent, const edm::EventSetup
edm::Handle<QIE11DigiCollection> qie11digi;
iEvent.getByToken(tok_qie11digi_, qie11digi);
if (qie11digi.isValid()) {
for (QIE11DataFrame const& digi : *(qie11digi.product())) {
for (QIE11DataFrame const digi : *(qie11digi.product())) {
double amplitudefullTSs = 0.;
if (HcalDetId(digi.id()).subdet() == HcalBarrel) {
for (int i = 0; i < digi.samples(); i++)
Expand Down Expand Up @@ -490,7 +490,7 @@ void RecAnalyzerMinbias::analyze(const edm::Event& iEvent, const edm::EventSetup
edm::Handle<QIE10DigiCollection> qie10digi;
iEvent.getByToken(tok_qie10digi_, qie10digi);
if (qie10digi.isValid()) {
for (QIE10DataFrame const& digi : *(qie10digi.product())) {
for (QIE10DataFrame const digi : *(qie10digi.product())) {
double amplitudefullTSs = 0.;
if (HcalDetId(digi.id()).subdet() == HcalForward) {
for (int i = 0; i < digi.samples(); i++)
Expand Down