Mixed Data Coincidence Analysis Software 1.0
A program to analyze files produced by the EventMixer software.
Public Member Functions | Private Attributes
FileEventParser Class Reference

Creates a pointer to a file, and reads events from that file. More...

#include <FileEventParser.hh>

List of all members.

Public Member Functions

 FileEventParser (char *filename, int nTubes=40, float detEpsilon=1E-2, float dRatio=1E2)
 Constructor, constructs the FileEventParser.
 ~FileEventParser ()
 Destructor.
EventHitgetNextEventHit ()
 Returns the next event from the file.
bool hasMoreEvents ()
 Returns the fileEmpty variable.

Private Attributes

FILE * myFileStream
 The file stream that this object is connected to. Opened upon creation, closed upon destruction.
bool fileEmpty
 True if file is now empty. If a getNextEvent() is called when this is true, a zero result will be returned.
int numberOfTubes
 Number of scintillator tubes in detector.
float detectorEpsilon
 Detector epsilon.
float dominateRatio
 Ratio for domination.

Detailed Description

Creates a pointer to a file, and reads events from that file.

Definition at line 25 of file FileEventParser.hh.


Constructor & Destructor Documentation

FileEventParser::FileEventParser ( char *  filename,
int  nTubes = 40,
float  detEpsilon = 1E-2,
float  dRatio = 1E2 
)

Constructor, constructs the FileEventParser.

Parameters:
filenameThe file to read events from.

Definition at line 3 of file FileEventParser.cc.

References detectorEpsilon, dominateRatio, fileEmpty, myFileStream, and numberOfTubes.

{
  numberOfTubes = nTubes;
  detectorEpsilon = detEpsilon;
  dominateRatio = dRatio;
  myFileStream = fopen(filename,"r");
  if(myFileStream==NULL)
    {
      fprintf (stderr,"Could not open input event file %s, exiting.", filename);
      exit(1);
    }
  fileEmpty = false;
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines

Back to the main page of the Precalibrated Ion Beam Identification Detector project

Created by Rikard Lundmark