From 1113ccc7f06642b5279215754d6d665e4329eb02 Mon Sep 17 00:00:00 2001 From: Juraj Smiesko Date: Fri, 14 Jul 2023 14:08:59 +0200 Subject: [PATCH] Resolving few warnings --- SimG4Common/src/EventInformation.cpp | 6 +++++- SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp | 2 +- SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp | 2 +- SimG4Fast/src/components/SimG4GflashHomoCalo.cpp | 2 +- SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp | 2 +- SimG4Full/src/components/SimG4FullSimDCHRegion.cpp | 2 +- SimG4Full/src/components/SimG4UserLimitRegion.cpp | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/SimG4Common/src/EventInformation.cpp b/SimG4Common/src/EventInformation.cpp index 5a89c39..bdd8390 100644 --- a/SimG4Common/src/EventInformation.cpp +++ b/SimG4Common/src/EventInformation.cpp @@ -40,14 +40,18 @@ void EventInformation::addParticle(const G4Track* aSecondary) { }); edmParticle.setTime(aSecondary->GetGlobalTime() * sim::g42edm::length); - size_t motherID = aSecondary->GetParentID(); auto g4StartPos = aSecondary->GetVertexPosition(); edmParticle.setVertex({ g4StartPos.x() * sim::g42edm::length, g4StartPos.y() * sim::g42edm::length, g4StartPos.z() * sim::g42edm::length, }); + // todo: no time at endpoint + // parents relations + // daughter relations + + // size_t motherID = aSecondary->GetParentID(); } } //namespace sim diff --git a/SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp b/SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp index 8df4f28..201c3cb 100644 --- a/SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp +++ b/SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp @@ -47,7 +47,7 @@ StatusCode SimG4FastSimCalorimeterRegion::create() { G4LogicalVolume* world = (*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume(); for (const auto& calorimeterName : m_volumeNames) { - for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { + for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { if (world->GetDaughter(iter_region)->GetName().find(calorimeterName) != std::string::npos) { /// all G4Region objects are deleted by the G4RegionStore m_g4regions.emplace_back( diff --git a/SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp b/SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp index 2975152..fab75c7 100644 --- a/SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp +++ b/SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp @@ -49,7 +49,7 @@ StatusCode SimG4FastSimTrackerRegion::create() { G4LogicalVolume* world = (*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume(); for (const auto& trackerName : m_volumeNames) { - for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { + for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { if (world->GetDaughter(iter_region)->GetName().find(trackerName) != std::string::npos) { /// all G4Region objects are deleted by the G4RegionStore m_g4regions.emplace_back( diff --git a/SimG4Fast/src/components/SimG4GflashHomoCalo.cpp b/SimG4Fast/src/components/SimG4GflashHomoCalo.cpp index b52adcf..f19c73b 100644 --- a/SimG4Fast/src/components/SimG4GflashHomoCalo.cpp +++ b/SimG4Fast/src/components/SimG4GflashHomoCalo.cpp @@ -39,5 +39,5 @@ std::unique_ptr SimG4GflashHomoCalo::parametrisat // m_parametrisation = std::unique_ptr(new GFlashSamplingShowerParameterisation( // nist->FindOrBuildMaterial("G4_lAr"), nist->FindOrBuildMaterial("G4_Pb"), 6, 2)); - return std::move(parametrisation); + return parametrisation; } diff --git a/SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp b/SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp index 9229a24..f289420 100644 --- a/SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp +++ b/SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp @@ -40,5 +40,5 @@ std::unique_ptr SimG4GflashSamplingCalo::parametr std::unique_ptr(new GFlashSamplingShowerParameterisation( nist->FindOrBuildMaterial(m_materialActive.value()), nist->FindOrBuildMaterial(m_materialPassive.value()), m_thicknessActive.value(), m_thicknessPassive.value())); - return std::move(parametrisation); + return parametrisation; } diff --git a/SimG4Full/src/components/SimG4FullSimDCHRegion.cpp b/SimG4Full/src/components/SimG4FullSimDCHRegion.cpp index 485de86..b40bf06 100644 --- a/SimG4Full/src/components/SimG4FullSimDCHRegion.cpp +++ b/SimG4Full/src/components/SimG4FullSimDCHRegion.cpp @@ -51,7 +51,7 @@ StatusCode SimG4FullSimDCHRegion::create() { G4LogicalVolume* world = (*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume(); for (const auto& trackerName : m_volumeNames) { - for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { + for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { if (world->GetDaughter(iter_region)->GetName().find(trackerName) != std::string::npos) { /// all G4Region objects are deleted by the G4RegionStore diff --git a/SimG4Full/src/components/SimG4UserLimitRegion.cpp b/SimG4Full/src/components/SimG4UserLimitRegion.cpp index 402dd45..6441146 100644 --- a/SimG4Full/src/components/SimG4UserLimitRegion.cpp +++ b/SimG4Full/src/components/SimG4UserLimitRegion.cpp @@ -46,7 +46,7 @@ StatusCode SimG4UserLimitRegion::create() { // (b) if individiual volumenames are specified, try to find them and set limits for them. } else { for (const auto& volumeName : m_volumeNames) { - for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { + for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) { if (world->GetDaughter(iter_region)->GetName().find(volumeName) != std::string::npos) { /// all G4Region objects are deleted by the G4RegionStore m_g4regions.emplace_back(