/*
$Log$
+Revision 1.5 2002/10/14 14:57:32 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.3.8.1 2002/06/10 14:43:06 hristov
Merged with v3-08-02
*/
+#include <Riostream.h>
+#include <TDatabasePDG.h>
+#include <TFolder.h>
+#include <TInterpreter.h>
+#include <TROOT.h>
+#include <TSystem.h>
+
#include "AliConfig.h"
#include "AliDetector.h"
+#include "AliGenerator.h"
#include "TObjString.h"
#include "TString.h"
#include "TTask.h"
-#include "AliGenerator.h"
-#include "AliMC.h"
ClassImp(AliConfig)
-
AliConfig* AliConfig::fInstance = 0;
//____________________________________________________________________________
//
// Instance method for singleton class
//
- if(fInstance == 0) {
- fInstance = new AliConfig ("Folders","Alice data exchange");
- }
- return fInstance;
+ if(!fInstance) fInstance = new AliConfig ("Folders","Alice data exchange");
+
+ return fInstance;
+}
+
+//____________________________________________________________________________
+AliConfig::AliConfig(): TNamed("","")
+{
+ //
+ // Default constructor, mainly to keep coding conventions
+ //
+ fTopFolder=0;
+ fTasks=0;
+
+ fPDGFolder=0;
+ fGeneratorFolder=0;
+ fMCFolder=0;
+ fModuleFolder=0;
+ fDetectorFolder=0;
+ fDetectorTask=0;
+ fInstance=0;
+
+ Fatal("ctor",
+ "Constructor should not be called for a singleton\n");
}
+//____________________________________________________________________________
+AliConfig::AliConfig(const AliConfig&): TNamed("","")
+{
+ //
+ // Copy constructor, mainly to keep coding conventions
+ //
+ fTopFolder=0;
+ fTasks=0;
+
+ fPDGFolder=0;
+ fGeneratorFolder=0;
+ fMCFolder=0;
+ fModuleFolder=0;
+ fDetectorFolder=0;
+ fDetectorTask=0;
+ fInstance=0;
+
+ Fatal("copy ctor",
+ "Copy constructor should not be called for a singleton\n");
+}
-AliConfig::AliConfig(const char *name, const char *title)
+//____________________________________________________________________________
+AliConfig::AliConfig(const char *name, const char *title):
+ TNamed(name,title),
+ fTopFolder(gROOT->GetRootFolder ()->AddFolder (name,title)),
+ fTasks(0),
+ fPDGFolder("Constants/DatabasePDG"),
+ fGeneratorFolder("RunMC/Configuration/Generators"),
+ fMCFolder("RunMC/Configuration/VirtualMC"),
+ fModuleFolder("Run/Configuration/Modules"),
+ fDetectorFolder(new char*[kFolders]),
+ fDetectorTask(new char*[kTasks])
{
//
// Constructor
//
- //
fInstance=this;
- SetName(name) ;
- SetTitle(title) ;
-
- fPDGFolder = "Constants/DatabasePDG" ;
- fGeneratorFolder = "RunMC/Configuration/Generators" ;
- fMCFolder = "RunMC/Configuration/VirtualMC" ;
- fModuleFolder = "Run/Configuration/Modules" ;
- fDetectorFolder = new char*[8] ;
+
fDetectorFolder[0] = "Run/Conditions/Calibration" ;
fDetectorFolder[1] = "Run/Event/Data" ;
fDetectorFolder[2] = "Run/Event/RecData" ;
fDetectorFolder[5] = "Run/Conditions/QA" ;
fDetectorFolder[6] = "RunMC/Event/Data/TrackReferences" ;
fDetectorFolder[7] = 0 ;
- fDetectorTask = new char*[5] ;
fDetectorTask[0] = "Tasks/QA" ;
fDetectorTask[1] = "Tasks/SDigitizer" ;
fDetectorTask[2] = "Tasks/Digitizer" ;
fDetectorTask[3] = "Tasks/Reconstructioner" ;
fDetectorTask[4] = 0 ;
- fTopFolder = gROOT->GetRootFolder ()->AddFolder (name,title);
fTopFolder->SetOwner() ;
gROOT->GetListOfBrowsables ()->Add (fTopFolder, name);
}
//____________________________________________________________________________
-void AliConfig::AddInFolder (char *dir, TObject *obj)
+void AliConfig::AddInFolder (char *dir, TObject *obj)
{
TFolder *folder =
dynamic_cast<TFolder *>(fTopFolder->FindObject(dir));
/* $Id$ */
/*
* $Log$
+ * Revision 1.5 2002/10/14 14:57:32 hristov
+ * Merging the VirtualMC branch to the main development branch (HEAD)
+ *
* Revision 1.4.8.1 2002/06/10 14:43:06 hristov
* Merged with v3-08-02
*
*
*/
-#include <iostream.h>
-#include <TFolder.h>
-#include <TList.h>
-#include <TInterpreter.h>
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TDatabasePDG.h>
#include "AliMC.h"
-class TString ;
+
+class TDatabasePDG;
+class TFolder;
+class TString;
+
+class AliConfig;
+class AliDetector;
class AliGenerator;
class AliModule;
-class AliDetector;
-class AliConfig;
class AliTasks;
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);
static AliConfig* Instance();
private:
- AliConfig(const char * name, const char * title );
+
+ enum {kFolders=8, kTasks=5};
+ AliConfig(const char * name, const char * title);
+ AliConfig(const AliConfig&);
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);
+ TObject* FindInFolder (char *dir, const char *name);
+ AliConfig& operator = (const AliConfig&) {return *this;}
TFolder *fTopFolder;
AliTasks *fTasks;
char** fDetectorFolder ;
char** fDetectorTask ;
-
static AliConfig* fInstance;
ClassDef(AliConfig,1) //Configuration class for AliRun
/*
$Log$
+Revision 1.20 2002/10/14 14:57:32 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.16.8.3 2002/10/14 09:45:57 hristov
Updating VirtualMC to v3-09-02
///////////////////////////////////////////////////////////////////////////////
#include <assert.h>
-#include <iostream.h>
+#include <Riostream.h>
#include <TTree.h>
#include <TBrowser.h>
/*
$Log$
+Revision 1.5 2002/10/14 14:57:32 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.3.6.1 2002/07/24 10:08:13 alibrary
Updating VirtualMC
*/
// system includes
-#include <iostream.h>
+#include <Riostream.h>
// ROOT includes
// //
///////////////////////////////////////////////////////////////////////////////
-#include "iostream.h"
+#include "Riostream.h"
#include "AliESD.h"
// Rep. Prog. Phys. 43 (1980) 1145-1189.
// M.Masera 15.03.2001 9:30 - modified on 26.02.2002 17:40
////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include <TArrayD.h>
#include <TMatrixD.h>
#include <TRandom.h>
/*
$Log$
+Revision 1.89 2002/10/17 16:26:39 hristov
+Definition of additional particles moved to VMC (I.Hrivnacova)
+
Revision 1.88 2002/10/14 14:57:32 hristov
Merging the VirtualMC branch to the main development branch (HEAD)
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <iostream.h>
+#include <Riostream.h>
#include <TFile.h>
#include <TRandom.h>
}
return ptr;
}
-
+ return 0;
}
//___________________________________________________________________________
/*
$Log$
+Revision 1.20 2002/10/14 14:57:32 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.13.6.2 2002/07/24 10:08:13 alibrary
Updating VirtualMC
// system includes
-#include <iostream.h>
+#include <Riostream.h>
// ROOT includes
/*
$Log$
+Revision 1.23 2002/10/14 14:57:32 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.19.4.2 2002/08/28 15:06:52 alibrary
Updating to v3-09-01
// //
///////////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include <TObjArray.h>
#include <TParticle.h>
/*
$Log$
+Revision 1.7 2002/10/14 14:57:33 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.4.6.2 2002/07/24 10:08:13 alibrary
Updating VirtualMC
//
////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include "TTree.h"
#include "TROOT.h"
/*
$Log$
+Revision 1.2 2002/10/14 14:57:33 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.1.2.1 2002/10/14 09:45:57 hristov
Updating VirtualMC to v3-09-02
//
////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include "TTree.h"
#include "TROOT.h"
/*
$Log$
+Revision 1.3 2002/10/14 14:57:33 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.2.2.1 2002/10/14 09:45:57 hristov
Updating VirtualMC to v3-09-02
//
////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
+#include <Riostream.h>
#include "TTree.h"
#include "TROOT.h"
/*
$Log$
+Revision 1.23 2002/10/14 14:57:39 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.19.4.2 2002/10/11 08:04:28 hristov
Updating VirtualMC to v3-09-02
#include "AliMC.h"
#include "TSystem.h"
-#include <iostream.h>
+#include <Riostream.h>
ClassImp(AliPIPEv0)