ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
}
G4GeometryNotifierSvc.h
PVNotifier.h
PVNotifier::NotifyDeRegistration
void NotifyDeRegistration()
Definition
PVNotifier.cxx:30
PVNotifier::NotifyRegistration
void NotifyRegistration()
Definition
PVNotifier.cxx:19
PVNotifier::G4GeometryNotifierSvc
friend class G4GeometryNotifierSvc
Definition
PVNotifier.h:17
PVNotifier::m_notifierSvc
G4GeometryNotifierSvc * m_notifierSvc
Definition
PVNotifier.h:28
PVNotifier::PVNotifier
PVNotifier(G4GeometryNotifierSvc *)
Definition
PVNotifier.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0