00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef EVENTDATA_H
00025 #define EVENTDATA_H
00026
00027
00028 #include "array.h"
00029 #include "types.h"
00030
00031
00032 #include <iostream>
00033 using namespace std;
00034
00035
00039 class EventData{
00040 public:
00046 inline EventData(Array<int> d,Array<dataType> t,bool status){
00047 times = t;
00048 ids = d;
00049 ready = status;
00050 };
00051
00052 inline EventData(){
00053 ready = false;
00054 };
00055
00056 inline EventData& operator=(const EventData& source){
00057 if(&source != this){
00058 ready = source.ready;
00059 times = source.times;
00060 ids = source.ids;
00061 }
00062 return *this;
00063 };
00064
00065 inline void setStatus(bool status){ready = status;};
00066 inline void setData(Array<dataType>& t,Array<int>& d){
00067 times = t;
00068 ids = d;
00069 };
00071 inline bool status(){return ready;};
00072
00074 inline Array<int>& getIds(){return ids;};
00075
00078 inline Array<dataType>& getTimes(){return times;};
00079
00085 void computePositions(double samplingRate,double positionSamplingRate,long startTime);
00086
00089 inline Array<dataType>& getPositions(){return positions;};
00090
00091
00092 private:
00093 Array<dataType> times;
00094 Array<int> ids;
00095 bool ready;
00096 Array<dataType> positions;
00097 };
00098
00099 #endif