dynamic cast replaced by static cast in order to avoid undefined reference to typinfo...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jul 2008 16:08:39 +0000 (16:08 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jul 2008 16:08:39 +0000 (16:08 +0000)
EVGEN/AliGenMC.cxx
EVGEN/AliGenMC.h
STEER/AliSimulation.cxx

index 08b58ee..61166d5 100644 (file)
@@ -62,7 +62,8 @@ AliGenMC::AliGenMC()
      fGeometryAcceptance(0),
      fPdgCodeParticleforAcceptanceCut(0),
      fNumberOfAcceptedParticles(0),
-     fNprimaries(0)
+     fNprimaries(0),
+     fEnergyCMS(0)
 {
 // Default Constructor
 }
@@ -97,7 +98,8 @@ AliGenMC::AliGenMC(Int_t npart)
      fGeometryAcceptance(0),
      fPdgCodeParticleforAcceptanceCut(0),
      fNumberOfAcceptedParticles(0),
-     fNprimaries(0)
+     fNprimaries(0),
+     fEnergyCMS(0)
 {
 //  Constructor
 // 
index da4af92..ae136b9 100644 (file)
@@ -60,11 +60,11 @@ class AliGenMC : public AliGenerator
     virtual void   SetCrossingAngle(Float_t phiX, Float_t phiY) {fXingAngleX = phiX; fXingAngleY = phiY;}
     virtual void Boost();
     virtual void AddHeader(AliGenEventHeader* header);
-    virtual void   GetProjectile(TString& tar, Int_t& a, Int_t& z)       const
-       {tar = fProjectile; a = fAProjectile; z = fZProjectile;}    
-    virtual void   GetTarget(TString& tar, Int_t& a, Int_t& z)           const
-       {tar = fTarget; a = fATarget; z = fZTarget;}    
-    virtual Float_t GetEnergyCMS() const {return fEnergyCMS;}
+    virtual void   GetProjectile(TString& tar, Int_t& a, Int_t& z) const
+    {tar = fProjectile; a = fAProjectile; z = fZProjectile;}    
+    virtual void   GetTarget(TString& tar, Int_t& a, Int_t& z) const
+    {tar = fTarget; a = fATarget; z = fZTarget;}    
+    virtual Float_t GetEnergyCMS() const { return fEnergyCMS; }
 
  protected:
     // check if particle is selected as parent particle
index 27a4f27..7d02ecb 100644 (file)
@@ -1886,7 +1886,7 @@ void AliSimulation::WriteGRPEntry()
   grpMap->Add(new TObjString("fAliceStartTime"),new TObjString("0"));
   grpMap->Add(new TObjString("fAliceStopTime"),new TObjString("9999"));
 
-  AliGenMC *gen = dynamic_cast<AliGenMC*>(gAlice->Generator());
+  const AliGenMC *gen = static_cast<const AliGenMC*>(gAlice->Generator());
   if (gen) {
     grpMap->Add(new TObjString("fAliceBeamEnergy"),new TObjString(Form("%f",gen->GetEnergyCMS())));
     TString projectile;