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

#include <GeoModelExperiment.h>

Collaboration diagram for GeoModelExperiment:

Classes

class  LexigraphicalOrder
class  NameEquals

Public Types

typedef const GeoVDetectorManager * value_type
typedef LexigraphicalOrder order_type
typedef std::set< value_type, order_typecollection_type
typedef collection_type::iterator iterator_type
typedef collection_type::const_iterator const_iterator_type
typedef const_iterator_type ConstIterator

Public Member Functions

 GeoModelExperiment (PVLink physVol)
 Constructor(s)
virtual ~GeoModelExperiment ()=default
GeoPhysVol * getPhysVol ()
 Destructor.
const GeoPhysVol * getPhysVol () const
std::vector< std::string > getListOfManagers () const
void addManager (const GeoVDetectorManager *)
const GeoVDetectorManager * getManager (const std::string &name) const
ConstIterator beginManager () const
ConstIterator endManager () const
void addTmpVolume (PVConstLink volume)

Private Attributes

PVLink m_physVol {}
collection_type m_managers
std::vector< PVConstLink > m_tmpVolumes

Detailed Description

Definition at line 32 of file GeoModelExperiment.h.

Member Typedef Documentation

◆ collection_type

Definition at line 59 of file GeoModelExperiment.h.

◆ const_iterator_type

typedef collection_type::const_iterator GeoModelExperiment::const_iterator_type

Definition at line 61 of file GeoModelExperiment.h.

◆ ConstIterator

◆ iterator_type

typedef collection_type::iterator GeoModelExperiment::iterator_type

Definition at line 60 of file GeoModelExperiment.h.

◆ order_type

◆ value_type

typedef const GeoVDetectorManager* GeoModelExperiment::value_type

Definition at line 39 of file GeoModelExperiment.h.

Constructor & Destructor Documentation

◆ GeoModelExperiment()

GeoModelExperiment::GeoModelExperiment ( PVLink physVol)

Constructor(s)

Definition at line 14 of file GeoModelExperiment.cxx.

15 : m_physVol(physVol) {}

◆ ~GeoModelExperiment()

virtual GeoModelExperiment::~GeoModelExperiment ( )
virtualdefault

Member Function Documentation

◆ addManager()

void GeoModelExperiment::addManager ( const GeoVDetectorManager * mgr)

Definition at line 40 of file GeoModelExperiment.cxx.

40 {
41 if (getManager(mgr->getName())) {
42 std::ostringstream errorMessage;
43 errorMessage
44 << "A detector manager named" << mgr->getName()
45 << " has already been declared to GeoModelExperiment";
46
47 throw std::runtime_error(errorMessage.str());
48 }
49 m_managers.insert(mgr);
50}
const GeoVDetectorManager * getManager(const std::string &name) const
collection_type m_managers

◆ addTmpVolume()

void GeoModelExperiment::addTmpVolume ( PVConstLink volume)

Definition at line 84 of file GeoModelExperiment.cxx.

85{
86 m_tmpVolumes.push_back(volume);
87}
std::vector< PVConstLink > m_tmpVolumes

◆ beginManager()

GeoModelExperiment::ConstIterator GeoModelExperiment::beginManager ( ) const

Definition at line 32 of file GeoModelExperiment.cxx.

32 {
33 return m_managers.begin();
34}

◆ endManager()

GeoModelExperiment::ConstIterator GeoModelExperiment::endManager ( ) const

Definition at line 36 of file GeoModelExperiment.cxx.

36 {
37 return m_managers.end();
38}

◆ getListOfManagers()

std::vector< std::string > GeoModelExperiment::getListOfManagers ( ) const

Definition at line 64 of file GeoModelExperiment.cxx.

64 {
65 std::vector<std::string> managersList;
66 for(auto manager : m_managers) {
67 managersList.push_back(manager->getName());
68 }
69 return managersList;
70}

◆ getManager()

const GeoVDetectorManager * GeoModelExperiment::getManager ( const std::string & name) const

Definition at line 52 of file GeoModelExperiment.cxx.

52 {
53
54 const_iterator_type m = std::find_if(m_managers.begin(),m_managers.end(),NameEquals(name));
55 if (m!=m_managers.end()) {
56 return *m;
57 }
58 else {
59 return NULL;
60 }
61
62}
collection_type::const_iterator const_iterator_type

◆ getPhysVol() [1/2]

GeoPhysVol * GeoModelExperiment::getPhysVol ( )

Destructor.

Definition at line 21 of file GeoModelExperiment.cxx.

21 {
22 return dynamic_pointer_cast<GeoPhysVol>(m_physVol);
23}

◆ getPhysVol() [2/2]

const GeoPhysVol * GeoModelExperiment::getPhysVol ( ) const

Definition at line 26 of file GeoModelExperiment.cxx.

26 {
27 return dynamic_pointer_cast<GeoPhysVol>(m_physVol);
28}

Member Data Documentation

◆ m_managers

collection_type GeoModelExperiment::m_managers
private

Definition at line 99 of file GeoModelExperiment.h.

◆ m_physVol

PVLink GeoModelExperiment::m_physVol {}
private

Definition at line 98 of file GeoModelExperiment.h.

98{};

◆ m_tmpVolumes

std::vector<PVConstLink> GeoModelExperiment::m_tmpVolumes
private

Definition at line 100 of file GeoModelExperiment.h.


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