algo_xmit_decoder.hh

Go to the documentation of this file.
00001 
00015 #ifndef ALGO_XMIT_DECODER_HH
00016 #define ALGO_XMIT_DECODER_HH
00017 
00018 #include "algo_slow_readout_decoder.hh"
00019 
00027 class algo_xmit_decoder : public algo_slow_readout_decoder {
00028   
00029 public:
00030   
00032   algo_xmit_decoder() : algo_slow_readout_decoder(){};
00033 
00035   virtual ~algo_xmit_decoder(){};
00036   
00038   virtual bool process_header(const PMT::word_t word);
00039 
00041   virtual inline PMT::PMT_WORD get_word_class(const PMT::word_t word) const {
00042     // One of core functions to identify PMT binary word format
00043     if( (word & 0xffffffff) == 0xffffffff )
00044       return PMT::EVENT_HEADER;
00045     if( (word & 0xffff) == 0xffff )
00046       return PMT::FEM_HEADER;
00047     else if( (word & 0xf000) == 0xf000 )
00048       return PMT::FEM_HEADER;
00049     else if( (word & 0xf000) == 0x4000 )
00050       return PMT::FEM_FIRST_WORD;
00051     else if( (word & 0xf000) == 0x9000 )
00052       return PMT::CHANNEL_HEADER;
00053     else if( (word & 0xf000) == 0xa000 )
00054       return PMT::CHANNEL_WORD;
00055     else if( (word & 0xf000) == 0xb000 )
00056       return PMT::CHANNEL_LAST_WORD;
00057     else if( (word & 0xf000) == 0xc000 )
00058       return PMT::FEM_LAST_WORD;
00059     else if( (word & 0xf000) == 0xe000 )
00060       return PMT::EVENT_LAST_WORD;
00061     else
00062       return PMT::UNDEFINED_WORD;
00063   };
00064 
00065 };
00066 #endif 
00067  // end of doxygen group 

Generated on Mon Apr 7 15:35:12 2014 for MyProject by  doxygen 1.4.7