]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliFiles.h
set/forceAllSensitive comands removed
[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 switched on with /aliDet/writeGeometry command
14 //               in PreInit phase
15 // DetvN.xml   - XML geometry description file;                
16 //               generation is switched 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     // --> protected
31     //AliFiles(const AliFiles& right);
32     virtual ~AliFiles();
33     
34     // static access method
35     static AliFiles* Instance();
36
37     // methods
38     G4String GetRootMacroPath() const;
39     G4String GetRootMacroPath(const G4String& moduleName,
40                               G4bool isStructure) const;
41     G4String GetG4MacroPath(const G4String& moduleName, 
42                               G4bool isStructure) const;
43     G4String GetG3CallsDatPath(const G4String& moduleName, 
44                               G4int moduleVersion, G4bool isStructure) const;
45     G4String GetXMLFilePath(const G4String& moduleName, 
46                               G4int moduleVersion) const;
47                               
48     // set methods
49     void SetMacroName(const G4String& name);                          
50     void SetG3CallsName(const G4String& name);                        
51  
52     // get methods
53     G4String GetMacroName() const;                            
54     G4String GetG3CallsName() const;                          
55     G4String GetDefaultMacroName() const;                             
56     G4String GetDefaultG3CallsName() const;                           
57     
58   protected:
59     AliFiles(const AliFiles& right);
60     
61     // operators
62     AliFiles& operator=(const AliFiles& right);    
63     
64   private: 
65     // methods
66     G4String GetMacroPath(const G4String& macroName,
67                           const G4String& moduleName,
68                           G4bool isStructure) const;    
69         
70     // static data members  
71     static AliFiles*       fgInstance; //this instance
72     static const G4String  fgkTop;     //top directory
73     static const G4String  fgkDefaultMacroName;   // default config. macro name
74     static const G4String  fgkDefaultG3CallsName; // default g3calls name
75     static const G4String  fgkRootMacroExtension; //".C"  Root macro extension
76     static const G4String  fgkG4MacroExtension;   //".in" G4 macro extension
77     static const G4String  fgkG3CallsExtension;   //".dat"   
78     static const G4String  fgkXMLFileExtension;   //".xml"   
79
80     // data members  
81     G4String        fMacroName;   //configuration macro name
82     G4String        fG3CallsName; //g3calls data file name  
83 };  
84
85 // inline methods
86
87 inline AliFiles* AliFiles::Instance() 
88 { return fgInstance; }
89
90 inline void AliFiles::SetMacroName(const G4String& name)
91 { fMacroName = name; }
92                       
93 inline void AliFiles::SetG3CallsName(const G4String& name)
94 { fG3CallsName = name; }
95
96 inline G4String AliFiles::GetMacroName() const
97 { return fMacroName; }
98
99 inline G4String AliFiles::GetG3CallsName() const
100 { return fG3CallsName; }
101
102 inline G4String AliFiles::GetDefaultMacroName() const
103 { return fgkDefaultMacroName; }
104                               
105 inline G4String AliFiles::GetDefaultG3CallsName() const                       
106 { return fgkDefaultG3CallsName; }
107
108 #endif //ALI_FILES_H