ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
13 : m_notifierSvc(gs)
14{
15 G4PhysicalVolumeStore* store = G4PhysicalVolumeStore::GetInstance();
16 store->SetNotifier(this);
17}
18
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
void NotifyDeRegistration()
void NotifyRegistration()
friend class G4GeometryNotifierSvc
Definition PVNotifier.h:17
G4GeometryNotifierSvc * m_notifierSvc
Definition PVNotifier.h:28
PVNotifier(G4GeometryNotifierSvc *)