// Author: Romain Holzmann
// Written: 8/11/2002
// Modified: 8/11/2002 R.H.
// PFileInput Class Header

#ifndef _PFileInput_H_
#define _PFileInput_H_

#include "PParticle.h"
#include "PChannel.h"

class PFileInput: public PParticle {

private:

 protected:
    Int_t imode;      //  mode (HGeant=1, QMD=2, BUU=3)
    Char_t *name;     //! input generator name
    Char_t *file;     //! input file name
    PParticle **part; //! array of particle pointers
    FILE *fp;         //! input file pointer
    Int_t flag;       //! event header flag

 public:
    PFileInput(Char_t *mode, Char_t *filename);
    
    void setToMidrapidity(float agev);
    Int_t IsFileInput() { 
	return 1; 
    } 
    Int_t readEventHeader(Float_t &b);
    Int_t readParticle(Double_t &px, Double_t &py, Double_t &pz, Double_t &E,
		       Double_t &vx, Double_t &vy, Double_t &vz, Double_t &vt,
		       Int_t &Id, Int_t &srcId, Int_t &parId, Int_t &parInd, Double_t &weight);
    PChannel *makeChannel(Int_t nMax, Float_t Ebeam=0.);
    virtual void Print(const Option_t *delme=NULL) const;
    virtual ~PFileInput() {
	if (fp) fclose(fp);
    }
    
    ClassDef(PFileInput,1) // Pluto file input
};

#endif // _PFileInput_H_

















 PFileInput.h:1
 PFileInput.h:2
 PFileInput.h:3
 PFileInput.h:4
 PFileInput.h:5
 PFileInput.h:6
 PFileInput.h:7
 PFileInput.h:8
 PFileInput.h:9
 PFileInput.h:10
 PFileInput.h:11
 PFileInput.h:12
 PFileInput.h:13
 PFileInput.h:14
 PFileInput.h:15
 PFileInput.h:16
 PFileInput.h:17
 PFileInput.h:18
 PFileInput.h:19
 PFileInput.h:20
 PFileInput.h:21
 PFileInput.h:22
 PFileInput.h:23
 PFileInput.h:24
 PFileInput.h:25
 PFileInput.h:26
 PFileInput.h:27
 PFileInput.h:28
 PFileInput.h:29
 PFileInput.h:30
 PFileInput.h:31
 PFileInput.h:32
 PFileInput.h:33
 PFileInput.h:34
 PFileInput.h:35
 PFileInput.h:36
 PFileInput.h:37
 PFileInput.h:38
 PFileInput.h:39
 PFileInput.h:40
 PFileInput.h:41
 PFileInput.h:42
 PFileInput.h:43
 PFileInput.h:44
 PFileInput.h:45
 PFileInput.h:46
 PFileInput.h:47
 PFileInput.h:48
 PFileInput.h:49
 PFileInput.h:50
 PFileInput.h:51
 PFileInput.h:52
 PFileInput.h:53
 PFileInput.h:54
 PFileInput.h:55
 PFileInput.h:56
 PFileInput.h:57
 PFileInput.h:58
 PFileInput.h:59
 PFileInput.h:60
 PFileInput.h:61