Extracting the BLOCK DATA in a separate file. Changes to make it working on macosx
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2006 10:22:57 +0000 (10:22 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2006 10:22:57 +0000 (10:22 +0000)
LHAPDF/lhapdf5.2.2/commons.f [new file with mode: 0644]
LHAPDF/lhapdf5.2.2/lhaglue.f
LHAPDF/liblhapdf.pkg

diff --git a/LHAPDF/lhapdf5.2.2/commons.f b/LHAPDF/lhapdf5.2.2/commons.f
new file mode 100644 (file)
index 0000000..efb636e
--- /dev/null
@@ -0,0 +1,50 @@
+      BLOCK DATA LHAPDFSET
+c... additions for multiset use
+      include 'parmsetup.inc'
+      include 'pathsetup.inc'
+c      character*172 LHANAMES(nmxset)
+      integer LHASET, LHAMEMB
+      common/LHAPDF/LHANAME, LHASET, LHAMEMB
+      integer LHAMEMBERS(nmxset),LHANUMBERS(nmxset)
+      common/LHASETS/LHANAMES,LHANUMBERS,LHAMEMBERS,nsets
+c...
+c      CHARACTER*132 LHAPATH
+      COMMON/LHAPDFC/LHAPATH
+      SAVE /LHAPDFC/
+      CHARACTER*20 LHAPARM(20)
+      DOUBLE PRECISION LHAVALUE(20)
+      COMMON/LHACONTROL/LHAPARM,LHAVALUE
+      SAVE/LHACONTROL/
+      DOUBLE PRECISION XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM,
+     >                 XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP
+      COMMON/LHAGLSTA/ XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM,
+     >                 XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP
+      SAVE/LHAGLSTA/
+C...Interface to PDFLIB.
+      COMMON/W50511/ NPTYPEPDFL,NGROUPPDFL,NSETPDFL,MODEPDFL,
+     >               NFLPDFL,LOPDFL,TMASPDFL
+      SAVE /W50511/
+      DOUBLE PRECISION TMASPDFL
+C...Interface to PDFLIB.
+      COMMON/W50512/QCDL4,QCDL5
+      SAVE /W50512/
+      DOUBLE PRECISION QCDL4,QCDL5
+C...Interface to PDFLIB.
+      COMMON/W50513/XMIN,XMAX,Q2MIN,Q2MAX
+      SAVE /W50513/
+      DOUBLE PRECISION XMIN,XMAX,Q2MIN,Q2MAX
+      COMMON/LHAPDFE/LHAEXTRP
+      SAVE /LHAPDFE/
+      COMMON/LHAPDFR/QCDLHA4, QCDLHA5, NFLLHA
+      SAVE /LHAPDFR/
+c... following 2 for earlier Pythia versions
+      COMMON/LUDAT1/MSTU5(200),PARU5(200),MSTJ5(200),PARJ5(200)
+      SAVE /LUDAT1/
+
+      data nsets/0/
+      DATA LHAPATH/'PDFsets'/ ! Default = PDFsets (below current dir)
+      DATA LHAPARM /20*' '/
+      DATA LHAVALUE /20*0.0D0/
+      DATA XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM/5*0.D0/
+      DATA XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP/5*0.D0/
+      END
index 4eda9b1..d72386d 100644 (file)
@@ -135,36 +135,6 @@ C...interface to LHAPDF library
 
 C*********************************************************************
 
-      BLOCK DATA LHAPDFSET
-c... additions for multiset use
-      include 'parmsetup.inc'
-      include 'pathsetup.inc'
-c      character*172 LHANAMES(nmxset)
-      integer LHASET, LHAMEMB
-      common/LHAPDF/LHANAME, LHASET, LHAMEMB
-      integer LHAMEMBERS(nmxset),LHANUMBERS(nmxset)
-      common/LHASETS/LHANAMES,LHANUMBERS,LHAMEMBERS,nsets
-      data nsets/0/
-c...
-c      CHARACTER*132 LHAPATH
-      COMMON/LHAPDFC/LHAPATH
-      SAVE /LHAPDFC/
-      DATA LHAPATH/'PDFsets'/ ! Default = PDFsets (below current dir)
-      CHARACTER*20 LHAPARM(20)
-      DOUBLE PRECISION LHAVALUE(20)
-      COMMON/LHACONTROL/LHAPARM,LHAVALUE
-      SAVE/LHACONTROL/
-      DATA LHAPARM /20*' '/
-      DATA LHAVALUE /20*0.0D0/
-      DOUBLE PRECISION XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM,
-     >                 XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP
-      COMMON/LHAGLSTA/ XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM,
-     >                 XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP
-      SAVE/LHAGLSTA/
-      DATA XMINNUM,XMAXNUM,Q2MINNUM,Q2MAXNUM,TOTNUM/5*0.D0/
-      DATA XMINNUP,XMAXNUP,Q2MINNUP,Q2MAXNUP,TOTNUP/5*0.D0/
-      END
-
 C...PDFSET
 C...Initialization for use of parton distributions
 C... according to the LHAPDF interface.
@@ -247,15 +217,15 @@ C...Local arrays and character variables (NOT USED here DB)
       INTEGER LHAFIVE
       SAVE LHAONCE
       SAVE LHAFIVE
-      DATA LHAONCE/0/
-      DATA LHAFIVE/0/
       logical first
-      data first/.TRUE./
       save first
  
       INTEGER LNROOT
       CHARACTER*1000 CHROOT
       CHROOT=' '
+      DATA LHAONCE/0/
+      DATA LHAFIVE/0/
+      data first/.TRUE./
 
       if(first .AND. (LHAPARM(20).NE.'LHAPATH')) then
 c...overide the default PDFsets path
@@ -1211,6 +1181,9 @@ C...Interface to LHAPDFLIB.
 * $Id$
 *
 * $Log$
+* Revision 1.2  2006/11/01 12:25:47  hristov
+* Using LHAPDF instead of PDF
+*
 * Revision 1.1  2006/08/07 09:09:40  morsch
 * LHAPDF 5.2.2 source code.
 *
index 5602e09..75f94e0 100644 (file)
@@ -1,7 +1,10 @@
 SRCS:=AliStructFuncType.cxx
+
 HDRS= $(SRCS:.cxx=.h) 
 DHDR:=LHAPDFLinkDef.h
 
+EINCLUDE:= LHAPDF/lhapdf5.2.2
+
 FSRCS:= \
 lhapdf5.2.2/alphas.f \
 lhapdf5.2.2/description.f \
@@ -10,7 +13,6 @@ lhapdf5.2.2/eksarp.f \
 lhapdf5.2.2/EVLCTEQ.f \
 lhapdf5.2.2/evolution.f \
 lhapdf5.2.2/inputPDF.f \
-lhapdf5.2.2/lhaglue.f \
 lhapdf5.2.2/LHpdflib.f \
 lhapdf5.2.2/parameter.f \
 lhapdf5.2.2/QCDNUM.f \
@@ -42,6 +44,36 @@ lhapdf5.2.2/wrapQCDNUM.f \
 lhapdf5.2.2/wrapsasg.f \
 lhapdf5.2.2/wrapsmrspi.f \
 lhapdf5.2.2/wrapwhitg.f \
-lhapdf5.2.2/wrapzeus.f
+lhapdf5.2.2/wrapzeus.f \
+lhapdf5.2.2/commons.f
+
+
+
 EXPORT:=AliStructFuncType.h
-EINCLUDE:= LHAPDF/lhapdf
\ No newline at end of file
+
+
+ifeq (,$(findstring macosx,$(ALICE_TARGET)))
+
+FSRCS += lhapdf5.2.2/lhaglue.f
+
+else
+
+
+TCSRCS=ctmp/lhapdf5.2.2/lhaglue.c
+
+CSRCS+=$(TCSRCS)
+
+.SECONDARY: $(TCSRCS)
+
+PACKCFLAGS:=$(CFLAGS) -w
+
+LHAPDF/ctmp/%.c: LHAPDF/%.f
+       [ -d $(dir $@) ] || mkdir -p $(dir $@)
+ifeq (macosx,$(ALICE_TARGET))
+       $(F77) -E $(lhapdfINC) $(lhapdfFFLAGS) $< | f2c -E | sed -e 's/___/__/g' > $@
+endif
+ifeq (macosxgcc4,$(ALICE_TARGET))
+       $(F77) -E $(lhapdfINC) $(lhapdfFFLAGS) $< | f2c -E | sed -e 's/\___/__/g' > $@
+endif
+
+endif