Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmDataRegistry Class Reference

#include <G4EmDataRegistry.hh>

Public Member Functions

 ~G4EmDataRegistry ()
 
G4EmDataHandlerGetHandlerByName (const G4String &, std::size_t nTable)
 
void Register (G4EmDataHandler *)
 
G4EmDataRegistryoperator= (const G4EmDataRegistry &right)=delete
 
 G4EmDataRegistry (const G4EmDataRegistry &)=delete
 

Static Public Member Functions

static G4EmDataRegistryInstance ()
 

Detailed Description

Definition at line 40 of file G4EmDataRegistry.hh.

Constructor & Destructor Documentation

◆ ~G4EmDataRegistry()

G4EmDataRegistry::~G4EmDataRegistry ( )

Definition at line 64 of file G4EmDataRegistry.cc.

65{}

◆ G4EmDataRegistry()

G4EmDataRegistry::G4EmDataRegistry ( const G4EmDataRegistry & )
delete

Member Function Documentation

◆ GetHandlerByName()

G4EmDataHandler * G4EmDataRegistry::GetHandlerByName ( const G4String & nam,
std::size_t nTable )

Definition at line 70 of file G4EmDataRegistry.cc.

71{
72 // handler already exist
73 G4EmDataHandler* ptr = EmDataHandler(nam);
74 if (nullptr != ptr) { return ptr; }
75
76 // create a new handler
77 G4AutoLock l(&theEmData);
78 ptr = EmDataHandler(nam);
79 if (nullptr == ptr) {
80 ptr = new G4EmDataHandler(n, nam);
81 }
82 l.unlock();
83
84 return ptr;
85}
G4TemplateAutoLock< G4Mutex > G4AutoLock

◆ Instance()

G4EmDataRegistry * G4EmDataRegistry::Instance ( )
static

Definition at line 46 of file G4EmDataRegistry.cc.

47{
48 if (instance == nullptr) {
49 static G4EmDataRegistry manager;
50 instance = &manager;
51 }
52 return instance;
53}
G4EmDataRegistry(const G4EmDataRegistry &)=delete

Referenced by G4EmDataHandler::G4EmDataHandler().

◆ operator=()

G4EmDataRegistry & G4EmDataRegistry::operator= ( const G4EmDataRegistry & right)
delete

◆ Register()

void G4EmDataRegistry::Register ( G4EmDataHandler * ptr)

Definition at line 89 of file G4EmDataRegistry.cc.

90{
91 if (nullptr == ptr) { return; }
92 for (auto const & p : fDataHandlers) {
93 if (p == ptr) { return; }
94 }
95 fDataHandlers.push_back(ptr);
96}

Referenced by G4EmDataHandler::G4EmDataHandler().


The documentation for this class was generated from the following files: