]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliConfig.h
Cleanup of STEER coding conventions
[u/mrichter/AliRoot.git] / STEER / AliConfig.h
index 4a17084aa844120cbe9dd45288f432ec3c0e0889..358a01e7d0ecce01eda198cb60a392d4233319ad 100644 (file)
@@ -4,45 +4,30 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
-/* 
- * $Log$
- * Revision 1.2  2001/05/21 17:22:51  buncic
- * Fixed problem with missing AliConfig while reading galice.root
- *
- * Revision 1.1  2001/05/16 14:57:22  alibrary
- * New files for folders and Stack
- * 
- */
 
-#include <iostream>
-#include <TFolder.h>
-#include <TList.h>
-#include <TInterpreter.h>
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TDatabasePDG.h>
-class TString ; 
+
+class TDatabasePDG;
+class TFolder;
+class TString;
+class TVirtualMC;
+
+class AliConfig;
+class AliDetector;
 class AliGenerator;
 class AliModule;
-class AliDetector;
-class AliMC;
-class AliConfig;
 class AliTasks;
 
+#include <TNamed.h>
+
 class AliConfig : public TNamed {
   
 public:
-  
-  AliConfig(){ 
-    // ctor: this is a singleton, the ctor should never be called but cint needs it as public
-    cerr << "ERROR: AliConfig is a singleton default ctor not callable" << endl ;
-    abort() ; 
-  } 
-  
+
+  AliConfig();
   virtual ~ AliConfig ();
   
   void  Add (AliGenerator *generator);
-  void  Add (AliMC *mc);
+  void  Add (TVirtualMC *mc);
   void  Add (TDatabasePDG *pdg);
   void  Add (AliModule *module);
   void  Add (AliDetector *detector);
@@ -52,24 +37,27 @@ public:
   static AliConfig* Instance();
   
 private:
-  AliConfig(const char * name, const char * title );
-  void  AddInFolder (char * dir, TObject *obj);
-  void  AddSubFolder(char * dir[], TObject *obj);
-  void  AddSubTask(char * dir[], TObject *obj);
- TObject* FindInFolder (char *dir, const char *name);
+
+  enum {kFolders=8, kTasks=5};
+  AliConfig(const char * name, const char * title);
+  AliConfig(const AliConfig& conf);
+  void  AddInFolder (const char * dir, TObject *obj);
+  void  AddSubFolder(const char * dir[], TObject *obj);
+  void  AddSubTask(const char * dir[], TObject *obj);
+  TObject* FindInFolder (const char *dir, const char *name);
+  AliConfig& operator = (const AliConfig&) {return *this;}
   
-  TFolder  *fTopFolder;
-  AliTasks *fTasks;
+  TFolder  *fTopFolder;                // Pointer of the top folder
+  AliTasks *fTasks;                    // Pointer for the tasks
   // folders
-  char*  fPDGFolder ; 
-  char*  fGeneratorFolder ; 
-  char*  fMCFolder ; 
-  char*  fModuleFolder ; 
-  char** fDetectorFolder ; 
-  char** fDetectorTask ; 
-
+  const char*  fPDGFolder ;            // Names of the PDG folders
+  const char*  fGeneratorFolder ;      // Names of the Generator folders
+  const char*  fMCFolder ;             // Names of MC folders
+  const char*  fModuleFolder ;         // Names of Module folders
+  const char** fDetectorFolder ;       // Names of Detector folders
+  const char** fDetectorTask ;         // Names of Detector Task folders
 
-  static AliConfig*  fInstance;
+  static AliConfig*  fgInstance;       // Instance of the singleton
     
     ClassDef(AliConfig,1) //Configuration class for AliRun
 };                             // end class AliConfig