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