Skip to content

Commit

Permalink
[SIMULATION] Changes suggested by new llvm18 clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Sep 5, 2024
1 parent 15ea9bb commit 321a48b
Show file tree
Hide file tree
Showing 138 changed files with 289 additions and 293 deletions.
16 changes: 8 additions & 8 deletions DataFormats/CSCDigi/test/testCSCDigis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void testCSCDigis::readCSCWireDigi(CSCWireDigiCollection &collection) {
std::cout << std::endl;
std::cout << " CSC Wire Word with Time Bins Bits On " << (*digiIt).getTimeBinWord() << std::endl;
} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...

printf("CSC Wire count: %3d \n", count);
}
Expand Down Expand Up @@ -468,7 +468,7 @@ void testCSCDigis::readCSCComparatorDigi(CSCComparatorDigiCollection &collection
std::cout << std::endl;

} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...

printf("CSCComparatorDigi count: %3d \n", count);
}
Expand Down Expand Up @@ -503,7 +503,7 @@ void testCSCDigis::readCSCStripDigi(CSCStripDigiCollection &collection) {
(*digiIt).getADCCounts()[7]);

} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...

printf("CSC Strip count: %3d \n", count);
}
Expand All @@ -530,7 +530,7 @@ void testCSCDigis::readCSCRPCDigi(CSCRPCDigiCollection &collection) {
(*digiIt).getBXN());

} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...

printf("RPC count: %3d \n", count);
}
Expand Down Expand Up @@ -568,7 +568,7 @@ void testCSCDigis::readCSCALCTDigi(CSCALCTDigiCollection &collection) {
(*digiIt).getBX(),
(*digiIt).getTrknmb());
} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...
printf("CSC ALCT count: %3d \n", count);
}

Expand Down Expand Up @@ -610,7 +610,7 @@ void testCSCDigis::readCSCCLCTDigi(CSCCLCTDigiCollection &collection) {
(*digiIt).getTrknmb());

} // for digis in layer
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...
printf("CSC CLCT count: %3d \n", count);
}

Expand Down Expand Up @@ -658,7 +658,7 @@ void testCSCDigis::readCSCCFEBStatusDigi(CSCCFEBStatusDigiCollection &collection
std::cout<<std::endl;
*/
} // for digis in collection
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...
}

