EventMixer 1.0
An event mixer for mixing events generated by PIBIDS.
FileEventStream.hh
Go to the documentation of this file.
00001 
00011 #include <stdlib.h>
00012 #include <stdio.h>
00013 #include <vector>
00014 #include <string.h>
00015 #include <iostream>
00016 #include "EventHit.hh"
00017 
00018 using namespace std;
00019 
00020 
00021 #ifndef EVENT
00022 #define EVENT
00023 
00024 struct Event
00025 {
00026 public:
00027   int eventno; 
00028   vector<EventHit*> hit; // 0 normally implantation, 1 decay, 2 spurious
00029 };
00030 #endif
00031 
00032 
00033 
00034 #ifndef FILEEVENTSTREAM_H
00035 #define FILEEVENTSTREAM_H
00036 
00037 class FileEventStream
00038 {
00039 public:
00040   FileEventStream(char * filename 
00041                   ,int nTubes 
00042                   ); 
00043 
00044   ~FileEventStream(); 
00045   Event * getNextEvent(); 
00046   bool hasMoreEvents(); 
00047 private:
00048   FILE * myFileStream; 
00049   bool fileEmpty; 
00050   int upcomingEventID; 
00051   int NumberOfTubes;
00052 }
00053 ;
00054 #endif
 All Classes Files Functions Variables Defines

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

Created by Rikard Lundmark