ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
PVNotifier Class Reference

#include <PVNotifier.h>

Inheritance diagram for PVNotifier:
Collaboration diagram for PVNotifier:

Public Member Functions

void NotifyRegistration ()
 
void NotifyDeRegistration ()
 

Private Member Functions

 PVNotifier (G4GeometryNotifierSvc *)
 

Private Attributes

G4GeometryNotifierSvcm_notifierSvc
 

Friends

class G4GeometryNotifierSvc
 

Detailed Description

Notifier class to prepend detector name to all G4 Physical Volumes Only to be used by the G4GeometryNotifierSvc

Definition at line 15 of file PVNotifier.h.

Constructor & Destructor Documentation

◆ PVNotifier()

PVNotifier::PVNotifier ( G4GeometryNotifierSvc gs)
private

Definition at line 12 of file PVNotifier.cxx.

13  : m_notifierSvc(gs)
14 {
15  G4PhysicalVolumeStore* store = G4PhysicalVolumeStore::GetInstance();
16  store->SetNotifier(this);
17 }

Member Function Documentation

◆ NotifyDeRegistration()

void PVNotifier::NotifyDeRegistration ( )

Definition at line 30 of file PVNotifier.cxx.

31 {
32 }

◆ NotifyRegistration()

void PVNotifier::NotifyRegistration ( )

Definition at line 19 of file PVNotifier.cxx.

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 }

Friends And Related Function Documentation

◆ G4GeometryNotifierSvc

friend class G4GeometryNotifierSvc
friend

Definition at line 17 of file PVNotifier.h.

Member Data Documentation

◆ m_notifierSvc

G4GeometryNotifierSvc* PVNotifier::m_notifierSvc
private

Definition at line 28 of file PVNotifier.h.


The documentation for this class was generated from the following files:
PVNotifier::m_notifierSvc
G4GeometryNotifierSvc * m_notifierSvc
Definition: PVNotifier.h:28
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
G4GeometryNotifierSvc::GetCurrentDetectorName
const std::string GetCurrentDetectorName() const override final
Definition: G4GeometryNotifierSvc.h:27