void testCSCDigis::readCSCTMBStatusDigi(CSCTMBStatusDigiCollection &collection) {
Expand All @@ -684,7 +684,7 @@ void testCSCDigis::readCSCTMBStatusDigi(CSCTMBStatusDigiCollection &collection)
*/

} // for digis in collection
} // end of for (detUnitIt=...
} // end of for (detUnitIt=...
}
/*
void testCSCDigis::readCSCDCCFormatStatusDigi(CSCDCCFormatStatusDigiCollection & collection) {
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/DTDigi/interface/DTDDUWords.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ class DTROSWordType {
/// Constructor
DTROSWordType(const uint32_t index) { word_ = index; }

DTROSWordType() : word_(0){};
DTROSWordType() : word_(0) {}

/// Destructor
virtual ~DTROSWordType(){};
virtual ~DTROSWordType() {}

/// List of DT DDU Word Types
enum wordTypes {
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/DTDigi/interface/DTuROSControlData.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DTuROSROSData {
}

/// Destructor
~DTuROSROSData(){};
~DTuROSROSData() {}

void setslot(int slot) { slot_ = slot; }

Expand Down Expand Up @@ -109,7 +109,7 @@ class DTuROSFEDData {
}

/// Destructor
~DTuROSFEDData(){};
~DTuROSFEDData() {}

void setfed(int fed) { fed_ = fed; }

Expand Down
4 changes: 2 additions & 2 deletions DataFormats/DTDigi/test/testDTDigis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void testDTDigis::testDigiCollectionPut() {
// CPPUNIT_ASSERT((*digiIt)==digi2);

} // for digis in layer
} // for layers
} // for layers
}

void testDTDigis::testDigiCollectionInsert() {
Expand Down Expand Up @@ -105,7 +105,7 @@ void testDTDigis::testDigiCollectionInsert() {

count++;
} // for digis in layer
} // for layers
} // for layers

CPPUNIT_ASSERT(count != 0);
}
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDetId/interface/EcalElectronicsId.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class EcalElectronicsId {
EcalSubdetector subdet() const;

/// get a fast, compact, unique index for linear lookups (maximum value = 4194303)
int linearIndex() const { return (EcalElectronicsId_)&0x3FFFFF; }
int linearIndex() const { return (EcalElectronicsId_) & 0x3FFFFF; }

/// so far for EndCap only :
int channelId() const; // xtal id between 1 and 25
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDetId/interface/EcalTriggerElectronicsId.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class EcalTriggerElectronicsId {
/// get the channel id
int channelId() const { return (EcalTriggerElectronicsId_ & 0x7); }
/// get a fast, compact, unique index for linear lookups (maximum value = 1048575)
int linearIndex() const { return (EcalTriggerElectronicsId_)&0xFFFFF; }
int linearIndex() const { return (EcalTriggerElectronicsId_) & 0xFFFFF; }

/// get the zside() +1 / -1
int zside() const;
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/EcalDetId/test/printEEDetId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ int main(int argc, char* argv[]) {
COL << id.sc().zside() << " ";
COL << "\n";
} //next iy
} //next ix
} //next iz
} //next ix
} //next iz
} catch (exception& e) {
cerr << e.what();
}
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDigi/interface/EBSrFlag.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EBSrFlag : public EcalSrFlag {
public:
/** Default constructor.
*/
EBSrFlag(){};
EBSrFlag() {}

/** Constructor
* @param tt trigger tower det id.
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDigi/interface/EESrFlag.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EESrFlag : public EcalSrFlag {
public:
/** Default constructor.
*/
EESrFlag(){};
EESrFlag() {}

/** Constructor
* @param sc supercrystal det id
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDigi/interface/EcalSrFlag.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class EcalSrFlag {
public:
/** Destructor
*/
virtual ~EcalSrFlag(){};
virtual ~EcalSrFlag() {}

