]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TTherminator/TTherminator.cxx
Double check if SM is running added. Some redundant output removed from SM
[u/mrichter/AliRoot.git] / TTherminator / TTherminator.cxx
index 4bb17d678d33c4fd90a179307022a10fcc423804..d034ddfa4fe1326f4c8bef82987f3b4368d78985 100644 (file)
@@ -56,14 +56,32 @@ TTherminator::TTherminator():
   fPartDB = new ParticleDB();
 }
 TTherminator::TTherminator(const TTherminator & therm) :
-  TGenerator(therm),
+  TGenerator(therm), 
   fCalka(0),
   fEvent(0),
   fPartDB(0)
 {
   // Copy constructor
+  //  fPartDB = new ParticleDB();
+  if (fCalka) delete fCalka;
+  fCalka = new Integrator(*therm.fCalka);
+  if (fEvent) delete fEvent;
+  fEvent = new Event(*therm.fEvent);
+  if (fPartDB) delete fPartDB;
   fPartDB = new ParticleDB();
 }
+TTherminator& TTherminator::operator=(const TTherminator & therm)
+{
+  if (this != &therm) {
+    fCalka = therm.fCalka;
+    fEvent = therm.fEvent;
+    delete fPartDB;
+    fPartDB = new ParticleDB();
+  }
+
+  return *this;
+}
+
 TTherminator::~TTherminator()
 {
   // Destructor
@@ -204,6 +222,8 @@ void        TTherminator::Initialize(){
        }
       in.close();
     }
+
+  delete tParser;
 }
 
 void        TTherminator::GenerateEvent()