/*
* Copyright (C) 2007, CompHEP Collaboration
* Author: Alexander Sherstnev 
*------------------------------------------------
* $Id $
*
* $Log $
*
*/
#ifndef __LHAPDF__
#define __LHAPDF__

#include <stdio.h>
#include <string.h>
#include<stdlib.h>
#include<math.h>

typedef struct lhapdfList {
    struct lhapdfList  *next;
    char * name;                 /* title name of distribution             */
    int set;                     /* set number                             */
    int mem;                     /* member number                          */
    char * pathfile;             /* path to file where it is stored        */
    char * file;                 /* name of file where it is stored        */
    int position;                /* ordering number of parton in the list of functions */
} lhapdfList;

extern void delLhapdfList (lhapdfList * list);

extern int comphepLhapdfList (char * thepath, char * indexfile, lhapdfList ** list);

/* free  memory allocated for 'list' */
extern void delLhapdfList (lhapdfList * list);

/* interpolates data for given x and q    */
/* according to information stored in W.  */
/* result should be multiplied by the     */
/* power factors later on                 */
extern double lhapdfVal (double x, double q, int i);

/* interpolates data for QCD-alpha(Q)     */
extern double lhapdf_interAlpha (double q);

extern void set_QCDLambda (int set, int mem);
extern double lhapdf_QCDLambda(void);
extern void initLHAPDF (int beamnum, char * path, char * file, int set, int mem, int prt);
extern int setLHAPDFIndexpath (longstr path);

/* FORTRAN FUNCTIONS
double evolvepdfwrapper_ (double*, double*, int*);
double alphaspdf_ (double*);
double getlam5wrapper_ (void);
int numberpdfwrapper_ (void);
void initpdfset_ (char*, int*);
 */
#endif
