#ifndef _PFileInput_H_
#define _PFileInput_H_
#include "PParticle.h"
#include "PChannel.h"
class PFileInput: public PParticle {
private:
protected:
Int_t imode;
Char_t *name;
Char_t *file;
PParticle **part;
FILE *fp;
Int_t 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)
};
#endif // _PFileInput_H_