#include <G4EmDataRegistry.hh>
Definition at line 40 of file G4EmDataRegistry.hh.
◆ ~G4EmDataRegistry()
| G4EmDataRegistry::~G4EmDataRegistry |
( |
| ) |
|
Definition at line 64 of file G4EmDataRegistry.cc.
65{
66 for (auto const & p : fDataHandlers) {
67 delete p;
68 }
69 fDataHandlers.clear();
70}
◆ G4EmDataRegistry()
◆ DeRegister()
Definition at line 105 of file G4EmDataRegistry.cc.
106{
107 if (nullptr == ptr) { return; }
108 std::size_t
n = fDataHandlers.size();
109 for (std::size_t i = 0; i <
n; ++i) {
110 if (fDataHandlers[i] == ptr) {
111 fDataHandlers[i] = nullptr;
112 return;
113 }
114 }
115}
◆ GetHandlerByName()
Definition at line 75 of file G4EmDataRegistry.cc.
76{
77
78 G4EmDataHandler* ptr = EmDataHandler(nam);
79 if (nullptr != ptr) { return ptr; }
80
81
83 ptr = EmDataHandler(nam);
84 if (nullptr == ptr) {
85 ptr = new G4EmDataHandler(n, nam);
86 }
87 l.unlock();
88
89 return ptr;
90}
G4TemplateAutoLock< G4Mutex > G4AutoLock
◆ Instance()
◆ operator=()
◆ Register()
Definition at line 94 of file G4EmDataRegistry.cc.
95{
96 if (nullptr == ptr) { return; }
97 for (auto const & p : fDataHandlers) {
98 if (p == ptr) { return; }
99 }
100 fDataHandlers.push_back(ptr);
101}
The documentation for this class was generated from the following files: