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

#include <AGDDController.h>

Public Member Functions

 AGDDController ()
 ~AGDDController ()
void SetBuilder (AGDDBuilder *b)
void SetParser (IAGDDParser *b)
AGDDBuilderGetBuilder ()
IAGDDParserGetParser ()
void AddFile (const std::string &fName)
void AddSection (const std::string &section)
void AddVolume (const std::string &volume)
void ParseFiles ()
void ParseString (const std::string &)
bool WriteAGDDtoDBFile (const std::string &)
void PrintSections () const
void BuildVolumes ()
void BuildSections ()
void BuildAll ()
void Clean ()
XMLHandlerStoreGetHandlerStore ()
AGDDVolumeStoreGetVolumeStore ()
AGDDSectionStoreGetSectionStore ()
AGDDColorStoreGetColorStore ()
AGDDDetectorStoreGetDetectorStore ()
AGDDPositionerStoreGetPositionerStore ()
AGDDMaterialStoreGetMaterialStore ()
AGDDParameterStoreGetParameterStore ()
AliasStoreGetAliasStore ()
AGDD::ExpressionEvaluatorEvaluator ()
void UseGeoModelDetector ATLAS_NOT_THREAD_SAFE (const std::string &)
void Locked (bool b)
bool Locked () const
void DisableSections (bool b)
bool DisableSections () const

Private Member Functions

 AGDDController (const AGDDController &c)=delete
AGDDControlleroperator= (const AGDDController &c)=delete

Private Attributes

IAGDDParserm_theParser
AGDDBuilderm_theBuilder
std::vector< std::string > m_filesToParse
std::vector< std::string > m_sectionsToBuild
std::vector< std::string > m_volumesToBuild
std::vector< std::string > m_structuresToBuild
bool m_locked
bool m_disableSections
int m_printLevel
AGDDVolumeStore m_vs
AGDDSectionStore m_ss
AGDDColorStore m_cs
AGDDDetectorStore m_ds
AGDDPositionerStore m_ps
AGDDMaterialStore m_ms
AGDDParameterStore m_prs
XMLHandlerStore m_xs
AliasStore m_as
AGDD::ExpressionEvaluator m_eval

Detailed Description

Definition at line 30 of file AGDDController.h.

Constructor & Destructor Documentation

◆ AGDDController() [1/2]

AGDDController::AGDDController ( )

Definition at line 37 of file AGDDController.cxx.

38 : m_theBuilder(0),m_locked(false),m_disableSections(false),
40{
41 m_theParser=new XercesParser (m_xs);
42 m_theBuilder=new AGDD2GeoModelBuilder (m_ds, m_vs, m_ss, m_as, m_ms);
43}
AGDDBuilder * m_theBuilder
XMLHandlerStore m_xs
IAGDDParser * m_theParser
AGDDMaterialStore m_ms
AGDDDetectorStore m_ds
AGDDSectionStore m_ss
AGDDVolumeStore m_vs
AliasStore m_as

◆ ~AGDDController()

AGDDController::~AGDDController ( )

Definition at line 31 of file AGDDController.cxx.

32{
33 if (m_theParser) delete m_theParser;
34 if (m_theBuilder) delete m_theBuilder;
35}

◆ AGDDController() [2/2]

AGDDController::AGDDController ( const AGDDController & c)
privatedelete

Member Function Documentation

◆ AddFile()

void AGDDController::AddFile ( const std::string & fName)

Definition at line 61 of file AGDDController.cxx.

62{
63 m_filesToParse.push_back(fName);
64}
std::vector< std::string > m_filesToParse

◆ AddSection()

void AGDDController::AddSection ( const std::string & section)

Definition at line 65 of file AGDDController.cxx.

66{
67 m_sectionsToBuild.push_back(section);
68}
void section(const std::string &sec)
std::vector< std::string > m_sectionsToBuild

◆ AddVolume()

void AGDDController::AddVolume ( const std::string & volume)

Definition at line 69 of file AGDDController.cxx.

70{
71 m_volumesToBuild.push_back(section);
72}
std::vector< std::string > m_volumesToBuild

◆ ATLAS_NOT_THREAD_SAFE()

void UseGeoModelDetector AGDDController::ATLAS_NOT_THREAD_SAFE ( const std::string & )

◆ BuildAll()

void AGDDController::BuildAll ( )

Definition at line 98 of file AGDDController.cxx.

99{
100 BuildVolumes();
102}

◆ BuildSections()

void AGDDController::BuildSections ( )

Definition at line 83 of file AGDDController.cxx.

84{
85 for (unsigned int i=0;i<m_sectionsToBuild.size();i++)
86 {
87 if (m_printLevel) std::cout<< " -----> now building section "<<m_sectionsToBuild[i]<<std::endl;
88 m_theBuilder->BuildFromSection(m_sectionsToBuild[i]);
89 }
90}

◆ BuildVolumes()

void AGDDController::BuildVolumes ( )

Definition at line 92 of file AGDDController.cxx.

93{
94 for (unsigned int i=0;i<m_volumesToBuild.size();i++)
95 m_theBuilder->BuildFromVolume(m_volumesToBuild[i]);
96}

◆ Clean()

void AGDDController::Clean ( )

Definition at line 176 of file AGDDController.cxx.

177{
178 delete m_theParser;
179 m_theParser=0;
180
181 m_filesToParse.clear();
182 m_sectionsToBuild.clear();
183 m_volumesToBuild.clear();
184 m_structuresToBuild.clear();
185
186 m_ss.Clean();
187 m_vs.Clean();
188}
std::vector< std::string > m_structuresToBuild

◆ DisableSections() [1/2]

bool AGDDController::DisableSections ( ) const
inline

Definition at line 69 of file AGDDController.h.

69{return m_disableSections;}

◆ DisableSections() [2/2]

void AGDDController::DisableSections ( bool b)
inline

Definition at line 68 of file AGDDController.h.

◆ Evaluator()

AGDD::ExpressionEvaluator & AGDDController::Evaluator ( )

Definition at line 244 of file AGDDController.cxx.

245{
246 return m_eval;
247}
AGDD::ExpressionEvaluator m_eval

◆ GetAliasStore()

AliasStore & AGDDController::GetAliasStore ( )

Definition at line 238 of file AGDDController.cxx.

239{
240 return m_as;
241}

◆ GetBuilder()

AGDDBuilder * AGDDController::GetBuilder ( )

Definition at line 53 of file AGDDController.cxx.

54{
55 return m_theBuilder;
56}

◆ GetColorStore()

AGDDColorStore & AGDDController::GetColorStore ( )

Definition at line 202 of file AGDDController.cxx.

203{
204 return m_cs;
205}
AGDDColorStore m_cs

◆ GetDetectorStore()

AGDDDetectorStore & AGDDController::GetDetectorStore ( )

Definition at line 214 of file AGDDController.cxx.

215{
216 return m_ds;
217}

◆ GetHandlerStore()

XMLHandlerStore & AGDDController::GetHandlerStore ( )

Definition at line 190 of file AGDDController.cxx.

191{
192 return m_xs;
193}

◆ GetMaterialStore()

AGDDMaterialStore & AGDDController::GetMaterialStore ( )

Definition at line 226 of file AGDDController.cxx.

227{
228 return m_ms;
229}

◆ GetParameterStore()

AGDDParameterStore & AGDDController::GetParameterStore ( )

Definition at line 232 of file AGDDController.cxx.

233{
234 return m_prs;
235}
AGDDParameterStore m_prs

◆ GetParser()

IAGDDParser * AGDDController::GetParser ( )

Definition at line 57 of file AGDDController.cxx.

58{
59 return m_theParser;
60}

◆ GetPositionerStore()

AGDDPositionerStore & AGDDController::GetPositionerStore ( )

Definition at line 220 of file AGDDController.cxx.

221{
222 return m_ps;
223}
AGDDPositionerStore m_ps

◆ GetSectionStore()

AGDDSectionStore & AGDDController::GetSectionStore ( )

Definition at line 208 of file AGDDController.cxx.

209{
210 return m_ss;
211}

◆ GetVolumeStore()

AGDDVolumeStore & AGDDController::GetVolumeStore ( )

Definition at line 196 of file AGDDController.cxx.

197{
198 return m_vs;
199}

◆ Locked() [1/2]

bool AGDDController::Locked ( ) const
inline

Definition at line 66 of file AGDDController.h.

66{return m_locked;}

◆ Locked() [2/2]

void AGDDController::Locked ( bool b)
inline

Definition at line 65 of file AGDDController.h.

65{m_locked=b;}

◆ operator=()

AGDDController & AGDDController::operator= ( const AGDDController & c)
privatedelete

◆ ParseFiles()

void AGDDController::ParseFiles ( )

Definition at line 75 of file AGDDController.cxx.

76{
77 if (!m_theParser) m_theParser=new XercesParser(m_xs);
78 for (unsigned int i=0;i<m_filesToParse.size();i++) {
79 if (!m_theParser->ParseFileAndNavigate(*this, m_filesToParse[i])) throw std::runtime_error(Form("File: %s, Line: %d\nAGDDController::ParseFiles() - Could parse file %s.", __FILE__, __LINE__, m_filesToParse[i].c_str()));
80 }
81}

◆ ParseString()

void AGDDController::ParseString ( const std::string & s)

Definition at line 109 of file AGDDController.cxx.

110{
111 if (!m_theParser) m_theParser=new XercesParser(m_xs);
112 m_theParser->ParseStringAndNavigate(*this, s);
113}

◆ PrintSections()

void AGDDController::PrintSections ( ) const

Definition at line 104 of file AGDDController.cxx.

105{
106 m_ss.PrintAllSections();
107}

◆ SetBuilder()

void AGDDController::SetBuilder ( AGDDBuilder * b)

Definition at line 45 of file AGDDController.cxx.

46{
48}

◆ SetParser()

void AGDDController::SetParser ( IAGDDParser * b)

Definition at line 49 of file AGDDController.cxx.

50{
52}

◆ WriteAGDDtoDBFile()

bool AGDDController::WriteAGDDtoDBFile ( const std::string & s)

Definition at line 115 of file AGDDController.cxx.

116{
117 if (!m_theParser)
118 {
119 std::cout<< " -----> asking for a dump without defined parser makes no sense - crashing!" <<std::endl;
120 return false;
121 }
122 else {
123 m_theParser->WriteToFile(s);
124 return true;
125 }
126}

Member Data Documentation

◆ m_as

AliasStore AGDDController::m_as
private

Definition at line 95 of file AGDDController.h.

◆ m_cs

AGDDColorStore AGDDController::m_cs
private

Definition at line 89 of file AGDDController.h.

◆ m_disableSections

bool AGDDController::m_disableSections
private

Definition at line 83 of file AGDDController.h.

◆ m_ds

AGDDDetectorStore AGDDController::m_ds
private

Definition at line 90 of file AGDDController.h.

◆ m_eval

AGDD::ExpressionEvaluator AGDDController::m_eval
private

Definition at line 96 of file AGDDController.h.

◆ m_filesToParse

std::vector<std::string> AGDDController::m_filesToParse
private

Definition at line 77 of file AGDDController.h.

◆ m_locked

bool AGDDController::m_locked
private

Definition at line 82 of file AGDDController.h.

◆ m_ms

AGDDMaterialStore AGDDController::m_ms
private

Definition at line 92 of file AGDDController.h.

◆ m_printLevel

int AGDDController::m_printLevel
private

Definition at line 85 of file AGDDController.h.

◆ m_prs

AGDDParameterStore AGDDController::m_prs
private

Definition at line 93 of file AGDDController.h.

◆ m_ps

AGDDPositionerStore AGDDController::m_ps
private

Definition at line 91 of file AGDDController.h.

◆ m_sectionsToBuild

std::vector<std::string> AGDDController::m_sectionsToBuild
private

Definition at line 78 of file AGDDController.h.

◆ m_ss

AGDDSectionStore AGDDController::m_ss
private

Definition at line 88 of file AGDDController.h.

◆ m_structuresToBuild

std::vector<std::string> AGDDController::m_structuresToBuild
private

Definition at line 80 of file AGDDController.h.

◆ m_theBuilder

AGDDBuilder* AGDDController::m_theBuilder
private

Definition at line 75 of file AGDDController.h.

◆ m_theParser

IAGDDParser* AGDDController::m_theParser
private

Definition at line 74 of file AGDDController.h.

◆ m_volumesToBuild

std::vector<std::string> AGDDController::m_volumesToBuild
private

Definition at line 79 of file AGDDController.h.

◆ m_vs

AGDDVolumeStore AGDDController::m_vs
private

Definition at line 87 of file AGDDController.h.

◆ m_xs

XMLHandlerStore AGDDController::m_xs
private

Definition at line 94 of file AGDDController.h.


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