Skip to content

Commit

Permalink
Merge pull request #3592 from ktf/fix-more-clang
Browse files Browse the repository at this point in the history
Clang -- Fix more clang issues.
  • Loading branch information
ktf committed May 2, 2014
2 parents 6099be8 + b7b5fdb commit 3c631eb
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 49 deletions.
43 changes: 22 additions & 21 deletions CondFormats/L1TObjects/src/L1MuCSCTFConfiguration.cc
@@ -1,6 +1,7 @@
#include "CondFormats/L1TObjects/interface/L1MuCSCTFConfiguration.h"
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include "FWCore/MessageLogger/interface/MessageLogger.h"

edm::ParameterSet L1MuCSCTFConfiguration::parameters(int sp) const {
Expand Down Expand Up @@ -247,7 +248,7 @@ edm::ParameterSet L1MuCSCTFConfiguration::parameters(int sp) const {
std::string comments_; std::getline(line,comments_);

if( register_=="CSR_REQ" && chip_=="SP" ){
unsigned int value = strtol(writeValue_.c_str(),'\0',16);
unsigned int value = ::strtol(writeValue_.c_str(),'\0',16);
run_core = (value&0x8000);
trigger_on_ME1a = (value&0x0001);
trigger_on_ME1b = (value&0x0002);
Expand All @@ -260,7 +261,7 @@ edm::ParameterSet L1MuCSCTFConfiguration::parameters(int sp) const {


if( register_=="CSR_SCC" && chip_=="SP" ){
unsigned int value = strtol(writeValue_.c_str(),'\0',16);
unsigned int value = ::strtol(writeValue_.c_str(),'\0',16);

BXAdepth = (value&0x3);
useDT = ( (value&0x80)>>7 );
Expand All @@ -270,54 +271,54 @@ edm::ParameterSet L1MuCSCTFConfiguration::parameters(int sp) const {


if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M1" )
QualityEnableME1a = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1a = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M2" )
QualityEnableME1b = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1b = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M3" )
QualityEnableME1c = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1c = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M1" )
QualityEnableME1d = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1d = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M2" )
QualityEnableME1e = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1e = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M3" )
QualityEnableME1f = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME1f = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M1" )
QualityEnableME2a = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME2a = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M2" )
QualityEnableME2b = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME2b = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M3" )
QualityEnableME2c = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME2c = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M1" )
QualityEnableME3a = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME3a = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M2" )
QualityEnableME3b = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME3b = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M3" )
QualityEnableME3c = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME3c = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M1" )
QualityEnableME4a = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME4a = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M2" )
QualityEnableME4b = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME4b = ::strtol(writeValue_.c_str(),'\0',16);
if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M3" )
QualityEnableME4c = strtol(writeValue_.c_str(),'\0',16);
QualityEnableME4c = ::strtol(writeValue_.c_str(),'\0',16);

if( register_=="CSR_KFL" )
kill_fiber = strtol(writeValue_.c_str(),'\0',16);
kill_fiber = ::strtol(writeValue_.c_str(),'\0',16);

if( register_=="CSR_SFC" && chip_=="SP" ){
unsigned int value = strtol(writeValue_.c_str(),'\0',16);
unsigned int value = ::strtol(writeValue_.c_str(),'\0',16);
singlesTrackOutput = ((value&0x3000)>>12);
}

if( register_=="CNT_ETA" && chip_=="SP" ){
unsigned int value = strtol(writeValue_.c_str(),'\0',16);
unsigned int value = ::strtol(writeValue_.c_str(),'\0',16);
eta_cnt = value;
}


// LATEST VERSION FROM CORE 2010-01-22 at http://www.phys.ufl.edu/~madorsky/sp/2010-01-22
if( register_=="DAT_ETA" && chip_=="SP" ){

unsigned int value = strtol(writeValue_.c_str(),'\0',16);
unsigned int value = ::strtol(writeValue_.c_str(),'\0',16);

//std::cout<<"DAT_ETA SP value:"<<value<<std::endl;

Expand Down
2 changes: 0 additions & 2 deletions DataFormats/CSCDigi/test/testCSCDigis.cpp
Expand Up @@ -10,8 +10,6 @@
* \author A. Tumanov, Rice U.
*/

static const char CVSId[] = "$Id: testCSCDigis.cpp,v 1.23 2008/10/29 18:34:41 elmer Exp $";

#include <cppunit/extensions/HelperMacros.h>
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
Expand Down
4 changes: 4 additions & 0 deletions DataFormats/GeometryVector/test/BasicVector_t.cpp
Expand Up @@ -113,7 +113,11 @@ int main() {
#endif


#ifdef __clang__
std::cout << "biggest alignment " << sizeof(double) << std::endl;
#else
std::cout << "biggest alignment " << __BIGGEST_ALIGNMENT__ << std::endl;
#endif



Expand Down
2 changes: 1 addition & 1 deletion DataFormats/L1Trigger/src/L1ParticleMap.cc
Expand Up @@ -184,7 +184,7 @@ L1ParticleMap::L1ParticleMap(
const L1IndexComboVector& indexCombos )
: triggerType_( triggerType ),
triggerDecision_( triggerDecision ),
indexCombosState_{indexCombos.size()>0? kSet:kUnset},
indexCombosState_{static_cast<char>(indexCombos.size()>0? kSet:kUnset)},
objectTypes_( objectTypes ),
emParticles_( emParticles ),
jetParticles_( jetParticles ),
Expand Down
15 changes: 1 addition & 14 deletions DataFormats/ParticleFlowReco/src/PFCluster.cc
Expand Up @@ -71,20 +71,7 @@ double PFCluster::getDepthCorrection(double energy, bool isBelowPS,
corrA = depthCorAp_;
corrB = depthCorBp_;
}
double depth = 0;
switch(isHadron) {
case 0: // e/gamma
depth = corrA*(corrB + log(energy));
break;
case 1: // hadrons
depth = corrA;
break;
default:
assert(0);
// edm::LogError("PFCluster") << "unknown function for depth correction!"
// << std::endl;
}
return depth;
return isHadron ? corrA : corrA*(corrB + log(energy));
}

void PFCluster::setLayer( PFLayer::Layer layer) {
Expand Down
10 changes: 0 additions & 10 deletions DataFormats/TrackReco/src/TrackResiduals.cc
Expand Up @@ -126,16 +126,6 @@ unsigned char TrackResiduals::pack_pull (double pull)
return sgn + mag;
}

static const double residual_char_to_double[8][2] = {
{ 0, 0.5 },
{ 0.5, 1 },
{ 1, 1.5 },
{ 1.5, 2 },
{ 2, 2.5 },
{ 2.5, 3.5 },
{ 3.5, 4.5 },
{ 4.5, 5.5 },
};

double TrackResiduals::unpack_residual (unsigned char pull)
{
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/TrackerCommon/src/ClusterSummary.cc
Expand Up @@ -8,7 +8,7 @@ ClusterSummary::ClusterSummary()

ClusterSummary::~ClusterSummary()
{
delete userContent;
delete userContent.load();
userContent = nullptr;
}

Expand Down

0 comments on commit 3c631eb

Please sign in to comment.