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