Skip to content

Commit

Permalink
Merge pull request #34044 from smuzaffar/12_0-code-checks-GEOMETRY
Browse files Browse the repository at this point in the history
[GEOMETRY] Apply code-checks/format with misc-definitions-in-headers
  • Loading branch information
cmsbuild authored Jun 11, 2021
2 parents b675812 + 46726e2 commit 2a2ca2e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DetectorDescription/Core/interface/DDValuePair.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ struct DDValuePair : public std::pair<std::string, double> {
DDValuePair(const std::string& s) : std::pair<std::string, double>(s, 0) {}
DDValuePair(double d) : std::pair<std::string, double>("", d) {}

operator const std::string &() const { return first; }
operator std::string &() { return first; }
operator const std::string&() const { return first; }
operator std::string&() { return first; }
operator const double&() const { return second; }
operator double&() { return second; }
};
Expand Down
9 changes: 5 additions & 4 deletions DetectorDescription/RegressionTest/bin/DDErrorReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ int main(int argc, char* argv[]) {
"file,f",
boost::program_options::value<std::string>(),
"XML configuration file name. "
"Default is DetectorDescription/RegressionTest/test/configuration.xml")(
"path,p",
"Specifies filename is a full path and not to use FileInPath to find file. "
" This option is ignored if a filename is not specified");
"Default is DetectorDescription/RegressionTest/test/configuration.xml")("path,p",
"Specifies filename is a full path and "
"not to use FileInPath to find file. "
" This option is ignored if a filename "
"is not specified");

boost::program_options::positional_options_description p;
p.add("file", -1);
Expand Down
16 changes: 8 additions & 8 deletions Geometry/HcalTowerAlgo/src/HcalGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ DetId HcalGeometry::detIdFromLocalAlignmentIndex(unsigned int i) {
const unsigned int nF(numberOfForwardAlignments());
// const unsigned int nO ( numberOfOuterAlignments() ) ;

return (i < nB ? detIdFromBarrelAlignmentIndex(i)
: i < nB + nE ? detIdFromEndcapAlignmentIndex(i - nB)
: i < nB + nE + nF ? detIdFromForwardAlignmentIndex(i - nB - nE)
: detIdFromOuterAlignmentIndex(i - nB - nE - nF));
return (i < nB ? detIdFromBarrelAlignmentIndex(i)
: i < nB + nE ? detIdFromEndcapAlignmentIndex(i - nB)
: i < nB + nE + nF ? detIdFromForwardAlignmentIndex(i - nB - nE)
: detIdFromOuterAlignmentIndex(i - nB - nE - nF));
}

unsigned int HcalGeometry::alignmentBarEndForIndexLocal(const DetId& id, unsigned int nD) {
Expand Down Expand Up @@ -424,10 +424,10 @@ unsigned int HcalGeometry::alignmentTransformIndexLocal(const DetId& id) {
const unsigned int nF(numberOfForwardAlignments());
// const unsigned int nO ( numberOfOuterAlignments() ) ;

const unsigned int index(isHB ? alignmentBarrelIndexLocal(id)
: isHE ? alignmentEndcapIndexLocal(id) + nB
: isHF ? alignmentForwardIndexLocal(id) + nB + nE
: alignmentOuterIndexLocal(id) + nB + nE + nF);
const unsigned int index(isHB ? alignmentBarrelIndexLocal(id)
: isHE ? alignmentEndcapIndexLocal(id) + nB
: isHF ? alignmentForwardIndexLocal(id) + nB + nE
: alignmentOuterIndexLocal(id) + nB + nE + nF);

assert(index < numberOfAlignments());
return index;
Expand Down

0 comments on commit 2a2ca2e

Please sign in to comment.