/** Gets the Det Id the flag is associated to.
* @return the det id of the readout unit (a barrel TT or a SC).
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/EcalDigi/interface/EcalTrigPrimCompactColl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class EcalTrigPrimCompactColl {
}

public:
EcalTrigPrimCompactColl() : formatVers_(0), data_(nBins){};
EcalTrigPrimCompactColl() : formatVers_(0), data_(nBins) {}

///Set data
void setValue(int ieta, int iphi, uint16_t sample) { data_[index(ieta, iphi)] = sample; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

class AlignmentPositionError {
public:
AlignmentPositionError(){};
AlignmentPositionError() {}

AlignmentPositionError(float xx, float yy, float zz, float phixphix = 0, float phiyphiy = 0, float phizphiz = 0);

AlignmentPositionError(const GlobalErrorExtended& ge) : theGlobalError(ge){};
AlignmentPositionError(const GlobalErrorExtended& ge) : theGlobalError(ge) {}

AlignmentPositionError(const GlobalError& ge);

~AlignmentPositionError(){};
~AlignmentPositionError() {}

bool valid() const { return (theGlobalError.cxx() > 0 || theGlobalError.cyy() > 0 || theGlobalError.czz() > 0); }

Expand Down
8 changes: 4 additions & 4 deletions DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class Measurement1D {
public:
// construct

Measurement1D() : theValue(0.), theError(0.){};
Measurement1D() : theValue(0.), theError(0.) {}

Measurement1D(const double& aValue) : theValue(aValue), theError(0.){};
Measurement1D(const double& aValue) : theValue(aValue), theError(0.) {}

Measurement1D(const double& aValue, const double& aError) : theValue(aValue), theError(aError){};
Measurement1D(const double& aValue, const double& aError) : theValue(aValue), theError(aError) {}

//destruct

~Measurement1D(){};
~Measurement1D() {}

double value() const { return theValue; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Measurement1DFloat {

//destruct

~Measurement1DFloat(){};
~Measurement1DFloat() {}

float value() const { return theValue; }

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/GeometrySurface/interface/Line.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Line {
//Line( const PositionType& pos, const DirectionType& dir) :
Line(PositionType& pos, DirectionType& dir) : thePos(pos), theDir(dir.unit()) {}

~Line(){};
~Line() {}

//const PositionType& position() const { return thePos;}
//const DirectionType& direction() const { return theDir;}
Expand Down
8 changes: 4 additions & 4 deletions DataFormats/GeometrySurface/interface/private/extTkRotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ class TkRotation {
};

template <>
std::ostream& operator<<<float>(std::ostream& s, const TkRotation<float>& r);
std::ostream& operator<< <float>(std::ostream& s, const TkRotation<float>& r);

template <>
std::ostream& operator<<<double>(std::ostream& s, const TkRotation<double>& r);
std::ostream& operator<< <double>(std::ostream& s, const TkRotation<double>& r);

template <class T, class U>
inline Basic3DVector<U> operator*(const TkRotation<T>& r, const Basic3DVector<U>& v) {
Expand Down Expand Up @@ -270,9 +270,9 @@ class TkRotation2D {
};

template <>
std::ostream& operator<<<float>(std::ostream& s, const TkRotation2D<float>& r);
std::ostream& operator<< <float>(std::ostream& s, const TkRotation2D<float>& r);

template <>
std::ostream& operator<<<double>(std::ostream& s, const TkRotation2D<double>& r);
std::ostream& operator<< <double>(std::ostream& s, const TkRotation2D<double>& r);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ namespace detailsBasic3DVector {
double t(z / std::sqrt(x * x + y * y));
return ::asinh(t);
}
inline long double __attribute__((always_inline)) __attribute__((pure))
eta(long double x, long double y, long double z) {
inline long double __attribute__((always_inline)) __attribute__((pure)) eta(long double x,
long double y,
long double z) {
long double t(z / std::sqrt(x * x + y * y));
return ::asinhl(t);
}
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/HcalDetId/interface/CastorElectronicsId.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CastorElectronicsId {
int htrSlot() const { return (castorElectronicsId_ >> 14) & 0x1F; }
int htrTopBottom() const { return (castorElectronicsId_ >> 19) & 0x1; }
int readoutVMECrateId() const { return (castorElectronicsId_ >> 20) & 0x1F; }
int linearIndex() const { return (castorElectronicsId_)&0x3FFF; }
int linearIndex() const { return (castorElectronicsId_) & 0x3FFF; }

static const int maxLinearIndex = 0x3FFF;
static const int maxDCCId = 15;
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/HcalDigi/src/HOTriggerPrimitiveDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HOTriggerPrimitiveDigi::HOTriggerPrimitiveDigi(
samples = HO_TP_SAMPLES_MAX;

theHO_TP = (abs(ieta) & 0xf) | ((ieta < 0) ? (0x10) : (0x00)) | ((iphi & 0x7F) << 5) | ((samples & 0xF) << 12) |
(((whichSampleTriggered)&0xF) << 16) | ((databits & 0x3FF) << 20);
(((whichSampleTriggered) & 0xF) << 16) | ((databits & 0x3FF) << 20);
}

//Request the value of a given HO TP bit in the HO TP Digi.
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/HcalDigi/src/HcalTriggerPrimitiveSample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample() : theSample(0) {}
HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample(uint16_t data) : theSample(data) {}

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample(int encodedEt, bool fineGrain, int slb, int slbchan) {
theSample = (((slb)&0x7) << 13) | ((slbchan & 0x3) << 11) | (encodedEt & 0xFF) | ((fineGrain) ? (0x100) : (0));
theSample = (((slb) & 0x7) << 13) | ((slbchan & 0x3) << 11) | (encodedEt & 0xFF) | ((fineGrain) ? (0x100) : (0));
}

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample(int encodedEt, int fineGrainExt) {
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/MuonDetId/interface/CSCIndexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class CSCIndexer {
typedef uint16_t IndexType;
typedef uint32_t LongIndexType;

CSCIndexer(){};
~CSCIndexer(){};
CSCIndexer() {}
~CSCIndexer() {}

/**
* Linear index to label each CSC in CSC system.
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/SiPixelDetId/src/PixelBarrelNameUpgrade.cc
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ PXBDetId PixelBarrelNameUpgrade::getDetId() {
ladder = tmpLadder + 11;
else if (layer == 4)
ladder = tmpLadder + 16;
} // outer
} // outer
else { // inner
if (layer == 1) {
if (tmpLadder <= 3)
Expand All @@ -438,7 +438,7 @@ PXBDetId PixelBarrelNameUpgrade::getDetId() {
else if (tmpLadder <= 32)
ladder = 81 - tmpLadder;
} // layer 4
} // inner
} // inner

// translate the module number from naming convention to cmssw convention
// numbering starts at positive z
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/SiPixelDetId/src/PixelEndcapNameUpgrade.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PixelEndcapNameUpgrade::PixelEndcapNameUpgrade(const DetId& id) : PixelModuleNam
theBlade = 38 - tmpBlade; //18...31-->20...7
} else if (tmpBlade >= 49 && tmpBlade <= 56) {
theBlade = 77 - tmpBlade; //49...56-->28...21
} // iasonas2-end
} // iasonas2-end

if (side == 1 && outer)
thePart = mO;
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/SiPixelDigi/interface/SiPixelCalibDigi.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SiPixelCalibDigi {
} // returns the sum of the squares of adc counts for the collected events at point ipoint
uint32_t getnentries(uint32_t ipoint) const {
return m_data[ipoint].nentries;
} // returns the number of entries made for calibration point ipoint
} // returns the number of entries made for calibration point ipoint
std::vector<uint32_t> getsum() const; // returns the sum of adc counts for the collected events for all points
std::vector<uint32_t> getsumsquares() const; // returns the sum of the squares of adc counts
std::vector<uint8_t> getnentries() const; // returns the number of entries made
Expand Down
2 changes: 1 addition & 1 deletion Mixing/Base/interface/BMixingModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace edm {
static void globalEndJob(MixingCache::Config*) {}

// to be overloaded by dependent class
virtual void reload(const edm::EventSetup& setup){};
virtual void reload(const edm::EventSetup& setup) {}

// Should 'averageNumber' return 0 or 1 if there is no mixing? It is the average number of
// *crossings*, including the hard scatter, or the average number of overlapping events?
Expand Down
2 changes: 1 addition & 1 deletion SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CaloSimParameters {

CaloSimParameters(const edm::ParameterSet &p, bool skipPe2Fc = false);

virtual ~CaloSimParameters(){};
virtual ~CaloSimParameters() {}

/// the factor which goes from whatever units the SimHit amplitudes
/// are in (could be deposited GeV, real GeV, or photoelectrons)
Expand Down
2 changes: 1 addition & 1 deletion SimCalorimetry/EcalElectronicsEmulation/bin/GenABIO.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* getline implementation is copied from glibc. */

#ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1)
#define SIZE_MAX ((size_t) - 1)
#endif
#ifndef SSIZE_MAX
#define SSIZE_MAX ((ssize_t)(SIZE_MAX / 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class EcalSimpleProducer : public edm::one::EDProducer<> {

/**Destructor
*/
~EcalSimpleProducer() override{};
~EcalSimpleProducer() override {}

/** Called at start of job.
* @param es the event setup
*/
void beginJob() override{};
void beginJob() override {}

/** The main method. It produces the event.
* @param evt [out] produced event.
Expand Down
Loading

0 comments on commit 321a48b

Please sign in to comment.