]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
SetGenerator does not replace an existing generator, ResetGenerator does
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Mar 2000 13:42:26 +0000 (13:42 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Mar 2000 13:42:26 +0000 (13:42 +0000)
STEER/AliLego.cxx
STEER/AliRun.cxx
STEER/AliRun.h

index 6fb29caab5feae8e15387646f96b16425895ce08..f2879ed9bb28897968164abe694b3f449ba05852 100644 (file)
 
 /*
 $Log$
+Revision 1.10  2000/02/23 16:25:22  fca
+AliVMC and AliGeant3 classes introduced
+ReadEuclid moved from AliRun to AliModule
+
 Revision 1.9  1999/12/03 10:54:01  fca
 Fix lego summary
 
@@ -85,7 +89,7 @@ AliLego::AliLego(const char *title, Int_t ntheta, Float_t themin, Float_t themax
    fGener = new AliLegoGenerator(ntheta, themin, themax,
                       nphi, phimin, phimax, rmin, rmax, zmax);
    
-   gAlice->SetGenerator(fGener);
+   gAlice->ResetGenerator(fGener);
 
    Float_t etamin = -TMath::Log(TMath::Tan(TMath::Min((Double_t)themax*kDegrad/2,TMath::Pi()/2-1.e-10)));
    Float_t etamax = -TMath::Log(TMath::Tan(TMath::Max((Double_t)themin*kDegrad/2,              1.e-10)));
index 8f4efd34b2ca3e318a0d9b91b89dc4ba01bd361c..9893e1eb8c30d96616be77b825cfca98db889c8d 100644 (file)
 
 /*
 $Log$
+Revision 1.25  2000/02/23 16:25:22  fca
+AliVMC and AliGeant3 classes introduced
+ReadEuclid moved from AliRun to AliModule
+
 Revision 1.24  2000/01/19 17:17:20  fca
 Introducing a list of lists of hits -- more hits allowed for detector now
 
@@ -905,12 +909,21 @@ void AliRun::MediaTable()
 
 //____________________________________________________________________________
 void AliRun::SetGenerator(AliGenerator *generator)
+{
+  //
+  // Load the event generator
+  //
+  if(!fGenerator) fGenerator = generator;
+}
+
+//____________________________________________________________________________
+void AliRun::ResetGenerator(AliGenerator *generator)
 {
   //
   // Load the event generator
   //
   if(fGenerator)
-    Warning("SetGenerator","Replacing generator %s with %s\n",
+    Warning("ResetGenerator","Replacing generator %s with %s\n",
            fGenerator->GetName(),generator->GetName());
   fGenerator = generator;
 }
index a678e9c0c03c4bfb98fe085628ce34c2d8cf028a..ea9382b738959af954609847b3c68440cd1ae42a 100644 (file)
@@ -129,6 +129,7 @@ public:
    virtual  Int_t   DetFromMate(Int_t i) { return (*fImedia)[i];}
    virtual  AliGenerator* Generator() {return fGenerator;}
    virtual  void SetGenerator(AliGenerator *generator);
+   virtual  void ResetGenerator(AliGenerator *generator);
    virtual  void EnergySummary();
    virtual  const TDatabasePDG* PDGDB() const {return fPDGDB;}