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

#include <AGDDController.h>

Collaboration diagram for AGDDController:

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),
39  m_printLevel(0)
40 {
43 }

◆ ~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 }

◆ AddSection()

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

Definition at line 65 of file AGDDController.cxx.

66 {
67  m_sectionsToBuild.push_back(section);
68 }

◆ AddVolume()

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

Definition at line 69 of file AGDDController.cxx.

70 {
71  m_volumesToBuild.push_back(section);
72 }

◆ 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();
101  BuildSections();
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;
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++)
96 }

◆ Clean()

void AGDDController::Clean ( )

Definition at line 175 of file AGDDController.cxx.

176 {
177  delete m_theParser;
178  m_theParser=0;
179 
180  m_filesToParse.clear();
181  m_sectionsToBuild.clear();
182  m_volumesToBuild.clear();
183  m_structuresToBuild.clear();
184 
185  m_ss.Clean();
186  m_vs.Clean();
187 }

◆ 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 243 of file AGDDController.cxx.

244 {
245  return m_eval;
246 }

◆ GetAliasStore()

AliasStore & AGDDController::GetAliasStore ( )

Definition at line 237 of file AGDDController.cxx.

238 {
239  return m_as;
240 }

◆ 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 201 of file AGDDController.cxx.

202 {
203  return m_cs;
204 }

◆ GetDetectorStore()

AGDDDetectorStore & AGDDController::GetDetectorStore ( )

Definition at line 213 of file AGDDController.cxx.

214 {
215  return m_ds;
216 }

◆ GetHandlerStore()

XMLHandlerStore & AGDDController::GetHandlerStore ( )

Definition at line 189 of file AGDDController.cxx.

190 {
191  return m_xs;
192 }

◆ GetMaterialStore()

AGDDMaterialStore & AGDDController::GetMaterialStore ( )

Definition at line 225 of file AGDDController.cxx.

226 {
227  return m_ms;
228 }

◆ GetParameterStore()

AGDDParameterStore & AGDDController::GetParameterStore ( )

Definition at line 231 of file AGDDController.cxx.

232 {
233  return m_prs;
234 }

◆ 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 219 of file AGDDController.cxx.

220 {
221  return m_ps;
222 }

◆ GetSectionStore()

AGDDSectionStore & AGDDController::GetSectionStore ( )

Definition at line 207 of file AGDDController.cxx.

208 {
209  return m_ss;
210 }

◆ GetVolumeStore()

AGDDVolumeStore & AGDDController::GetVolumeStore ( )

Definition at line 195 of file AGDDController.cxx.

196 {
197  return m_vs;
198 }

◆ 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 {
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 {
113 }

◆ PrintSections()

void AGDDController::PrintSections ( ) const

Definition at line 104 of file AGDDController.cxx.

105 {
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 {
51  m_theParser=b;
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 {
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:
AGDDBuilder::BuildFromSection
virtual void BuildFromSection(const std::string &)=0
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
rootconvert.fName
string fName
Definition: rootconvert.py:5
AGDDController::m_ds
AGDDDetectorStore m_ds
Definition: AGDDController.h:90
XercesParser
Definition: XercesParser.h:18
AGDDController::m_ps
AGDDPositionerStore m_ps
Definition: AGDDController.h:91
AGDDController::m_volumesToBuild
std::vector< std::string > m_volumesToBuild
Definition: AGDDController.h:79
AGDDController::m_theParser
IAGDDParser * m_theParser
Definition: AGDDController.h:74
AGDDController::m_sectionsToBuild
std::vector< std::string > m_sectionsToBuild
Definition: AGDDController.h:78
AGDDController::m_vs
AGDDVolumeStore m_vs
Definition: AGDDController.h:87
AGDDController::BuildVolumes
void BuildVolumes()
Definition: AGDDController.cxx:92
AGDDBuilder::BuildFromVolume
virtual void BuildFromVolume(const std::string &)=0
AGDDVolumeStore::Clean
void Clean()
Definition: AGDDVolumeStore.cxx:36
AGDDController::m_ms
AGDDMaterialStore m_ms
Definition: AGDDController.h:92
IAGDDParser::WriteToFile
virtual bool WriteToFile(const std::string &)=0
lumiFormat.i
int i
Definition: lumiFormat.py:92
AGDDController::m_xs
XMLHandlerStore m_xs
Definition: AGDDController.h:94
AGDDController::BuildSections
void BuildSections()
Definition: AGDDController.cxx:83
AGDDController::m_prs
AGDDParameterStore m_prs
Definition: AGDDController.h:93
AGDDSectionStore::Clean
void Clean()
Definition: AGDDSectionStore.cxx:41
AGDDController::m_ss
AGDDSectionStore m_ss
Definition: AGDDController.h:88
AGDD2GeoModelBuilder
Definition: AGDD2GeoModelBuilder.h:42
AGDDController::m_filesToParse
std::vector< std::string > m_filesToParse
Definition: AGDDController.h:77
AGDDController::m_eval
AGDD::ExpressionEvaluator m_eval
Definition: AGDDController.h:96
IAGDDParser::ParseStringAndNavigate
virtual bool ParseStringAndNavigate(AGDDController &c, const std::string &)=0
AGDDController::m_as
AliasStore m_as
Definition: AGDDController.h:95
AGDDSectionStore::PrintAllSections
void PrintAllSections() const
Definition: AGDDSectionStore.cxx:32
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
AGDDController::m_locked
bool m_locked
Definition: AGDDController.h:82
AGDDController::m_cs
AGDDColorStore m_cs
Definition: AGDDController.h:89
AGDDController::m_structuresToBuild
std::vector< std::string > m_structuresToBuild
Definition: AGDDController.h:80
AGDDController::m_theBuilder
AGDDBuilder * m_theBuilder
Definition: AGDDController.h:75
AGDDController::m_printLevel
int m_printLevel
Definition: AGDDController.h:85
AGDDController::m_disableSections
bool m_disableSections
Definition: AGDDController.h:83
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
IAGDDParser::ParseFileAndNavigate
virtual bool ParseFileAndNavigate(AGDDController &c, const std::string &)=0