48 if (instance ==
nullptr) {
59 fDataHandlers.reserve(50);
66 for (
auto const & p : fDataHandlers) {
69 fDataHandlers.clear();
79 if (
nullptr != ptr) {
return ptr; }
83 ptr = EmDataHandler(nam);
96 if (
nullptr == ptr) {
return; }
97 for (
auto const & p : fDataHandlers) {
98 if (p == ptr) {
return; }
100 fDataHandlers.push_back(ptr);
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;
122 if (fDataHandlers.empty()) {
return ptr; }
123 for (
auto const & p : fDataHandlers) {
124 if (p->GetName() == nam) {
G4TemplateAutoLock< G4Mutex > G4AutoLock
#define G4MUTEX_INITIALIZER
G4EmDataRegistry(const G4EmDataRegistry &)=delete
G4EmDataHandler * GetHandlerByName(const G4String &, std::size_t nTable)
void DeRegister(G4EmDataHandler *)
void Register(G4EmDataHandler *)
static G4EmDataRegistry * Instance()