Skip to content

Commit

Permalink
[LLVM10] Calibration fix clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov committed Apr 29, 2020
1 parent 6258a35 commit adcb0a1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
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

0 comments on commit adcb0a1

Please sign in to comment.