]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliFiles.h
added subcutoff for delta electrons
[u/mrichter/AliRoot.git] / AliGeant4 / AliFiles.h
1 // $Id$
2 // Category: global
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliFiles
7 // --------------
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;
17 //               generation is switched on with /aliDet/writeGeometry command
18 //               in PreInit phase
19 // DetvN.xml   - XML geometry description file;                
20 //               generation is switched on with /aliDet/generateXML command
21 //               in Init phase
22
23 #ifndef ALI_FILES_H
24 #define ALI_FILES_H
25
26 #include <globals.hh>
27
28 class AliFiles
29 {
30   public:
31     AliFiles();
32     AliFiles(const G4String& config);
33     AliFiles(const G4String& config, const G4String& g3calls);
34     // --> protected
35     //AliFiles(const AliFiles& right);
36     virtual ~AliFiles();
37     
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;                           
61     
62   protected:
63     AliFiles(const AliFiles& right);
64     
65     // operators
66     AliFiles& operator=(const AliFiles& right);    
67     
68   private: 
69     // methods
70     G4String GetMacroPath(const G4String& macroName,
71                           const G4String& moduleName,
72                           G4bool isStructure) const;    
73         
74     // static data members  
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  
85     G4String        fMacroName;   //configuration macro name
86     G4String        fG3CallsName; //g3calls data file name  
87 };  
88
89 // inline methods
90
91 inline AliFiles* AliFiles::Instance() 
92 { return fgInstance; }
93
94 inline void AliFiles::SetMacroName(const G4String& name)
95 { fMacroName = name; }
96                       
97 inline void AliFiles::SetG3CallsName(const G4String& name)
98 { fG3CallsName = name; }
99
100 inline G4String AliFiles::GetMacroName() const
101 { return fMacroName; }
102
103 inline G4String AliFiles::GetG3CallsName() const
104 { return fG3CallsName; }
105
106 inline G4String AliFiles::GetDefaultMacroName() const
107 { return fgkDefaultMacroName; }
108                               
109 inline G4String AliFiles::GetDefaultG3CallsName() const                       
110 { return fgkDefaultG3CallsName; }
111
112 #endif //ALI_FILES_H