00001 #ifndef _ACQUISITIONPARSER_HH 00002 #define _ACQUISITIONPARSER_HH 00003 00004 00005 #include "mTypes.h" 00006 00007 #include "SteerDesc.hh" 00008 class Run; 00009 class Event; 00010 00011 00012 #define EVENT_CORRECT 1 00013 #define LAST_FILE_EVENT 2 00014 #define EVENT_ERROR 3 00015 #define TYPE_NOT_SUPPORTED 4 00016 00017 class AcquisitionParser 00018 { 00019 public: 00020 AcquisitionParser(); 00021 ~AcquisitionParser(); 00022 00023 bool init( const SteerDesc& steerDesc, Run& aRun ); 00024 bool getNextEvent(Event& eventToFill, ui32 &lastEventId); 00025 00026 private: 00027 int specificGetNextEvent(Event& eventToFill, ui32& lastEventId); 00028 00029 00030 private: 00031 FILE* currentFile; 00032 std::string currentType; 00033 const Run* run; 00034 const std::vector<input_info_t>* inputFiles; 00035 int fileIndex; 00036 00037 00038 00039 }; 00040 00041 #endif /* _ACQUISITIONPARSER_HH */ 00042