ATLAS Offline Software
Simulation
G4Atlas
G4AtlasServices
src
PVNotifier.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PVNotifier.h
"
6
7
#include "G4PhysicalVolumeStore.hh"
8
#include "G4VPhysicalVolume.hh"
9
10
#include "
G4GeometryNotifierSvc.h
"
11
12
PVNotifier::PVNotifier
(
G4GeometryNotifierSvc
* gs)
13
: m_notifierSvc(gs)
14
{
15
G4PhysicalVolumeStore*
store
= G4PhysicalVolumeStore::GetInstance();
16
store
->SetNotifier(
this
);
17
}
18
19
void
PVNotifier::NotifyRegistration
()
20
{
21
G4PhysicalVolumeStore*
store
= G4PhysicalVolumeStore::GetInstance();
22
unsigned
int
current
=
store
->size();
23
G4VPhysicalVolume* lV = (*store)[
current
-1];
24
std::string temp1 =
m_notifierSvc
->
GetCurrentDetectorName
() +
"::"
;
25
std::string temp2 = lV->GetName().substr(0, temp1.size());
26
if
(temp1 != temp2)
27
lV->SetName(temp1 + lV->GetName());
28
}
29
30
void
PVNotifier::NotifyDeRegistration
()
31
{
32
}
PVNotifier::m_notifierSvc
G4GeometryNotifierSvc * m_notifierSvc
Definition:
PVNotifier.h:28
PVNotifier.h
SGTest::store
TestStore store
Definition:
TestStore.cxx:23
fillPileUpNoiseLumi.current
current
Definition:
fillPileUpNoiseLumi.py:52
PVNotifier::NotifyRegistration
void NotifyRegistration()
Definition:
PVNotifier.cxx:19
G4GeometryNotifierSvc
Definition:
G4GeometryNotifierSvc.h:14
G4GeometryNotifierSvc.h
G4GeometryNotifierSvc::GetCurrentDetectorName
const std::string GetCurrentDetectorName() const override final
Definition:
G4GeometryNotifierSvc.h:27
PVNotifier::NotifyDeRegistration
void NotifyDeRegistration()
Definition:
PVNotifier.cxx:30
PVNotifier::PVNotifier
PVNotifier(G4GeometryNotifierSvc *)
Definition:
PVNotifier.cxx:12
Generated on Wed Mar 12 2025 21:17:15 for ATLAS Offline Software by
1.8.18