00001
00002 #ifndef CROSSDAQ_HH
00003 #define CROSSDAQ_HH
00004
00005
00006
00007
00008
00009
00010
00011 #include "SteerDesc.hh"
00012
00013 #include "mTypes.h"
00014
00015 #define CROSSDAQ "crossdaq"
00016
00017 #include <string>
00018 class Run;
00019 class Event;
00020
00021 #if 0
00022 struct mystructure{
00023 i32 xpad[256];
00024 i32 ypad[256];
00025 i32 nhit[256];
00026 };
00027
00028 struct Buffer_t{
00029 i32 numEvent;
00030
00031 i32 numDIF;
00032 i32 numHR;
00033 i32 bufferIndex;
00034 i32 bcid;
00035 i32 data[64];
00036 };
00037 extern Double_t timestamp;
00038
00039 struct Event_t{
00040 i32 numEvent;
00041 i32 nDIF;
00042 i32 nHR;
00043 i32 idHR[4];
00044 i32 bcid;
00045 i32 data[4][256];
00046 };
00047 #endif
00048
00049
00050
00051
00052 class Crossdaq {
00053
00054 public:
00055 virtual ~Crossdaq() ;
00056 static int getNextEvent(Event& eventToFill, FILE* currentFile,const Run& run, i32 lastEventId);
00057
00058
00059
00060 private:
00061 Crossdaq();
00062 static void reset();
00063 static unsigned int getData(FILE* inputFile, const int nBytes);
00064 static int newHit(Event& event, const Detector& detector, int data, const int chNum, const int chipId, const int difId);
00065 static int parse(Event& event, FILE* inputFile, const Run& aRun, i32& lastEventId);
00066
00067
00068 protected:
00069 };
00070
00071 #endif
00072