]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliConfig.h
Merging the VirtualMC branch to the main development branch (HEAD)
[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  * $Log$
9  * Revision 1.4.8.1  2002/06/10 14:43:06  hristov
10  * Merged with v3-08-02
11  *
12  * Revision 1.4  2001/10/05 12:11:40  hristov
13  * iostream.h used instead of iostream (HP)
14  *
15  * Revision 1.3  2001/10/04 15:30:56  hristov
16  * Changes to accommodate the set of PHOS folders and tasks (Y.Schutz)
17  *
18  * Revision 1.2  2001/05/21 17:22:51  buncic
19  * Fixed problem with missing AliConfig while reading galice.root
20  *
21  * Revision 1.1  2001/05/16 14:57:22  alibrary
22  * New files for folders and Stack
23  * 
24  */
25
26 #include <iostream.h>
27 #include <TFolder.h>
28 #include <TList.h>
29 #include <TInterpreter.h>
30 #include <TROOT.h>
31 #include <TSystem.h>
32 #include <TDatabasePDG.h>
33 #include "AliMC.h"
34 class TString ; 
35 class AliGenerator;
36 class AliModule;
37 class AliDetector;
38 class AliConfig;
39 class AliTasks;
40
41 class AliConfig : public TNamed {
42   
43 public:
44   
45   AliConfig(){ 
46     // ctor: this is a singleton, the ctor should never be called but cint needs it as public
47     cerr << "ERROR: AliConfig is a singleton default ctor not callable" << endl ;
48     abort() ; 
49   } 
50   
51   virtual ~ AliConfig ();
52   
53   void  Add (AliGenerator *generator);
54   void  Add (AliMC *mc);
55   void  Add (TDatabasePDG *pdg);
56   void  Add (AliModule *module);
57   void  Add (AliDetector *detector);
58   
59   void  Add (char *list);
60   
61   static AliConfig* Instance();
62   
63 private:
64   AliConfig(const char * name, const char * title );
65   void  AddInFolder (char * dir, TObject *obj);
66   void  AddSubFolder(char * dir[], TObject *obj);
67   void  AddSubTask(char * dir[], TObject *obj);
68  TObject* FindInFolder (char *dir, const char *name);
69   
70   TFolder  *fTopFolder;
71   AliTasks *fTasks;
72   // folders
73   char*  fPDGFolder ; 
74   char*  fGeneratorFolder ; 
75   char*  fMCFolder ; 
76   char*  fModuleFolder ; 
77   char** fDetectorFolder ; 
78   char** fDetectorTask ; 
79
80
81   static AliConfig*  fInstance;
82     
83     ClassDef(AliConfig,1) //Configuration class for AliRun
84 };                              // end class AliConfig
85
86 #endif