* See cxx source for full Copyright notice */
/* $Id$ */
-/*
- * $Log$
- */
-#include <TFolder.h>
-#include <TList.h>
-#include <TInterpreter.h>
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TDatabasePDG.h>
+//
+// Class to name the folders
+// This class contains
+// the names of the top level folders
+//
+//
+// Class to name the folders
+// This class contains
+// the names of the top level folders
+//
+
+#include <TNamed.h>
+class TDatabasePDG;
+class TFolder;
+class TString;
+class TVirtualMC;
+
+class AliConfig;
+class AliDetector;
class AliGenerator;
class AliModule;
-class AliDetector;
-class AliMC;
-class AliConfig;
class AliTasks;
class AliConfig : public TNamed {
+
+public:
+
+ AliConfig();
+
+ virtual ~ AliConfig ();
- public:
+ void Add(TDatabasePDG *pdg);
+ void Add(char *list);
+
+ void Add(AliGenerator *generator,const char* eventfolder = fgkDefaultEventFolderName);
+ void Add (TVirtualMC *mc,const char* eventfolder = fgkDefaultEventFolderName);
+ void Add (AliModule *module,const char* eventfolder = fgkDefaultEventFolderName);
+ void Add (AliDetector *detector,const char* eventfolder = fgkDefaultEventFolderName);
- AliConfig(const char *name="gAlice",
- const char *title = "Alice simulation and reconstruction framework");
- virtual ~ AliConfig ();
+ Int_t AddDetector(const char* evntfoldername,const char *name, const char* title);
+ Int_t AddDetector(TFolder* evntfolder,const char *name, const char* title);
+
+ Int_t CreateDetectorFolders(const char* evntfoldername,const char *name, const char* title);//Used by AliRunGetter
+ Int_t CreateDetectorFolders(TFolder* evntfolder,const char *name, const char* title);//Used by AliRunGetter
+ Int_t CreateDetectorTasks(const char *name, const char* title);
+
+ static AliConfig* Instance();
+
+ TFolder* BuildEventFolder(const char* name,const char* tilte);
+
+ TFolder* GetTopFolder(){return fTopFolder;}
+ TFolder* GetTaskFolder(){return fTaskFolder;}
+ TFolder* GetConstFolder(){return fConstFolder;}
- void Add (AliGenerator *generator);
- void Add (AliMC *mc);
- void Add (TDatabasePDG *pdg);
- void Add (AliModule *module);
- void Add (AliDetector *detector);
-
- void Add (const char *list);
-
- static AliConfig* Instance();
+ static const TString& GetModulesFolderName(){return fgkModuleFolderName;}
+ static const TString& GetDefaultEventFolderName()
+ {return fgkDefaultEventFolderName;}
+ static const TString& GetTasksFolderName() {return fgkTasksFolderName;}
+
+ TString GetQATaskName() const; //returns path to QA tasks
+ TString GetDigitizerTaskName () const;
+ TString GetSDigitizerTaskName () const;
+ TString GetReconstructionerTaskName () const;
+ TString GetTrackerTaskName () const;
+ TString GetPIDTaskName () const;
+
+
+ const TString& GetQAFolderName() const; //returns path to folder with QA output
+
+ const TString& GetDataFolderName() const;//returns name of data folder
- private:
- void AddInFolder (char *dir, TObject *obj);
- void AddSubFolder(char *dir[], TObject *obj);
- TObject* FindInFolder (char *dir, const char *name);
+private:
+ static const TString fgkTopFolderName; //name of top AliRoot folder
+
+ static const TString fgkDefaultEventFolderName; //name of event folder
+ static const TString fgkTasksFolderName; //name of task folder
+ static const TString fgkConstantsFolderName; //name of constants folder
+
+ static const TString fgkDataFolderName; //name of data folde
+ static const TString fgkConditionsFolderName; //name of conditions folder
+ static const TString fgkConfigurationFolderName;//name of configuration foolder
+ static const TString fgkHeaderFolderName; //name of header folder
+
+ static const TString fgkDigitizerTaskName; //name of digitizer task
+ static const TString fgkSDigitizerTaskName; //name of sdigitizer task
+ static const TString fgkQATaskName; //name of Q-A task
+ static const TString fgkReconstructionerTaskName;//name of reconstructioner
+ //task
+ static const TString fgkTrackerTaskName; //name of tracker task
+ static const TString fgkPIDTaskName; //name of PID task
+
+ static const TString fgkCalibrationFolderName; //name of calibration folder
+ static const TString fgkAligmentFolderName; //name of alignment folder
+ static const TString fgkQAFolderName; //name of QA folder
+
+ static const TString fgkFieldFolderName; //name of magn.field folder
+ static const TString fgkGeneratorsFolderName; //name of generator folder
+ static const TString fgkVirtualMCFolderName; //name of virtual MC folder
- TFolder *fTopFolder;
- AliTasks *fTasks;
+ AliConfig(const char * name, const char * title );
+ AliConfig(const AliConfig&);
+ AliConfig& operator=(const AliConfig&);
- static AliConfig* fInstance;
-
- ClassDef(AliConfig,1)
+ void AddInFolder (const char * dir, TObject *obj);
+ Int_t AddSubTask(const char *taskname, const char* name, const char* title);
+ Int_t AddSubFolder(TFolder* topfolder, const char* infoler, //helper method
+ const char* newfoldname, const char* newfoldtitle);
+ TObject* FindInFolder (const char *dir, const char *name);
+
+ // folders
+ TFolder* fTopFolder; //pointer to top folder
+ TFolder* fTaskFolder; //pointer to task folder
+ TFolder* fConstFolder; //pointer to constants folder
+ static const TString fgkPDGFolderName; //name of PDG folder
+ static const TString fgkGeneratorFolderName; //name of generator name
+ static const TString fgkMCFolderName; //name of MC folder
+ static const TString fgkModuleFolderName; //name of module folder
+
+ TString *fDetectorTask;//!array with names for detector tasks
+ TString *fDetectorFolder;//!array with names for detector folders (where detector is going to be put)
+
+ static AliConfig* fgInstance; //pointer to the AliConfig instance
+
+
+ ClassDef(AliConfig,2) //Configuration class for AliRun
}; // end class AliConfig
#endif