ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
Geo2G4Svc Class Reference

#include <Geo2G4Svc.h>

Inheritance diagram for Geo2G4Svc:
Collaboration diagram for Geo2G4Svc:

Public Member Functions

 Geo2G4Svc (const std::string &, ISvcLocator *)
 
virtual ~Geo2G4Svc ()
 
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE () override final
 AthService methods. More...
 
virtual void SetDefaultBuilder (std::string n) override final
 Geo2G4SvcBase methods. More...
 
virtual VolumeBuilderGetVolumeBuilder (std::string s) const override final
 
virtual VolumeBuilderGetDefaultBuilder () const override final
 
virtual bool UseTopTransforms () const override final
 
virtual void ListVolumeBuilders () const override final
 

Private Types

typedef std::unordered_map< std::string, std::unique_ptr< VolumeBuilder > > BuilderMap
 

Private Attributes

std::string m_defaultBuilder
 
BuilderMap m_builders
 
bool m_getTopTransform
 
std::unique_ptr< Geo2G4AssemblyFactorym_G4AssemblyFactory
 

Detailed Description

Todo:
NEEDS DOCUMENTATION

Definition at line 22 of file Geo2G4Svc.h.

Member Typedef Documentation

◆ BuilderMap

typedef std::unordered_map<std::string, std::unique_ptr<VolumeBuilder> > Geo2G4Svc::BuilderMap
private

Definition at line 37 of file Geo2G4Svc.h.

Constructor & Destructor Documentation

◆ Geo2G4Svc()

Geo2G4Svc::Geo2G4Svc ( const std::string &  name,
ISvcLocator *  svcLocator 
)

Definition at line 9 of file Geo2G4Svc.cxx.

10  : base_class(name,svcLocator)
12  , m_getTopTransform(true)
13  , m_G4AssemblyFactory(nullptr)
14 {
15  ATH_MSG_VERBOSE ("Creating the Geo2G4Svc.");
16  declareProperty("GetTopTransform", m_getTopTransform);
17 }

◆ ~Geo2G4Svc()

Geo2G4Svc::~Geo2G4Svc ( )
virtual

Definition at line 19 of file Geo2G4Svc.cxx.

20 {}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode initialize Geo2G4Svc::ATLAS_NOT_THREAD_SAFE ( )
finaloverridevirtual

AthService methods.

◆ GetDefaultBuilder()

virtual VolumeBuilder* Geo2G4Svc::GetDefaultBuilder ( ) const
inlinefinaloverridevirtual

Definition at line 32 of file Geo2G4Svc.h.

32 {return m_builders.at(m_defaultBuilder).get();}

◆ GetVolumeBuilder()

VolumeBuilder * Geo2G4Svc::GetVolumeBuilder ( std::string  s) const
finaloverridevirtual

Definition at line 54 of file Geo2G4Svc.cxx.

55 {
56  const auto builderItr(m_builders.find(s));
57  if (builderItr!=m_builders.end())
58  {
59  return builderItr->second.get();
60  }
61  else
62  {
63  ATH_MSG_ERROR ("Trying to retrieve a not existing builder "<<s);
64  ATH_MSG_ERROR ("\treturning Default Builder");
65  }
66  return GetDefaultBuilder();
67 }

◆ ListVolumeBuilders()

void Geo2G4Svc::ListVolumeBuilders ( ) const
finaloverridevirtual

Definition at line 42 of file Geo2G4Svc.cxx.

43 {
44  ATH_MSG_INFO("---- List of all Volume Builders registered with Geo2G4Svc ----");
45  ATH_MSG_INFO("---------------------------------------------------------------");
46  for (const auto& builder : m_builders)
47  {
48  ATH_MSG_INFO(" Volume Builder: "<<builder.second->GetKey());
49  }
50  ATH_MSG_INFO("---------------------------------------------------------------");
51  ATH_MSG_INFO(" default builder is "<<GetDefaultBuilder()->GetKey());
52 }

◆ SetDefaultBuilder()

virtual void Geo2G4Svc::SetDefaultBuilder ( std::string  n)
inlinefinaloverridevirtual

Geo2G4SvcBase methods.

Definition at line 30 of file Geo2G4Svc.h.

◆ UseTopTransforms()

virtual bool Geo2G4Svc::UseTopTransforms ( ) const
inlinefinaloverridevirtual

Definition at line 33 of file Geo2G4Svc.h.

33 {return m_getTopTransform;}

Member Data Documentation

◆ m_builders

BuilderMap Geo2G4Svc::m_builders
private

Definition at line 40 of file Geo2G4Svc.h.

◆ m_defaultBuilder

std::string Geo2G4Svc::m_defaultBuilder
private

Definition at line 39 of file Geo2G4Svc.h.

◆ m_G4AssemblyFactory

std::unique_ptr<Geo2G4AssemblyFactory> Geo2G4Svc::m_G4AssemblyFactory
private

Definition at line 42 of file Geo2G4Svc.h.

◆ m_getTopTransform

bool Geo2G4Svc::m_getTopTransform
private

Definition at line 41 of file Geo2G4Svc.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Geo2G4Svc::m_G4AssemblyFactory
std::unique_ptr< Geo2G4AssemblyFactory > m_G4AssemblyFactory
Definition: Geo2G4Svc.h:42
Geo2G4Svc::GetDefaultBuilder
virtual VolumeBuilder * GetDefaultBuilder() const override final
Definition: Geo2G4Svc.h:32
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Geo2G4Svc::m_defaultBuilder
std::string m_defaultBuilder
Definition: Geo2G4Svc.h:39
Geo2G4Svc::m_builders
BuilderMap m_builders
Definition: Geo2G4Svc.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
createSimpleDistributions.builder
builder
Definition: createSimpleDistributions.py:52
beamspotman.n
n
Definition: beamspotman.py:731
Geo2G4Svc::m_getTopTransform
bool m_getTopTransform
Definition: Geo2G4Svc.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228