![]() |
Mixed Data Coincidence Analysis Software 1.0
A program to analyze files produced by the EventMixer software.
|
Creates a pointer to a file, and reads events from that file. More...
#include <FileEventParser.hh>
Public Member Functions | |
FileEventParser (char *filename, int nTubes=40, float detEpsilon=1E-2, float dRatio=1E2) | |
Constructor, constructs the FileEventParser. | |
~FileEventParser () | |
Destructor. | |
EventHit * | getNextEventHit () |
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. |
Creates a pointer to a file, and reads events from that file.
Definition at line 25 of file FileEventParser.hh.
FileEventParser::FileEventParser | ( | char * | filename, |
int | nTubes = 40 , |
||
float | detEpsilon = 1E-2 , |
||
float | dRatio = 1E2 |
||
) |
Constructor, constructs the FileEventParser.
filename | The 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; }