17 #include <FairPrimaryGenerator.h> 
   35    cout << 
"-I Pythia6Generator: Opening input file " << fileName << endl;
 
   36    if ((fInputFile = fopen(fFileName, 
"r")) == NULL)
 
   39       Fatal(
"Pythia6Generator", 
"Cannot open input file.");
 
   59       cout << 
"-E Pythia6Generator: Input file not open!" << endl;
 
   64    Int_t ntracks = 0, eventID = 0, ncols = 0;
 
   67    Int_t nLev = 0, pdgID = 0, nM1 = -1, nM2 = -1, nDF = -1, nDL = -1;
 
   68    Float_t fPx = 0., fPy = 0., fPz = 0., fM = 0., fE = 0.;
 
   69    Float_t fVx = 0., fVy = 0., fVz = 0., fT = 0.;
 
   76    ncols = fscanf(fInputFile, 
"%d\t%d", &eventID, &ntracks);
 
   78    if (ncols && ntracks > 0) {
 
   81          cout << 
"Event number: " << eventID << 
"\tNtracks: " << ntracks << endl;
 
   83       for (Int_t ll = 0; ll < ntracks; ll++) {
 
   84          ncols = fscanf(fInputFile, 
"%d %d %d %d %d %d %f %f %f %f %f %f %f %f %f", &nLev, &pdgID, &nM1, &nM2, &nDF,
 
   85                         &nDL, &fPx, &fPy, &fPz, &fE, &fM, &fVx, &fVy, &fVz, &fT);
 
   87             cout << nLev << 
"\t" << pdgID << 
"\t" << nM1 << 
"\t" << nM2 << 
"\t" << nDF << 
"\t" << nDL << 
"\t" << fPx
 
   88                  << 
"\t" << fPy << 
"\t" << fPz << 
"\t" << fE << 
"\t" << fM << 
"\t" << fVx << 
"\t" << fVy << 
"\t" << fVz
 
   89                  << 
"\t" << fT << endl;
 
   91             primGen->AddTrack(pdgID, fPx, fPy, fPz, fVx, fVy, fVz);
 
   94       cout << 
"-I Pythia6Generator: End of input file reached " << endl;
 
  100    if (feof(fInputFile)) {
 
  101       cout << 
"-I Pythia6Generator: End of input file reached " << endl;
 
  117 void Pythia6Generator::CloseInput()
 
  122          cout << 
"-I Pythia6Generator: Closing input file " << fFileName << endl;