]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliConfig.h
Init the TList with refence objects when using the copy ctor, added protection agains...
[u/mrichter/AliRoot.git] / 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 class AliTasks;
31
32 class AliConfig : public TNamed {
33   
34 public:
35   
36   virtual ~ AliConfig (); 
37
38   void       Add(TDatabasePDG *pdg);
39   void       Add(char *list);
40   
41   void       Add(AliGenerator *generator,const char* eventfolder = fgkDefaultEventFolderName);
42   void       Add (TVirtualMC *mc,const char* eventfolder = fgkDefaultEventFolderName);
43   void       Add (AliModule *module,const char* eventfolder = fgkDefaultEventFolderName);
44   void       Add (AliDetector *detector,const char* eventfolder = fgkDefaultEventFolderName);
45
46   Int_t      AddDetector(const char* evntfoldername,const char *name, const char* title);
47   Int_t      AddDetector(TFolder* evntfolder,const char *name, const char* title);
48   
49   Int_t      CreateDetectorFolders(const char* evntfoldername,const char *name, const char* title);//Used by AliRunGetter
50   Int_t      CreateDetectorFolders(TFolder* evntfolder,const char *name, const char* title);//Used by AliRunGetter
51   Int_t      CreateDetectorTasks(const char *name, const char* title);
52   
53   static     AliConfig* Instance();
54   
55   TFolder*              BuildEventFolder(const char* name,const char* tilte);
56   
57   TFolder*              GetTopFolder(){return fTopFolder;}
58   TFolder*              GetTaskFolder(){return fTaskFolder;}
59   TFolder*              GetConstFolder(){return fConstFolder;}
60
61   static const TString& GetModulesFolderName(){return fgkModuleFolderName;}
62   static const TString& GetDefaultEventFolderName()
63     {return fgkDefaultEventFolderName;}
64   static const TString& GetTasksFolderName() {return fgkTasksFolderName;}
65   
66   TString               GetQATaskName() const; //returns path to QA tasks
67   TString               GetDigitizerTaskName () const;
68   TString               GetSDigitizerTaskName () const;
69   TString               GetReconstructionerTaskName () const;
70   TString               GetTrackerTaskName () const;
71   TString               GetPIDTaskName () const;
72   
73   
74   const TString&        GetQAFolderName() const; //returns path to folder with QA output
75   
76   const TString&        GetDataFolderName() const;//returns name of data folder
77
78 private:  
79   AliConfig(const AliConfig&); // Not implemented
80   AliConfig& operator=(const AliConfig&); // Not implemented
81   AliConfig(); // Not implemented
82   AliConfig(const char * name, const char * title );
83   
84   static const TString  fgkTopFolderName; //name of top AliRoot folder
85  
86   static const TString  fgkDefaultEventFolderName; //name of event folder
87   static const TString  fgkTasksFolderName;        //name of task folder
88   static const TString  fgkConstantsFolderName;    //name of constants folder
89   
90   static const TString  fgkDataFolderName;         //name of data folde
91   static const TString  fgkConditionsFolderName;   //name of conditions folder
92   static const TString  fgkConfigurationFolderName;//name of configuration foolder
93   static const TString  fgkHeaderFolderName;       //name of header folder
94   
95   static const TString  fgkDigitizerTaskName;      //name of digitizer task
96   static const TString  fgkSDigitizerTaskName;     //name of sdigitizer task
97   static const TString  fgkQATaskName;             //name of Q-A task
98   static const TString  fgkReconstructionerTaskName;//name of reconstructioner
99                                                     //task
100   static const TString  fgkTrackerTaskName;        //name of tracker task 
101   static const TString  fgkPIDTaskName;            //name of PID task
102   
103   static const TString  fgkCalibrationFolderName;  //name of calibration folder
104   static const TString  fgkAligmentFolderName;     //name of alignment folder
105   static const TString  fgkQAFolderName;           //name of QA folder
106   
107   static const TString  fgkFieldFolderName;        //name of magn.field folder
108   static const TString  fgkGeneratorsFolderName;   //name of generator folder
109   static const TString  fgkVirtualMCFolderName;    //name of virtual MC folder
110
111   void          AddInFolder (const char * dir, TObject *obj);
112   Int_t         AddSubTask(const char *taskname, const char* name, const char* title);
113   Int_t         AddSubFolder(TFolder* topfolder, const char* infoler, //helper method
114                      const char* newfoldname, const char* newfoldtitle);
115   TObject*      FindInFolder (const char *dir, const char *name);
116   
117   // folders
118   TFolder*              fTopFolder;    //pointer to top folder
119   TFolder*              fTaskFolder;   //pointer to task folder
120   TFolder*              fConstFolder;  //pointer to constants folder
121
122   static const TString  fgkPDGFolderName; //name of PDG folder
123   static const TString  fgkGeneratorFolderName; //name of generator name
124   static const TString  fgkMCFolderName;        //name of MC folder
125   static const TString  fgkModuleFolderName;    //name of module folder
126   
127   TString              *fDetectorTask;//!array with names for detector tasks
128   TString              *fDetectorFolder;//!array with names for detector folders (where detector is going to be put)
129   
130   static AliConfig*     fgInstance; //pointer to the AliConfig instance
131   
132   
133   ClassDef(AliConfig,2) //Configuration class for AliRun
134 };                              // end class AliConfig
135
136 #endif