Smaller changes
[u/mrichter/AliRoot.git] / AliGeant4 / AliFiles.h
CommitLineData
676fb573 1// $Id$
2// Category: global
3//
7005154f 4// Author: I. Hrivnacova
5//
6// Class AliFiles
7// --------------
ec3a86b4 8// Class for generating file names and paths.
9// The input files:
10// Config.C - the basic AliRoot configuration file (Root macro)
11// When detector setup is defined interactively,
12// the alternative Config.C files per detector
13// are used.
14// Config.in - G4 specific configuration macros per detector
15// The output files:
16// g3calls.dat - the ASCII file with G3 geometry calls;
7ad278c3 17// generation is switched on with /aliDet/writeGeometry command
ec3a86b4 18// in PreInit phase
19// DetvN.xml - XML geometry description file;
7ad278c3 20// generation is switched on with /aliDet/generateXML command
ec3a86b4 21// in Init phase
676fb573 22
23#ifndef ALI_FILES_H
24#define ALI_FILES_H
25
26#include <globals.hh>
27
676fb573 28class AliFiles
29{
30 public:
ec3a86b4 31 AliFiles();
32 AliFiles(const G4String& config);
33 AliFiles(const G4String& config, const G4String& g3calls);
7ad278c3 34 // --> protected
35 //AliFiles(const AliFiles& right);
676fb573 36 virtual ~AliFiles();
676fb573 37
ec3a86b4 38 // static access method
39 static AliFiles* Instance();
40
41 // methods
42 G4String GetRootMacroPath() const;
43 G4String GetRootMacroPath(const G4String& moduleName,
44 G4bool isStructure) const;
45 G4String GetG4MacroPath(const G4String& moduleName,
46 G4bool isStructure) const;
47 G4String GetG3CallsDatPath(const G4String& moduleName,
48 G4int moduleVersion, G4bool isStructure) const;
49 G4String GetXMLFilePath(const G4String& moduleName,
50 G4int moduleVersion) const;
51
52 // set methods
53 void SetMacroName(const G4String& name);
54 void SetG3CallsName(const G4String& name);
55
56 // get methods
57 G4String GetMacroName() const;
58 G4String GetG3CallsName() const;
59 G4String GetDefaultMacroName() const;
60 G4String GetDefaultG3CallsName() const;
7ad278c3 61
62 protected:
63 AliFiles(const AliFiles& right);
64
65 // operators
66 AliFiles& operator=(const AliFiles& right);
67
ec3a86b4 68 private:
69 // methods
70 G4String GetMacroPath(const G4String& macroName,
71 const G4String& moduleName,
72 G4bool isStructure) const;
73
676fb573 74 // static data members
ec3a86b4 75 static AliFiles* fgInstance; //this instance
76 static const G4String fgkTop; //top directory
77 static const G4String fgkDefaultMacroName; // default config. macro name
78 static const G4String fgkDefaultG3CallsName; // default g3calls name
79 static const G4String fgkRootMacroExtension; //".C" Root macro extension
80 static const G4String fgkG4MacroExtension; //".in" G4 macro extension
81 static const G4String fgkG3CallsExtension; //".dat"
82 static const G4String fgkXMLFileExtension; //".xml"
83
84 // data members
7ad278c3 85 G4String fMacroName; //configuration macro name
86 G4String fG3CallsName; //g3calls data file name
676fb573 87};
88
89// inline methods
90
ec3a86b4 91inline AliFiles* AliFiles::Instance()
92{ return fgInstance; }
676fb573 93
ec3a86b4 94inline void AliFiles::SetMacroName(const G4String& name)
95{ fMacroName = name; }
96
97inline void AliFiles::SetG3CallsName(const G4String& name)
98{ fG3CallsName = name; }
676fb573 99
ec3a86b4 100inline G4String AliFiles::GetMacroName() const
101{ return fMacroName; }
676fb573 102
ec3a86b4 103inline G4String AliFiles::GetG3CallsName() const
104{ return fG3CallsName; }
676fb573 105
ec3a86b4 106inline G4String AliFiles::GetDefaultMacroName() const
107{ return fgkDefaultMacroName; }
108
109inline G4String AliFiles::GetDefaultG3CallsName() const
110{ return fgkDefaultG3CallsName; }
676fb573 111
112#endif //ALI_FILES_H