00001 #ifndef XMIT_EVENT_SEARCH_HH 00002 #define XMIT_EVENT_SEARCH_HH 00003 00004 #include <Base-TypeDef.hh> 00005 #include <Algorithm-TypeDef.hh> 00006 #include <FileIO-TypeDef.hh> 00007 00008 class xmit_event_search : public decoder_base { 00009 00010 public: 00011 xmit_event_search(); 00012 ~xmit_event_search(){}; 00013 00014 void set_target_id(PMT::word_t id){_target_id=id;}; 00015 00016 void set_filename(std::string name){_fin.set_filename(name);}; 00017 00018 void set_continue_mode(bool mode){_continue_mode=mode;}; 00019 00020 void set_format(FORMAT::INPUT_FILE fmt){_fin.set_format(fmt);}; 00021 00022 void set_slow_readout(bool slow=true){_slow_readout=slow;}; 00023 00024 void set_read_by_block(bool doit){_read_by_block=doit;}; 00025 00026 bool run(); 00027 00028 void print_word(std::vector<PMT::word_t> *in_array); 00029 00030 inline bool new_event(PMT::word_t word) const{ 00031 if(_slow_readout) return ( 0xffff == (word & 0xffff) ); 00032 else return (0xffffffff == word); 00033 }; 00034 00035 static const size_t XMIT_INDEX_EVENT_ID; 00036 static const size_t SLOW_INDEX_EVENT_ID; 00037 00038 private: 00039 00040 bin_io_handler _fin; 00041 PMT::word_t _target_id; 00042 bool _continue_mode; 00043 bool _slow_readout; 00044 bool _read_by_block; 00045 size_t _index_event_id; 00046 algo_base* _algo; 00047 00048 }; 00049 #endif 00050
1.4.7