]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Updates for root version 4.00/07
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Jul 2004 11:49:16 +0000 (11:49 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Jul 2004 11:49:16 +0000 (11:49 +0000)
- Event loop added to ProcessRun()

TFluka/TFlukaGeo.cxx
TFluka/TFlukaGeo.h

index b0f7d1330b8f46ec09879667405474423317c1c7..26f286ce624c11afb509bcc6129f8205c3975d2f 100644 (file)
@@ -247,9 +247,15 @@ void   TFluka::ProcessRun(Int_t nevent) {
     cout << "\t* GLOBAL.fdrtr = " << (GLOBAL.lfdrtr?'T':'F') << endl;
     cout << "\t* Calling flukam again..." << endl;
   }
-  fApplication->InitGeometry();
-  fApplication->BeginEvent();
-  ProcessEvent();
+
+  Int_t todo = TMath::Abs(nevent);
+
+  for (Int_t ev = 0; ev < todo; ev++) {
+      fApplication->InitGeometry();
+      fApplication->BeginEvent();
+      ProcessEvent();
+  }
+
   fApplication->FinishEvent();
   if (fVerbosityLevel >=3)
     cout << "<== TFluka::ProcessRun(" << nevent << ") called." 
@@ -573,8 +579,7 @@ Int_t TFluka::PDGFromId(Int_t id) const
 //
 // set methods
 //
-
-void TFluka::SetProcess(const char* flagName, Int_t flagValue, Int_t imat)
+  void   TFluka::SetProcess(const char* flagName, Int_t flagValue, Int_t imat)
 {
 //  Set process user flag for material imat
 //
@@ -585,7 +590,12 @@ void TFluka::SetProcess(const char* flagName, Int_t flagValue, Int_t imat)
 }
 
 //______________________________________________________________________________ 
-void TFluka::SetProcess(const char* flagName, Int_t flagValue)
+
+#if ROOT_VERSION_CODE >= 262151
+  Bool_t TFluka::SetProcess(const char* flagName, Int_t flagValue)
+#else
+  void   TFluka::SetProcess(const char* flagName, Int_t flagValue)
+#endif
 {
 //  Set process user flag 
 //
@@ -596,7 +606,11 @@ void TFluka::SetProcess(const char* flagName, Int_t flagValue)
       if (strcmp(&fProcessFlag[i][0],flagName) == 0) {
         fProcessValue[fNbOfProc] = flagValue;
        fProcessMaterial[fNbOfProc] = -1;
-       return;
+#if ROOT_VERSION_CODE >= 262151
+       return kFALSE;
+#else 
+       return
+#endif
       }
     }
     strcpy(&fProcessFlag[fNbOfProc][0],flagName);
@@ -606,10 +620,13 @@ void TFluka::SetProcess(const char* flagName, Int_t flagValue)
   }
   else
     cout << "Nb of SetProcess calls exceeds 100 - ignored" << endl;
+#if ROOT_VERSION_CODE >= 262151
+  return kTRUE;
+#endif
 }
 
 //______________________________________________________________________________ 
-void TFluka::SetCut(const char* cutName, Double_t cutValue, Int_t imed)
+  void     TFluka::SetCut(const char* cutName, Double_t cutValue, Int_t imed)
 {
 // Set user cut value for material imed
 //
@@ -620,7 +637,11 @@ void TFluka::SetCut(const char* cutName, Double_t cutValue, Int_t imed)
 }
 
 //______________________________________________________________________________ 
