Skip to content

Commit e4bfeac

Browse files
authored
Merge pull request cms-sw#43016 from bsunanda/Phase2-hgx346Y
Phase2-hgx346Y Fix the compilation error in CaloSD for debug mode
2 parents afe48e8 + 0d4f93a commit e4bfeac

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

SimG4CMS/Calo/src/CaloSD.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,13 @@ void CaloSD::EndOfEvent(G4HCofThisEvent*) {
386386
cleanHitCollection();
387387

388388
#ifdef EDM_ML_DEBUG
389-
if (theHC[0] == nullptr)
390-
edm::LogVerbatim("CaloSim") << "CaloSD: EndofEvent entered with no entries";
391-
else
392-
edm::LogVerbatim("CaloSim") << "CaloSD: EndofEvent entered with " << theHC[0]->entries() << " entries";
389+
for (int k = 0; k < nHC_; ++k) {
390+
if (theHC[k] == nullptr)
391+
edm::LogVerbatim("CaloSim") << "CaloSD: EndofEvent entered for container " << k << " with no entries";
392+
else
393+
edm::LogVerbatim("CaloSim") << "CaloSD: EndofEvent entered for container " << k << " with " << theHC[0]->entries()
394+
<< " entries";
395+
}
393396
#endif
394397
}
395398

0 commit comments

Comments
 (0)