]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEER/AliConfig.h
Added two furter exotica
[u/mrichter/AliRoot.git] / STEER / STEER / AliConfig.h
1 #ifndef ALICONFIG_H
2 #define ALICONFIG_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //
9 // Class to name the folders
10 // This class contains 
11 // the names of the top level folders
12 // 
13
14 //
15 // Class to name the folders
16 // This class contains 
17 // the names of the top level folders
18 // 
19
20 #include <TNamed.h>
21 class TDatabasePDG;
22 class TFolder;
23 class TString;
24 class TVirtualMC;
25
26 class AliConfig;
27 class AliDetector;
28 class AliGenerator;
29 class AliModule;
30
31 class AliConfig : public TNamed {
32   
33 public:
34   
35   virtual ~ AliConfig (); 
36
37   void       Add(TDatabasePDG *pdg);
38   
39   void       Add(AliGenerator *generator,const char* eventfolder = fgkDefaultEventFolderName);
40   void       Add (TVirtualMC *mc,const char* eventfolder = fgkDefaultEventFolderName);
41   void       Add (AliModule *module,const char* eventfolder = fgkDefaultEventFolderName);
42   void       Add (AliDetector *detector,const char* eventfolder = fgkDefaultEventFolderName);
43
44   Int_t      AddDetector(const char* evntfoldername,const char *name, const char* title);
45   Int_t      AddDetector(TFolder* evntfolder,const char *name, const char* title);
46   
47   Int_t      CreateDetectorFolders(const char* evntfoldername,const char *name, const char* title);//Used by AliRunGetter
48   Int_t      CreateDetectorFolders(TFolder* evntfolder,const char *name, const char* title);//Used by AliRunGetter
49   
50   static     AliConfig* Instance();
51   
52   TFolder*              BuildEventFolder(const char* name,const char* tilte);
53   
54   TFolder*              GetTopFolder(){return fTopFolder;}
55   TFolder*              GetConstFolder(){return fConstFolder;}
56
57   static const TString& GetModulesFolderName(){return fgkModuleFolderName;}
58   static const TString& GetDefaultEventFolderName()
59     {return fgkDefaultEventFolderName;}
60     
61   const TString&        GetDataFolderName() const;//returns name of data folder
62
63 private:  
64   AliConfig(const AliConfig&); // Not implemented
65   AliConfig& operator=(const AliConfig&); // Not implemented
66   AliConfig(); // Not implemented
67   AliConfig(const char * name, const char * title );
68   
69   static const TString  fgkTopFolderName; //name of top AliRoot folder
70  
71   static const TString  fgkDefaultEventFolderName; //name of event folder
72   static const TString  fgkConstantsFolderName;    //name of constants folder
73   
74   static const TString  fgkDataFolderName;         //name of data folde
75   static const TString  fgkConditionsFolderName;   //name of conditions folder
76   static const TString  fgkConfigurationFolderName;//name of configuration foolder
77   static const TString  fgkHeaderFolderName;       //name of header folder
78     
79   static const TString  fgkCalibrationFolderName;  //name of calibration folder
80   static const TString  fgkAligmentFolderName;     //name of alignment folder
81   
82   static const TString  fgkFieldFolderName;        //name of magn.field folder
83   static const TString  fgkGeneratorsFolderName;   //name of generator folder
84   static const TString  fgkVirtualMCFolderName;    //name of virtual MC folder
85
86   void          AddInFolder (const char * dir, TObject *obj);
87   Int_t         AddSubFolder(TFolder* topfolder, const char* infoler, //helper method
88                      const char* newfoldname, const char* newfoldtitle);
89   TObject*      FindInFolder (const char *dir, const char *name);
90   
91   // folders
92   TFolder*              fTopFolder;    //pointer to top folder
93   TFolder*              fConstFolder;  //pointer to constants folder
94
95   static const TString  fgkPDGFolderName; //name of PDG folder
96   static const TString  fgkGeneratorFolderName; //name of generator name
97   static const TString  fgkMCFolderName;        //name of MC folder
98   static const TString  fgkModuleFolderName;    //name of module folder
99   
100   TString              *fDetectorFolder;//!array with names for detector folders (where detector is going to be put)
101   
102   static AliConfig*     fgInstance; //pointer to the AliConfig instance
103   
104   
105   ClassDef(AliConfig,3) //Configuration class for AliRun
106 };                              // end class AliConfig
107
108 #endif