Skip to content

Commit 079015d

Browse files
committed
code format
1 parent 2ea95a4 commit 079015d

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

SimG4CMS/Calo/src/CaloSD.cc

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ void CaloSD::DrawAll() {}
432432

433433
void CaloSD::PrintAll() {
434434
for (int k = 0; k < nHC_; ++k) {
435-
if (nullptr == theHC[k]) { continue; }
435+
if (nullptr == theHC[k]) {
436+
continue;
437+
}
436438
#ifdef EDM_ML_DEBUG
437439
edm::LogVerbatim("CaloSim") << "CaloSD: Collection " << k << " " << theHC[k]->GetName();
438440
#endif
@@ -784,7 +786,9 @@ void CaloSD::update(const EndOfTrack* trk) {
784786
void CaloSD::update(const ::EndOfEvent*) {
785787
endEvent();
786788
for (int k = 0; k < nHC_; ++k) {
787-
if (nullptr == slave[k].get()) { continue; }
789+
if (nullptr == slave[k].get()) {
790+
continue;
791+
}
788792
slave[k].get()->ReserveMemory(theHC[k]->entries());
789793

790794
int count(0);
@@ -1045,12 +1049,13 @@ void CaloSD::update(const BeginOfTrack* trk) {
10451049

10461050
void CaloSD::cleanHitCollection() {
10471051
for (int k = 0; k < nHC_; ++k) {
1048-
if (nullptr == theHC[k]) { continue; }
1052+
if (nullptr == theHC[k]) {
1053+
continue;
1054+
}
10491055
std::vector<CaloG4Hit*>* theCollection = theHC[k]->GetVector();
10501056

10511057
#ifdef EDM_ML_DEBUG
1052-
edm::LogVerbatim("CaloSim")
1053-
<< "CaloSD: collection " << k << " before merging, size = " << theHC[k]->entries();
1058+
edm::LogVerbatim("CaloSim") << "CaloSD: collection " << k << " before merging, size = " << theHC[k]->entries();
10541059
#endif
10551060
if (reusehit[k].empty())
10561061
reusehit[k].reserve(theHC[k]->entries() - cleanIndex[k]);
@@ -1063,21 +1068,21 @@ void CaloSD::cleanHitCollection() {
10631068
sort((hitvec.begin() + cleanIndex[k]), hitvec.end(), CaloG4HitLess());
10641069
#ifdef EDM_ML_DEBUG
10651070
edm::LogVerbatim("CaloSim") << "CaloSD::cleanHitCollection: sort hits in buffer starting from "
1066-
<< "element = " << cleanIndex[k];
1071+
<< "element = " << cleanIndex[k];
10671072
for (unsigned int i = 0; i < hitvec.size(); ++i) {
1068-
if (hitvec[i] == nullptr)
1069-
edm::LogVerbatim("CaloSim") << i << " has a null pointer";
1070-
else
1071-
edm::LogVerbatim("CaloSim") << i << " " << *hitvec[i];
1073+
if (hitvec[i] == nullptr)
1074+
edm::LogVerbatim("CaloSim") << i << " has a null pointer";
1075+
else
1076+
edm::LogVerbatim("CaloSim") << i << " " << *hitvec[i];
10721077
}
10731078
#endif
10741079
CaloG4HitEqual equal;
10751080
for (unsigned int i = cleanIndex[k]; i < hitvec.size(); ++i) {
1076-
int jump = 0;
1077-
for (unsigned int j = i + 1; j < hitvec.size() && equal(hitvec[i], hitvec[j]); ++j) {
1078-
++jump;
1079-
// merge j to i
1080-
(*hitvec[i]).addEnergyDeposit(*hitvec[j]);
1081+
int jump = 0;
1082+
for (unsigned int j = i + 1; j < hitvec.size() && equal(hitvec[i], hitvec[j]); ++j) {
1083+
++jump;
1084+
// merge j to i
1085+
(*hitvec[i]).addEnergyDeposit(*hitvec[j]);
10811086
(*hitvec[j]).setEM(0.);
10821087
(*hitvec[j]).setHadr(0.);
10831088
reusehit[k].emplace_back(hitvec[j]);

0 commit comments

Comments
 (0)