-void TFluka::SetCut(const char* cutName, Double_t cutValue)
+#if ROOT_VERSION_CODE >= 262151
+  Bool_t   TFluka::SetCut(const char* cutName, Double_t cutValue)
+#else
+  void     TFluka::SetCut(const char* cutName, Double_t cutValue)
+#endif
 {
 // Set user cut value 
 //
@@ -629,7 +650,12 @@ void TFluka::SetCut(const char* cutName, Double_t cutValue)
     for (i=0; i<fNbOfCut; i++) {
       if (strcmp(&fCutFlag[i][0],cutName) == 0) {
         fCutValue[fNbOfCut] = cutValue;
+#if ROOT_VERSION_CODE >= 262151
+       return kFALSE;
+#else
        return;
+       
+#endif
       }
     }
     strcpy(&fCutFlag[fNbOfCut][0],cutName);
@@ -638,6 +664,9 @@ void TFluka::SetCut(const char* cutName, Double_t cutValue)
   }
   else
     cout << "Nb of SetCut calls exceeds 100 - ignored" << endl;
+#if ROOT_VERSION_CODE >= 262151
+  return kTRUE;
+#endif
 }
 
 //______________________________________________________________________________ 
index 915fd0947ea512ad31c91731185dc677a17151b2..67fd59afabcf3ee88ce5b642829029c6d00e9dbe 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "TVirtualMC.h"
 #include "TMCProcess.h"
+#include "RVersion.h"
 
 //Forward declaration
 class TFlukaMCGeometry;
@@ -106,7 +107,7 @@ class TFluka : public TVirtualMC {
     {printf("WARNING: Gdraw not yet implemented !\n");}
   
   // Euclid
-  virtual void  WriteEuclid(const char*, const char*, Int_t, Int_t);
+  virtual void WriteEuclid(const char*, const char*, Int_t, Int_t);
   
   // get methods
   virtual Int_t VolId(const Text_t* volName) const;
@@ -119,9 +120,20 @@ class TFluka : public TVirtualMC {
   //
   
   // set methods
-  virtual void     SetProcess(const char* flagName, Int_t flagValue);
-    virtual void     SetProcess(const char* flagName, Int_t flagValue, Int_t imed);
+#if ROOT_VERSION_CODE >= 262151
+  virtual Bool_t SetProcess(const char* flagName, Int_t flagValue);
+#else
+  virtual void   SetProcess(const char* flagName, Int_t flagValue);
+#endif
+
+  virtual void   SetProcess(const char* flagName, Int_t flagValue, Int_t imed);
+
+#if ROOT_VERSION_CODE >= 262151
+  virtual Bool_t
+      SetCut(const char* cutName, Double_t cutValue);
+#else
   virtual void     SetCut(const char* cutName, Double_t cutValue);
+#endif
   virtual void     SetCut(const char* cutName, Double_t cutValue, Int_t imed);
   virtual Double_t Xsec(char*, Double_t, Int_t, Int_t);
   
@@ -235,9 +247,21 @@ class TFluka : public TVirtualMC {
   virtual void Gspart(Int_t, const char*, Int_t, Double_t, Double_t, Double_t)
     {printf("WARNING: Gspart not yet implemented !\n");}
   
-    // Dummy methods 
-    virtual void DefineParticle(int, const char*, TMCParticleType, double, double, double){;}
-    virtual void DefineIon(const char*, int, int, int, double, double){;}
+    // Dummy methods
+  
+
+#if ROOT_VERSION_CODE >= 262151
+  virtual Bool_t DefineParticle(int, const char*, TMCParticleType, double, double, double){return kTRUE;}
+#else
+  virtual void   DefineParticle(int, const char*, TMCParticleType, double, double, double){;}
+#endif
+
+#if ROOT_VERSION_CODE >= 262151
+    virtual Bool_t DefineIon(const char*, int, int, int, double, double){return kTRUE;}
+#else
+    virtual void   DefineIon(const char*, int, int, int, double, double){;}
+#endif
+
     virtual TString  ParticleName(int) const {return "";}
     virtual Double_t ParticleMass(int) const {return 0.;}
     virtual Double_t ParticleCharge(int) const {return 0.;}
@@ -258,7 +282,8 @@ class TFluka : public TVirtualMC {
 #else
   virtual void   ProcessRun(Int_t nevent);
 #endif
-
+  virtual void StopRun() {;}
+  
   //
   //New Getter and Setters
   // ------------------------------------------------