00001 #ifndef BIN_WORD_SEARCH_HH 00002 #define BIN_WORD_SEARCH_HH 00003 00004 #include <Base-TypeDef.hh> 00005 #include "bin_io_handler.hh" 00006 #include <deque> 00007 #include <TString.h> 00008 00009 class bin_word_search : public decoder_base { 00010 00011 public: 00012 bin_word_search(); 00013 ~bin_word_search(){}; 00014 00015 enum WORD_BYTES {INT, SHORT}; 00016 00017 void set_target_word(PMT::word_t word){_target=word;}; 00018 00019 void set_filename(std::string name){_fin.set_filename(name);}; 00020 00021 void set_continue_mode(bool mode){_continue_mode=mode;}; 00022 00023 void set_format(FORMAT::INPUT_FILE fmt){_fin.set_format(fmt);}; 00024 00025 void set_nwords(size_t n){_nwords=n;}; 00026 00027 void set_word_bytes(WORD_BYTES bytes){_bytes=bytes;}; 00028 00029 bool run(); 00030 00031 void print_words(std::deque<PMT::word_t> *words); 00032 00033 private: 00034 00035 bin_io_handler _fin; 00036 PMT::word_t _target; 00037 bool _continue_mode; 00038 size_t _nwords; 00039 WORD_BYTES _bytes; 00040 }; 00041 #endif
1.4.7