From b16a1b1e7524e3d52699b8ce0ab3da35809d1e55 Mon Sep 17 00:00:00 2001 From: alibrary Date: Tue, 22 Oct 2002 15:02:47 +0000 Subject: [PATCH] Introducing Riostream.h --- STEER/AliConfig.cxx | 88 ++++++++++++++++++++++++++++++--------- STEER/AliConfig.h | 38 ++++++++--------- STEER/AliDetector.cxx | 5 ++- STEER/AliDigitizer.cxx | 5 ++- STEER/AliESD.cxx | 2 +- STEER/AliGausCorr.cxx | 2 +- STEER/AliRun.cxx | 7 +++- STEER/AliRunDigitizer.cxx | 5 ++- STEER/AliStack.cxx | 5 ++- STEER/AliStream.cxx | 5 ++- STEER/AliTrackMap.cxx | 5 ++- STEER/AliTrackMapper.cxx | 5 ++- STRUCT/AliPIPEv0.cxx | 5 ++- 13 files changed, 125 insertions(+), 52 deletions(-) diff --git a/STEER/AliConfig.cxx b/STEER/AliConfig.cxx index 66309de0383..2064e8a9ac6 100644 --- a/STEER/AliConfig.cxx +++ b/STEER/AliConfig.cxx @@ -15,6 +15,9 @@ /* $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 @@ -32,17 +35,22 @@ New files for folders and Stack */ +#include +#include +#include +#include +#include +#include + #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; //____________________________________________________________________________ @@ -51,28 +59,70 @@ AliConfig* AliConfig::Instance () // // 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" ; @@ -81,14 +131,12 @@ AliConfig::AliConfig(const char *name, const char *title) 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); @@ -195,7 +243,7 @@ AliConfig::~AliConfig() } //____________________________________________________________________________ -void AliConfig::AddInFolder (char *dir, TObject *obj) +void AliConfig::AddInFolder (char *dir, TObject *obj) { TFolder *folder = dynamic_cast(fTopFolder->FindObject(dir)); diff --git a/STEER/AliConfig.h b/STEER/AliConfig.h index 994a15c51eb..4b1572b1de1 100644 --- a/STEER/AliConfig.h +++ b/STEER/AliConfig.h @@ -6,6 +6,9 @@ /* $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 * @@ -23,31 +26,23 @@ * */ -#include -#include -#include -#include -#include -#include -#include #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); @@ -61,11 +56,15 @@ public: 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; @@ -77,7 +76,6 @@ private: char** fDetectorFolder ; char** fDetectorTask ; - static AliConfig* fInstance; ClassDef(AliConfig,1) //Configuration class for AliRun diff --git a/STEER/AliDetector.cxx b/STEER/AliDetector.cxx index 0066c305a2d..0ed3ddcf89c 100644 --- a/STEER/AliDetector.cxx +++ b/STEER/AliDetector.cxx @@ -15,6 +15,9 @@ /* $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 @@ -84,7 +87,7 @@ Introduction of the Copyright and cvs Log /////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include diff --git a/STEER/AliDigitizer.cxx b/STEER/AliDigitizer.cxx index 196a79aed8c..b5fdd2932df 100644 --- a/STEER/AliDigitizer.cxx +++ b/STEER/AliDigitizer.cxx @@ -23,6 +23,9 @@ /* $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 @@ -41,7 +44,7 @@ ABC for detector digits merging/digitization */ // system includes -#include +#include // ROOT includes diff --git a/STEER/AliESD.cxx b/STEER/AliESD.cxx index 658cc9f29b0..9be1bceb66f 100644 --- a/STEER/AliESD.cxx +++ b/STEER/AliESD.cxx @@ -22,7 +22,7 @@ $Log: // // /////////////////////////////////////////////////////////////////////////////// -#include "iostream.h" +#include "Riostream.h" #include "AliESD.h" diff --git a/STEER/AliGausCorr.cxx b/STEER/AliGausCorr.cxx index 15f8f2663e7..7cd2c06e87a 100644 --- a/STEER/AliGausCorr.cxx +++ b/STEER/AliGausCorr.cxx @@ -21,7 +21,7 @@ // Rep. Prog. Phys. 43 (1980) 1145-1189. // M.Masera 15.03.2001 9:30 - modified on 26.02.2002 17:40 //////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include diff --git a/STEER/AliRun.cxx b/STEER/AliRun.cxx index bf044a31a3b..6d495aa69fa 100644 --- a/STEER/AliRun.cxx +++ b/STEER/AliRun.cxx @@ -15,6 +15,9 @@ /* $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) @@ -259,7 +262,7 @@ Introduction of the Copyright and cvs Log #include #include #include -#include +#include #include #include @@ -2192,7 +2195,7 @@ TFile* AliRun::InitTreeFile(Option_t *option, TString fileName) } return ptr; } - + return 0; } //___________________________________________________________________________ diff --git a/STEER/AliRunDigitizer.cxx b/STEER/AliRunDigitizer.cxx index 6d2638167f2..2b28e3406be 100644 --- a/STEER/AliRunDigitizer.cxx +++ b/STEER/AliRunDigitizer.cxx @@ -15,6 +15,9 @@ /* $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 @@ -146,7 +149,7 @@ Manager class for merging/digitization // system includes -#include +#include // ROOT includes diff --git a/STEER/AliStack.cxx b/STEER/AliStack.cxx index e9f12d0b3cb..85b13030548 100644 --- a/STEER/AliStack.cxx +++ b/STEER/AliStack.cxx @@ -15,6 +15,9 @@ /* $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 @@ -86,7 +89,7 @@ New files for folders and Stack // // /////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include diff --git a/STEER/AliStream.cxx b/STEER/AliStream.cxx index 57a27a8cd50..d7ca520a4c1 100644 --- a/STEER/AliStream.cxx +++ b/STEER/AliStream.cxx @@ -15,6 +15,9 @@ /* $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 @@ -49,7 +52,7 @@ Class to manage input filenames, used by AliRunDigitizer // //////////////////////////////////////////////////////////////////////// -#include +#include #include "TTree.h" #include "TROOT.h" diff --git a/STEER/AliTrackMap.cxx b/STEER/AliTrackMap.cxx index 44a8d3956cd..147579fba32 100644 --- a/STEER/AliTrackMap.cxx +++ b/STEER/AliTrackMap.cxx @@ -15,6 +15,9 @@ /* $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 @@ -40,7 +43,7 @@ Classes to create and store tracks maps - correcpondence between track label and // //////////////////////////////////////////////////////////////////////// -#include +#include #include "TTree.h" #include "TROOT.h" diff --git a/STEER/AliTrackMapper.cxx b/STEER/AliTrackMapper.cxx index 025bae2494d..1ab5fa62c13 100644 --- a/STEER/AliTrackMapper.cxx +++ b/STEER/AliTrackMapper.cxx @@ -15,6 +15,9 @@ /* $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 @@ -36,7 +39,7 @@ Classes to create and store tracks maps - correcpondence between track label and // //////////////////////////////////////////////////////////////////////// -#include +#include #include "TTree.h" #include "TROOT.h" diff --git a/STRUCT/AliPIPEv0.cxx b/STRUCT/AliPIPEv0.cxx index 0230cb1f3bc..078b0516902 100644 --- a/STRUCT/AliPIPEv0.cxx +++ b/STRUCT/AliPIPEv0.cxx @@ -15,6 +15,9 @@ /* $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 @@ -95,7 +98,7 @@ Introduction of the Copyright and cvs Log #include "AliMC.h" #include "TSystem.h" -#include +#include ClassImp(AliPIPEv0) -- 2.39.3