ATLAS Offline Software
Loading...
Searching...
No Matches
Geo2G4ElementFactory Class Reference

#include <Geo2G4ElementFactory.h>

Collaboration diagram for Geo2G4ElementFactory:

Public Member Functions

 Geo2G4ElementFactory ()
G4Element * Build (const GeoElement *)

Private Attributes

elList m_definedElements

Detailed Description

Definition at line 15 of file Geo2G4ElementFactory.h.

Constructor & Destructor Documentation

◆ Geo2G4ElementFactory()

Geo2G4ElementFactory::Geo2G4ElementFactory ( )

Definition at line 10 of file Geo2G4ElementFactory.cxx.

11{
12}

Member Function Documentation

◆ Build()

G4Element * Geo2G4ElementFactory::Build ( const GeoElement * theEle)

Definition at line 14 of file Geo2G4ElementFactory.cxx.

15{
16 //
17 // Check if this element has already been defined.
18 //
19 const std::string& sym = theEle->getSymbol();
20 const auto itr = m_definedElements.find(sym);
21 if (itr != m_definedElements.end())
22 {
23 return itr->second;
24 }
25 G4Element* elm = new G4Element(theEle->getName(),
26 sym,
27 theEle->getZ(),
28 theEle->getA());
29
30 m_definedElements.emplace(sym, elm);
31 return elm;
32}

Member Data Documentation

◆ m_definedElements

elList Geo2G4ElementFactory::m_definedElements
private

Definition at line 20 of file Geo2G4ElementFactory.h.


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