/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimG4Core/Notification/src/GenParticleInfoExtractor.cc
20 строк
904 B
Shahzad Malik Muzaffar
[SIMULATION] [Clang]Cleanup clang-analyzer warnings
03 окт 2024, 18:50
03 окт 2024, 18:50
3259c68
Код
Авторство
О чём код?
#include "SimG4Core/Notification/interface/GenParticleInfoExtractor.h" #include "G4PrimaryParticle.hh" const GenParticleInfo &GenParticleInfoExtractor::operator()(const G4PrimaryParticle *p) const { G4VUserPrimaryParticleInformation *up = p->GetUserInformation(); GenParticleInfo *gpi = dynamic_cast<GenParticleInfo *>(up); if (up == nullptr) { G4Exception("SimG4Core/Notification", "mc001", FatalException, "GenParticleInfoExtractor: G4PrimaryParticle has no user information"); } else if (gpi == nullptr) { G4Exception("SimG4Core/Notification", "mc001", FatalException, "GenParticleInfoExtractor: user information in G4PrimaryParticle is not of GenParticleInfo type"); } // Silence Clang analyzer warning: G4Exception will be thrown if gpi is null [[clang::suppress]] return *gpi; }