ROOT logo
#ifndef ALICONFIG_H
#define ALICONFIG_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

//
// 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 AliConfig : public TNamed {
  
public:
  
  virtual ~ AliConfig (); 

  void       Add(TDatabasePDG *pdg);
  
  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);

  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
  
  static     AliConfig* Instance();
  
  TFolder*              BuildEventFolder(const char* name,const char* tilte);
  
  TFolder*              GetTopFolder(){return fTopFolder;}
  TFolder*              GetConstFolder(){return fConstFolder;}

  static const TString& GetModulesFolderName(){return fgkModuleFolderName;}
  static const TString& GetDefaultEventFolderName()
    {return fgkDefaultEventFolderName;}
    
  const TString&        GetDataFolderName() const;//returns name of data folder

private:  
  AliConfig(const AliConfig&); // Not implemented
  AliConfig& operator=(const AliConfig&); // Not implemented
  AliConfig(); // Not implemented
  AliConfig(const char * name, const char * title );
  
  static const TString  fgkTopFolderName; //name of top AliRoot folder
 
  static const TString  fgkDefaultEventFolderName; //name of event 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  fgkCalibrationFolderName;  //name of calibration folder
  static const TString  fgkAligmentFolderName;     //name of alignment 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

  void          AddInFolder (const char * dir, TObject *obj);
  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*              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              *fDetectorFolder;//!array with names for detector folders (where detector is going to be put)
  
  static AliConfig*     fgInstance; //pointer to the AliConfig instance
  
  
  ClassDef(AliConfig,3) //Configuration class for AliRun
};				// end class AliConfig

#endif
 AliConfig.h:1
 AliConfig.h:2
 AliConfig.h:3
 AliConfig.h:4
 AliConfig.h:5
 AliConfig.h:6
 AliConfig.h:7
 AliConfig.h:8
 AliConfig.h:9
 AliConfig.h:10
 AliConfig.h:11
 AliConfig.h:12
 AliConfig.h:13
 AliConfig.h:14
 AliConfig.h:15
 AliConfig.h:16
 AliConfig.h:17
 AliConfig.h:18
 AliConfig.h:19
 AliConfig.h:20
 AliConfig.h:21
 AliConfig.h:22
 AliConfig.h:23
 AliConfig.h:24
 AliConfig.h:25
 AliConfig.h:26
 AliConfig.h:27
 AliConfig.h:28
 AliConfig.h:29
 AliConfig.h:30
 AliConfig.h:31
 AliConfig.h:32
 AliConfig.h:33
 AliConfig.h:34
 AliConfig.h:35
 AliConfig.h:36
 AliConfig.h:37
 AliConfig.h:38
 AliConfig.h:39
 AliConfig.h:40
 AliConfig.h:41
 AliConfig.h:42
 AliConfig.h:43
 AliConfig.h:44
 AliConfig.h:45
 AliConfig.h:46
 AliConfig.h:47
 AliConfig.h:48
 AliConfig.h:49
 AliConfig.h:50
 AliConfig.h:51
 AliConfig.h:52
 AliConfig.h:53
 AliConfig.h:54
 AliConfig.h:55
 AliConfig.h:56
 AliConfig.h:57
 AliConfig.h:58
 AliConfig.h:59
 AliConfig.h:60
 AliConfig.h:61
 AliConfig.h:62
 AliConfig.h:63
 AliConfig.h:64
 AliConfig.h:65
 AliConfig.h:66
 AliConfig.h:67
 AliConfig.h:68
 AliConfig.h:69
 AliConfig.h:70
 AliConfig.h:71
 AliConfig.h:72
 AliConfig.h:73
 AliConfig.h:74
 AliConfig.h:75
 AliConfig.h:76
 AliConfig.h:77
 AliConfig.h:78
 AliConfig.h:79
 AliConfig.h:80
 AliConfig.h:81
 AliConfig.h:82
 AliConfig.h:83
 AliConfig.h:84
 AliConfig.h:85
 AliConfig.h:86
 AliConfig.h:87
 AliConfig.h:88
 AliConfig.h:89
 AliConfig.h:90
 AliConfig.h:91
 AliConfig.h:92
 AliConfig.h:93
 AliConfig.h:94
 AliConfig.h:95
 AliConfig.h:96
 AliConfig.h:97
 AliConfig.h:98
 AliConfig.h:99
 AliConfig.h:100
 AliConfig.h:101
 AliConfig.h:102
 AliConfig.h:103
 AliConfig.h:104
 AliConfig.h:105
 AliConfig.h:106
 AliConfig.h:107
 AliConfig.h:108