Code needed for C++ Interface (A. Bogdanov)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Sep 2006 08:59:02 +0000 (08:59 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Sep 2006 08:59:02 +0000 (08:59 +0000)
ISAJET/AliIsajetRndm.cxx [new file with mode: 0644]
ISAJET/AliIsajetRndm.h [new file with mode: 0644]
ISAJET/isajetLinkDef.h [new file with mode: 0644]
ISAJET/libisajet.pkg [new file with mode: 0644]
ISAJET/main.c [new file with mode: 0644]

diff --git a/ISAJET/AliIsajetRndm.cxx b/ISAJET/AliIsajetRndm.cxx
new file mode 100644 (file)
index 0000000..275abb9
--- /dev/null
@@ -0,0 +1,72 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-----------------------------------------------------------------------------
+//   Class: AliHerwigRndm
+//   Responsibilities: Interface to Root random number generator 
+//                     from Fortran (re-implements FINCTION RLU_HERWIG 
+//                     from HERWIG)
+//   Note: Since AliGenHerwig belongs to another module (THerwig) one cannot
+//         pass the ponter to the generator via static variable
+//   Collaborators: AliGenHerwig class
+//   Example:
+//
+//   root> AliGenHerwig *gener = new AliGenHerwig(-1);
+//   root> AliHerwigRndm::SetHerwigRandom(new TRandom3());
+//   root> AliHerwigRndm::GetHerwigRandom()->SetSeed(0);
+//   root> cout<<"Seed "<< AliHerwigRndm::GetHerwigRandom()->GetSeed() <<endl;
+//-----------------------------------------------------------------------------
+
+#include <TRandom.h>
+
+#include "AliIsajetRndm.h"
+
+TRandom * AliIsajetRndm::fgIsajetRandom=0;
+
+ClassImp(AliIsajetRndm)
+
+//_______________________________________________________________________
+void AliIsajetRndm::SetIsajetRandom(TRandom *ran) {
+  //
+  // Sets the pointer to an existing random numbers generator
+  //
+  if(ran) fgIsajetRandom=ran;
+  else fgIsajetRandom=gRandom;
+}
+
+//_______________________________________________________________________
+TRandom * AliIsajetRndm::GetIsajetRandom() {
+  //
+  // Retrieves the pointer to the random numbers generator
+  //
+  return fgIsajetRandom;
+}
+
+//_______________________________________________________________________
+# define ranf    ranf_
+
+extern "C" {
+  Double_t ranf() 
+  {
+    // Wrapper to FUNCTION HWR from HERWIG
+    // Uses static method to retrieve the pointer to the (C++) generator
+      Double_t r;
+      do r=AliIsajetRndm::GetIsajetRandom()->Rndm(); 
+      while(0 >= r || r >= 1);
+      return r;
+  }
+}
diff --git a/ISAJET/AliIsajetRndm.h b/ISAJET/AliIsajetRndm.h
new file mode 100644 (file)
index 0000000..5938797
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef ALIISAJETRNDM_H
+#define ALIISAJETRNDM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include <Rtypes.h>
+#include <TError.h>
+
+class TRandom;
+
+class AliIsajetRndm {
+ public:
+  AliIsajetRndm() {
+    // Default constructor. The static data member is initialized
+    // in the implementation file
+  }
+  AliIsajetRndm(const AliIsajetRndm &/*rn*/) {
+    // Copy constructor: no copy allowed for the object
+    ::Fatal("Copy constructor","Not allowed\n");
+  }
+  virtual ~AliIsajetRndm() {
+    // Destructor
+    fgIsajetRandom=0;
+  }
+  AliIsajetRndm & operator=(const AliIsajetRndm &/*rn*/) {
+    // Assignment operator: no assignment allowed
+    ::Fatal("Assignment operator","Not allowed\n");
+    return (*this);
+  }
+  
+  static void SetIsajetRandom(TRandom *ran=0);
+  static TRandom * GetIsajetRandom();
+
+private:
+
+  static TRandom * fgIsajetRandom; //! pointer to the random number generator
+
+  ClassDef(AliIsajetRndm,0)  //Random Number generator wrapper (non persistent)
+};
+
+#endif 
+
diff --git a/ISAJET/isajetLinkDef.h b/ISAJET/isajetLinkDef.h
new file mode 100644 (file)
index 0000000..301738e
--- /dev/null
@@ -0,0 +1,8 @@
+#ifdef __CINT__
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class AliIsajetRndm+;
+#endif
diff --git a/ISAJET/libisajet.pkg b/ISAJET/libisajet.pkg
new file mode 100644 (file)
index 0000000..9d0b591
--- /dev/null
@@ -0,0 +1,334 @@
+SRCS:=AliIsajetRndm.cxx
+
+HDRS= $(SRCS:.cxx=.h) 
+
+DHDR:=isajetLinkDef.h 
+
+CSRCS:= main.c  
+
+FSRCS:= \
+code/alqcd.F \
+code/amass.F \
+code/amgmw.F \
+code/charge.F \
+code/ctxc2i.F \
+code/ctxi2c.F \
+code/ctxin.F \
+code/ctxout.F \
+code/datime.F \
+code/dblpcm.F \
+code/dblvec.F \
+code/dboost.F \
+code/decay.F \
+code/decjet.F \
+code/decps1.F \
+code/decps2.F \
+code/decss3.F \
+code/dectau.F \
+code/decva.F \
+code/dhelas.F \
+code/dincgm.F \
+code/domssm.F \
+code/drllyn.F \
+code/ebeam.F \
+code/eebeg.F \
+code/eemax.F \
+code/elctrn.F \
+code/epf.F \
+code/estruc.F \
+code/evol01.F \
+code/evol02.F \
+code/evol03.F \
+code/evol05.F \
+code/evol06.F \
+code/evol07.F \
+code/evol11.F \
+code/evolms.F \
+code/evolve.F \
+code/fbrbm.F \
+code/flavor.F \
+code/fortop.F \
+code/frgjet.F \
+code/frgmnt.F \
+code/gamma.F \
+code/getpt.F \
+code/gettot.F \
+code/heavyx.F \
+code/hevolv.F \
+code/higgs.F \
+code/idanti.F \
+code/idgen.F \
+code/iframs.F \
+code/inisap.F \
+code/ipartns.F \
+code/ipjset.F \
+code/iprtns.F \
+code/irmov0.F \
+code/isabeg.F \
+code/isabg2.F \
+code/isaend.F \
+code/isaevt.F \
+code/isaini.F \
+code/isajet.F \
+code/isasrt.F \
+code/ispjet.F \
+code/istrad.F \
+code/iswdky.F \
+code/jetgen.F \
+code/kkgf1.F \
+code/kkgf2.F \
+code/kkgf3.F \
+code/label.F \
+code/lboost.F \
+code/logerr.F \
+code/logic.F \
+code/logmgm.F \
+code/logmgy.F \
+code/logmij.F \
+code/logp.F \
+code/logphi.F \
+code/logphw.F \
+code/logpt.F \
+code/logqm.F \
+code/logqt.F \
+code/logthw.F \
+code/logx.F \
+code/logxw.F \
+code/logyth.F \
+code/logyw.F \
+code/lstsq.F \
+code/mbias.F \
+code/mbset.F \
+code/mginit.F \
+code/muljet.F \
+code/nogood.F \
+code/ordecr.F \
+code/order.F \
+code/prtevt.F \
+code/prtlim.F \
+code/ptfun.F \
+code/qcdini.F \
+code/qcdint.F \
+code/qcdinz.F \
+code/qcdjet.F \
+code/qcdt.F \
+code/qcdz.F \
+code/qfunc.F \
+code/ranfgt.F \
+code/ranfmt.F \
+code/ranfst.F \
+code/readin.F \
+code/rejfrg.F \
+code/rejjet.F \
+code/rescal.F \
+code/reset.F \
+code/setcon.F \
+code/setdky.F \
+code/seth.F \
+code/sethss.F \
+code/setkkg.F \
+code/setnxt.F \
+code/settyp.F \
+code/setw.F \
+code/sigdy2.F \
+code/sigdy.F \
+code/sigee.F \
+code/sigfil.F \
+code/siggam.F \
+code/sigh2.F \
+code/sigh3.F \
+code/sigh.F \
+code/sighss.F \
+code/sigint.F \
+code/sigkkg.F \
+code/sigqcd.F \
+code/sigsse.F \
+code/sigssl.F \
+code/sigssy.F \
+code/sigssz.F \
+code/sigtc2.F \
+code/sigtc3.F \
+code/sigtc.F \
+code/sigwh.F \
+code/sigwhs.F \
+code/sigww2.F \
+code/sigww.F \
+code/smszg.F \
+code/spline.F \
+code/ssfel.F \
+code/ssgst.F \
+code/ssgt.F \
+code/struc.F \
+code/strucw.F \
+code/szjj1.F \
+code/szjj2.F \
+code/szjj3.F \
+code/szjj4.F \
+code/szjj5.F \
+code/szjj6.F \
+code/szjj7.F \
+code/timer.F \
+code/twojet.F \
+code/twokin.F \
+code/visaje.F \
+code/whiggs.F \
+code/wpair.F \
+code/wwkin.F \
+code/wwss.F \
+code/wwst.F \
+code/wwtt.F \
+code/wzss.F \
+code/wzst.F \
+code/wzsu.F \
+code/wztu.F \
+code/xwwww.F \
+code/xwwzz.F \
+code/xzzww.F \
+code/xzzzz.F \
+code/ygenj.F \
+code/zjj0.F \
+code/zjj1.F \
+code/zjj2.F \
+code/zjj3.F \
+code/zjj4.F \
+code/zjj5.F \
+code/zjj6.F \
+code/zjj7.F \
+code/zjj.F \
+code/zzall.F \
+code/zzstar.F \
+isasusy/ssalfs.F \
+isasusy/ssb0.F \
+isasusy/ssb1.F \
+isasusy/ssdhll.F \
+isasusy/ssdint.F \
+isasusy/ssdlam.F \
+isasusy/ssf0.F \
+isasusy/ssglbf.F \
+isasusy/ssgwq1.F \
+isasusy/ssgwq2.F \
+isasusy/ssgwt1.F \
+isasusy/ssgwt2.F \
+isasusy/ssgwt3.F \
+isasusy/ssgwt4.F \
+isasusy/ssgwt5.F \
+isasusy/ssgwt6.F \
+isasusy/ssgwt7.F \
+isasusy/ssgwt8.F \
+isasusy/ssgx10.F \
+isasusy/ssgx11.F \
+isasusy/ssgx1.F \
+isasusy/ssgx2.F \
+isasusy/ssgx3.F \
+isasusy/ssgx4.F \
+isasusy/ssgx5.F \
+isasusy/ssgx6.F \
+isasusy/ssgx7.F \
+isasusy/ssgx8.F \
+isasusy/ssgx9.F \
+isasusy/ssgzg1.F \
+isasusy/ssgzg2.F \
+isasusy/ssgzg3.F \
+isasusy/ssgzt.F \
+isasusy/sshcc.F \
+isasusy/sshff1.F \
+isasusy/sshff.F \
+isasusy/sshgl.F \
+isasusy/sshgm1.F \
+isasusy/sshgm.F \
+isasusy/sshhx.F \
+isasusy/sshibf.F \
+isasusy/sshnn.F \
+isasusy/sshsf.F \
+isasusy/sshww1.F \
+isasusy/sshww2.F \
+isasusy/sshww.F \
+isasusy/ssl1st.F \
+isasusy/sslpbf.F \
+isasusy/sslrt1.F \
+isasusy/ssmass.F \
+isasusy/ssme3.F \
+isasusy/ssmhc.F \
+isasusy/ssmhn.F \
+isasusy/ssmqcd.F \
+isasusy/ssmssm.F \
+isasusy/ssn1st.F \
+isasusy/ssnorm.F \
+isasusy/sspole.F \
+isasusy/ssqkbf.F \
+isasusy/sssave.F \
+isasusy/sssnws.F \
+isasusy/ssstbf.F \
+isasusy/sstest.F \
+isasusy/sstpbf.F \
+isasusy/sswibf.F \
+isasusy/sswwf1.F \
+isasusy/sswzbf.F \
+isasusy/sswzf1.F \
+isasusy/sswzf2.F \
+isasusy/sswzf3.F \
+isasusy/sswzf4.F \
+isasusy/sswzf5.F \
+isasusy/sswzf6.F \
+isasusy/sswzf7.F \
+isasusy/ssxint.F \
+isasusy/ssxlam.F \
+isasusy/sszhx.F \
+isasusy/sszibf.F \
+isasusy/sszwf1.F \
+isasusy/sszzf1.F \
+isasusy/sszzf2.F \
+isasusy/sszzf3.F \
+isasusy/sszzf4.F \
+isasusy/sszzf5.F \
+isasusy/sualfe.F \
+isasusy/sualfs.F \
+isasusy/sugeff.F \
+isasusy/sugfrz.F \
+isasusy/sugmas.F \
+isasusy/sugra.F \
+isasusy/sugrge.F \
+isasusy/surg06.F \
+isasusy/surg26.F \
+isatape/bufin.F \
+isatape/bufout.F \
+isatape/edit.F \
+isatape/isahep.F \
+isatape/isawbg.F \
+isatape/isawev.F \
+isatape/isawnd.F \
+isatape/itrans.F \
+isatape/movlev.F \
+isatape/prtlst.F \
+isatape/rdbeg.F \
+isatape/rdtape.F \
+isatape/rend.F \
+isatape/rgens.F \
+isatape/wgens.F \
+isatape/zerol.F \
+isadata/aldata.F \
+isarun/dialog.F \
+isarun/isaset.F \
+openfile/openfile.F \
+pdfinit/pdfinit.F \
+utils/cern_lib/ddilog.F \
+utils/cern_lib/eisrs1.F \
+utils/cern_lib/rkstp.F \
+utils/cern_lib/sorttf.F \
+utils/cern_lib/tql2.F \
+utils/cern_lib/tred2.F 
+
+EINCLUDE:= ISAJET/isajet
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ISAJET/main.c b/ISAJET/main.c
new file mode 100644 (file)
index 0000000..2fcfee9
--- /dev/null
@@ -0,0 +1 @@
+void MAIN__() {}