algo_tpc_huffman Class Reference

#include <algo_tpc_huffman.hh>

Inheritance diagram for algo_tpc_huffman:

algo_tpc_xmit algo_fem_decoder_base algo_base decoder_base List of all members.

Public Member Functions

 algo_tpc_huffman ()
 ~algo_tpc_huffman ()
virtual PMT::PMT_WORD get_word_class (const PMT::word_t word) const
 Override of algo_base::get_word_class method.
virtual bool process_word (const PMT::word_t word)
 Re-implementation of process_word.
virtual void reset ()
 Override function to reset the instance.
PMT::word_t round_diff (PMT::word_t ref_id, PMT::word_t subject_id, PMT::word_t diff) const
 A simple round-diff algorithm for binary words.
virtual bool is_event_empty ()
 A simple method to inquire if the data storage buffer is currently empty or not.
virtual void finalize ()
 Function called just after processing word.
void set_debug_mode (bool doit)
 Run utility: set debug mode. Children class defines what-to-do in debug mode.
void set_storage_ptr (storage_manager *storage)
 Expects a storage pointer to be provided from a parent class.
virtual void set_backtrace_mode (size_t nwords=0)
 Run utility: set back-trace mode. One should provide number of words to be stored.
size_t backtrace_mode () const
 Getter for backtrace mode (returns # words specified to store. 0=no backtrace).
void backtrace () const
 Function to print out stored words in buffer for back-trace purpose.
void set_verbosity (MSG::Level level)
 Setter for the verbosity level.
MSG::Level get_verbosity () const
 Getter for the verbosity level.
const std::string class_name () const
 Getter for the class name.

Protected Member Functions

virtual void clear_event ()
 A method to clear event-wise data.
virtual bool process_event_header (const PMT::word_t word, PMT::word_t &last_word)
 A method to process 32-bit event header word.
virtual bool process_fem_header (const PMT::word_t word, PMT::word_t &last_word)
 A method to process FEM header word passed from process_word method.
virtual bool process_ch_word (const PMT::word_t word, PMT::word_t &last_word)
 A method to process 16-bit channel word.
virtual bool process_fem_last_word (const PMT::word_t word, PMT::word_t &last_word)
 A method to process 32-bit end-of-fem word.
virtual bool process_event_last_word (const PMT::word_t word, PMT::word_t &last_word)
 A method to process 32-bit end-of-event word.
virtual bool check_event_quality ()
 Implementation of algo_base::check_event_quality.
bool store_event ()
 A method to store event-wise data.
bool decode_ch_word (const PMT::word_t word, PMT::word_t &last_word)
virtual bool is_compressed (const PMT::word_t word)
virtual bool decode_fem_header (const PMT::word_t *event_header)
 A method to decode fem header word passed from process_header.
virtual bool add_huffman_adc (std::vector< UShort_t > &wf, size_t zero_count)
virtual void init_checker_info ()
 Function to initialize checker information.

Protected Attributes

bool _search_header
tpc_waveform _ch_data
tpc_wf_collection_event_data
PMT::word_t _event_header_words [FEM_HEADER_COUNT]
 Event header word holder.
PMT::word_t _last_word
 Last word processed.
size_t _event_header_count
 A counter for event header words.
bool _search_for_next_event
 A run control boolean: skips any action till it finds the new event header.
InfoFEM_t _header_info
bool _debug_mode
 Debug mode boolean holder.
bool _bt_mode
 Back-trace mode boolean holder.
storage_manager_storage
 Data storage pointer to be provided by a parent process.
PMT::word_t _checksum
 data checksum
PMT::word_t _nwords
 number of data word counts processed
std::deque< PMT::word_t_bt_words
 processed words to be stored event-wise for back-trace purpose
size_t _bt_nwords
 user defined # of words to be temporarily stored in the buffer
bool _bt_nwords_filled
 run utility boolean to keep a recored of filled buffer
char _buf [200]
 char buffer for message manipulation
bool _verbosity [MSG::MSG_TYPE_MAX]
 holder for enabled message levels
MSG::Level _verbosity_level
 holder for specified verbosity level
std::string _name
 class name holder

Static Protected Attributes

static const size_t FEM_HEADER_COUNT = 6
 Number of event header words.
static const size_t BEAM_REF_CHANNEL = 39
 Defines a reference channel for beamgate.
static const size_t BEAM_NWORDS = 21
 Defines # of minimum words to identify beamgate event.
static const size_t FRAME_WIDTH = 8192
 Defines # of ADC samples per readout frame.

Detailed Description

Definition at line 7 of file algo_tpc_huffman.hh.


Constructor & Destructor Documentation

algo_tpc_huffman::algo_tpc_huffman (  ) 

Definition at line 6 of file algo_tpc_huffman.cc.

References decoder_base::_name, and reset().

00006                                    : algo_tpc_xmit()
00007 {
00008   _name = "algo_tpc_huffman";
00009   reset();
00010 }  

algo_tpc_huffman::~algo_tpc_huffman (  )  [inline]

Definition at line 13 of file algo_tpc_huffman.hh.

00013 {};


Member Function Documentation

bool algo_fem_decoder_base::add_huffman_adc ( std::vector< UShort_t > &  wf,
size_t  zero_count 
) [protected, virtual, inherited]

Definition at line 396 of file algo_fem_decoder_base.cc.

Referenced by algo_tpc_xmit::decode_ch_word().

00397 {
00398 //#################################################
00399 
00400   bool status = true;
00401 
00402   switch(zero_count){
00403     
00404   case 0:
00405     wf.push_back( (*(wf.rbegin())) ); break;      
00406     
00407   case 1:
00408     wf.push_back( (*(wf.rbegin())) -1 ); break;
00409     
00410   case 2:
00411     wf.push_back( (*(wf.rbegin())) +1 ); break;
00412     
00413   case 3:
00414     wf.push_back( (*(wf.rbegin())) -2 ); break;
00415     
00416   case 4:
00417     wf.push_back( (*(wf.rbegin())) +2 ); break;
00418     
00419   case 5:
00420     wf.push_back( (*(wf.rbegin())) -3 ); break;
00421     
00422   case 6:
00423     wf.push_back( (*(wf.rbegin())) +3 ); break;
00424     
00425   default:
00426 
00427     std::cout<<zero_count<<std::endl;
00428     
00429     status = false;
00430   }
00431   
00432   return status;
00433 
00434 }

void algo_base::backtrace (  )  const [inline, inherited]

Function to print out stored words in buffer for back-trace purpose.

Definition at line 82 of file algo_base.hh.

References algo_base::_bt_words, Message::send(), and MSG::WARNING.

Referenced by process_word(), and algo_fem_decoder_base::process_word().

00083   {
00084     Message::send(MSG::WARNING,__FUNCTION__,"Dumping a backtrace...");
00085     int ctr=1;
00086     for(std::deque<PMT::word_t>::const_iterator iter(_bt_words.begin());
00087     iter!=_bt_words.end();
00088     ++iter) {
00089       printf("%08x ",(*iter));
00090       if(ctr%8==0 && ctr) std::cout<<std::endl;
00091       ctr++;
00092     }
00093     std::cout<<std::endl<<std::endl;
00094   };

size_t algo_base::backtrace_mode (  )  const [inline, inherited]

Getter for backtrace mode (returns # words specified to store. 0=no backtrace).

Definition at line 71 of file algo_base.hh.

References algo_base::_bt_nwords.

00071 {return _bt_nwords;};

bool algo_tpc_xmit::check_event_quality (  )  [protected, virtual, inherited]

Implementation of algo_base::check_event_quality.

Reimplemented from algo_fem_decoder_base.

Definition at line 179 of file algo_tpc_xmit.cc.

References algo_base::_checksum, algo_fem_decoder_base::_header_info, algo_base::_nwords, MSG::ERROR, and Message::send().

Referenced by algo_tpc_xmit::store_event().

00179                                        {
00180 //#########################################################
00181 
00182   bool status = true;
00183 
00184   // Check if _checksum and _nwords agrees with that of event header.
00185   //if(_nwords != _header_info.nwords) {
00186   _nwords-=1;
00187   if(_nwords!=_header_info.nwords){
00188 
00189     Message::send(MSG::ERROR,__FUNCTION__,
00190           Form("Disagreement on nwords: counted=%u, expected=%u",_nwords,_header_info.nwords));
00191 
00192     status = false;
00193 
00194   }
00195 
00196   //if(_checksum != _header_info.checksum) {
00197   if((_checksum & 0xffffff) !=_header_info.checksum){
00198 
00199     Message::send(MSG::ERROR,__FUNCTION__,
00200           Form("Disagreement on checksum: summed=%x, expected=%x",_checksum,_header_info.checksum));
00201 
00202     status = false;
00203 
00204   }
00205 
00206   return status;
00207 
00208 }

const std::string decoder_base::class_name (  )  const [inline, inherited]

Getter for the class name.

Definition at line 46 of file decoder_base.hh.

References decoder_base::_name.

00046 {return _name;};

void algo_tpc_huffman::clear_event (  )  [protected, virtual]

A method to clear event-wise data.

Reimplemented from algo_tpc_xmit.

Definition at line 18 of file algo_tpc_huffman.cc.

References _search_header, and algo_tpc_xmit::clear_event().

Referenced by process_word().

00018                                    {
00019 
00020   _search_header = false;
00021 
00022   algo_tpc_xmit::clear_event();
00023 
00024 }

bool algo_tpc_xmit::decode_ch_word ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, inherited]

Definition at line 333 of file algo_tpc_xmit.cc.

References algo_tpc_xmit::_ch_data, algo_fem_decoder_base::add_huffman_adc(), MSG::ERROR, algo_tpc_xmit::is_compressed(), and Message::send().

Referenced by algo_tpc_xmit::process_ch_word(), and process_ch_word().

00335 {
00336 //#########################################################
00337 
00338   bool status = true;
00339   // Simply append if it is not compressed
00340   if( !(is_compressed(word)) ) _ch_data.push_back( (word & 0xfff) );
00341 
00342   else if(!(_ch_data.size())){
00343 
00344     // This is a problem: if huffman coded, then we must have a previous ADC sample
00345     // as a reference. Raise an error.
00346 
00347     Message::send(MSG::ERROR,__FUNCTION__,
00348           Form("Huffman coded word %x found while the previous was non-ADC word (%x)!",
00349                word,last_word));
00350     
00351     status = false;
00352 
00353   }
00354   else{
00355 
00356     // Compresed data is in last 15 bit of this word.
00357     PMT::word_t data = (word & 0x7fff);
00358 
00359     // The compression is based on an extremely simple Huffman encoding.
00360     // The Huffman tree used here assigns the following values:
00361     //
00362     // Value   Code
00363     //  +3     0000001
00364     //  +2     00001
00365     //  +1     001
00366     //  +0     1
00367     //  -1     01
00368     //  -2     0001
00369     //  -3     000001
00370 
00371     /*
00372     size_t zero_count     = 0;
00373     for(size_t index=0; index<15 && status; ++index){
00374 
00375       if( !((data >> index) & 0x1) ) zero_count++;
00376       else{
00377 
00378     switch(zero_count){
00379       
00380     case 0:
00381       _ch_data.push_back( (*(_ch_data.rbegin())) ); break;    
00382       
00383     case 1:
00384       _ch_data.push_back( (*(_ch_data.rbegin())) -1 ); break;
00385 
00386     case 2:
00387       _ch_data.push_back( (*(_ch_data.rbegin())) +1 ); break;
00388 
00389     case 3:
00390       _ch_data.push_back( (*(_ch_data.rbegin())) -2 ); break;
00391 
00392     case 4:
00393       _ch_data.push_back( (*(_ch_data.rbegin())) +2 ); break;
00394 
00395     case 5:
00396       _ch_data.push_back( (*(_ch_data.rbegin())) -3 ); break;
00397 
00398     case 6:
00399       _ch_data.push_back( (*(_ch_data.rbegin())) +3 ); break;
00400 
00401     default:
00402       Message::send(MSG::ERROR,__FUNCTION__,
00403             Form("Encountered unexpected number of zeros (=%zu) in the compressed word %x!",
00404                  zero_count,word));
00405       status = false;
00406     };
00407     
00408     zero_count=0;
00409       }
00410     }
00411     */
00412 
00413     size_t zero_count = 0;
00414     bool   non_zero_found = false;
00415     for(size_t index=0; index<15 && status; ++index){
00416 
00417       if( !((data >> index) & 0x1) )
00418 
00419     zero_count += ( non_zero_found ? 1 : 0 );
00420     
00421       else{
00422     
00423     if(!non_zero_found) non_zero_found=true;
00424 
00425     else status = add_huffman_adc(_ch_data,zero_count);
00426     
00427     if(status) zero_count=0;
00428       }
00429     }
00430 
00431     if(zero_count && status){
00432 
00433       status = add_huffman_adc(_ch_data,zero_count);
00434       
00435     }    
00436 
00437     if(!status)
00438       
00439       Message::send(MSG::ERROR,__FUNCTION__,
00440             Form("Encountered unexpected number of zeros (=%zu) in the compressed word %x!",
00441              zero_count,word));
00442     
00443   }
00444   
00445   return status;
00446 
00447 }

bool algo_fem_decoder_base::decode_fem_header ( const PMT::word_t event_header  )  [protected, virtual, inherited]

A method to decode fem header word passed from process_header.

Definition at line 295 of file algo_fem_decoder_base.cc.

References algo_base::_checksum, algo_fem_decoder_base::_header_info, algo_base::_nwords, decoder_base::_verbosity, algo_fem_decoder_base::InfoFEM_t::checksum, algo_fem_decoder_base::InfoFEM_t::clear_event(), MSG::ERROR, algo_fem_decoder_base::InfoFEM_t::event_frame_id, algo_fem_decoder_base::InfoFEM_t::event_id, MSG::INFO, algo_fem_decoder_base::InfoFEM_t::module_address, algo_fem_decoder_base::InfoFEM_t::module_id, algo_fem_decoder_base::InfoFEM_t::nwords, algo_fem_decoder_base::round_diff(), Message::send(), algo_fem_decoder_base::InfoFEM_t::trigger_frame_id, and algo_fem_decoder_base::InfoFEM_t::trigger_timeslice.

Referenced by process_fem_header(), and algo_fem_decoder_base::process_fem_header().

00295                                                                           {
00296 //#################################################
00297 
00298   bool status=true;
00299   //
00300   // Get event information
00301   //
00302 
00303   // (1) check if the very first 16-bit word is as expected
00304   if(!( event_header[0] & 0xffff))
00305     Message::send(MSG::ERROR,"Unexpected first word in event headers!");
00306 
00307   if(!status) return status;
00308 
00309   // Initialize data holder
00310   _header_info.clear_event();
00311 
00312   // (2) get module address ... lowest 5 of 12 bits
00313   _header_info.module_address = ( (event_header[0]>>16 & 0xfff)    & 0x1f);
00314 
00315   // (3) get module ID number ... upper 7 bit of 12 bits
00316   _header_info.module_id      = ( (event_header[0]>>16 & 0xfff)>>5 & 0x7f);
00317 
00318   // (4) get number of 16-bit words to be read in this event.
00319   // Lower 12 bits of two 16-bit words.
00320   // The very last "last word for channel info" is not included in this.
00321   // For later checking purpose, increment by 1.
00322   _header_info.nwords         = ( (((event_header[1]>>16) & 0xfff) + ((event_header[1] & 0xfff)<<12)));
00323 
00324   // (5) get event ID
00325   // Lower 12 bits of two 16-bit words.
00326   _header_info.event_id       = ( (((event_header[2]>>16) & 0xfff) + ((event_header[2] & 0xfff)<<12)));
00327 
00328   // (6) get frame ID
00329   // Lower 12 bits of two 16-bit words.
00330   _header_info.event_frame_id = ( (((event_header[3]>>16) & 0xfff) + ((event_header[3] & 0xfff)<<12)));
00331 
00332   // (7) get checksum
00333   _header_info.checksum       = ( (((event_header[4]>>16) & 0xfff) + ((event_header[4] & 0xfff)<<12)));
00334 
00335 
00336 #ifdef INCLUDE_EXTRA_HEADER
00337   _header_info.trigger_frame_id  = ( ((event_header[5] & 0xfff)>>4 & 0xf) +
00338                      (((_header_info.event_frame_id)>>4)<<4)); 
00339 
00340   // Correct for a roll over
00341   _header_info.trigger_frame_id  = round_diff(_header_info.event_frame_id, _header_info.trigger_frame_id, 0x7);
00342 
00343   _header_info.trigger_timeslice = ((((event_header[5]>>16) & 0xf)<<8) + (event_header[5] & 0xff));
00344 
00345 #endif
00346 
00347   // Report if verbosity is set.
00348   if(_verbosity[MSG::INFO])
00349     {
00350       Message::send(MSG::INFO,Form("Module %d (ID=%d)", _header_info.module_address, _header_info.module_id));
00351       Message::send(MSG::INFO,Form("Event ID %d",_header_info.event_id));
00352       Message::send(MSG::INFO,Form("Frame ID %d",_header_info.event_frame_id));
00353       Message::send(MSG::INFO,Form("Number of Words = %d",_header_info.nwords));
00354       Message::send(MSG::INFO,Form("Checksum = %x", _header_info.checksum));
00355       Message::send(MSG::INFO,Form("Trigger Frame %d",_header_info.trigger_frame_id));
00356       Message::send(MSG::INFO,Form("Trigger Sample %d",_header_info.trigger_timeslice));
00357     }
00358 
00359   _checksum=0;
00360 
00361   _nwords=0;
00362               
00363   return status;
00364 }

virtual void algo_base::finalize (  )  [inline, virtual, inherited]

Function called just after processing word.

Definition at line 52 of file algo_base.hh.

00052 {};

MSG::Level decoder_base::get_verbosity (  )  const [inline, inherited]

Getter for the verbosity level.

Definition at line 43 of file decoder_base.hh.

References decoder_base::_verbosity_level.

00043 {return _verbosity_level;};

virtual PMT::PMT_WORD algo_tpc_huffman::get_word_class ( const PMT::word_t  word  )  const [inline, virtual]

Override of algo_base::get_word_class method.

Reimplemented from algo_tpc_xmit.

Definition at line 16 of file algo_tpc_huffman.hh.

References PMT::CHANNEL_HEADER, PMT::CHANNEL_LAST_WORD, PMT::CHANNEL_WORD, PMT::EVENT_HEADER, PMT::EVENT_LAST_WORD, PMT::FEM_HEADER, PMT::FEM_LAST_WORD, and PMT::UNDEFINED_WORD.

Referenced by process_ch_word(), process_event_header(), process_event_last_word(), process_fem_header(), and process_word().

00016                                                                         {
00017     // One of core functions to identify PMT binary word format
00018     if( word == 0x0 ) return PMT::UNDEFINED_WORD;
00019     else if( (word & 0xffffffff) == 0xffffffff ) // Unique marker
00020       return PMT::EVENT_HEADER;
00021     else if( (word & 0xffffffff) == 0xe0000000 ) // Unique marker
00022       return PMT::EVENT_LAST_WORD;
00023     if( (word & 0xffff) == 0xffff )              // Unique marker
00024       return PMT::FEM_HEADER;
00025     else if( (word & 0xf000) == 0xf000 )         // Could be ADC word
00026       return PMT::FEM_HEADER;
00027     else if( !((word>>15) & 0x1) ) {
00028       
00029       if( (word & 0xf000) == 0x0000 )            // Uncompressed ADC word
00030     return PMT::CHANNEL_WORD;           
00031       else if( (word & 0xf000) == 0x4000 )       // Channel first word
00032     return PMT::CHANNEL_HEADER;
00033       else if( (word & 0xf000) == 0x5000 )       // Channel last word
00034     return PMT::CHANNEL_LAST_WORD;
00035       else
00036     return PMT::UNDEFINED_WORD;              // Undefined
00037     }
00038     else if( ((word>>15) & 0x1) ){
00039       if( (word & 0xffff) == 0xc000 )            // end of FEM word
00040     return PMT::FEM_LAST_WORD;
00041       else
00042     return PMT::CHANNEL_WORD;                // compressed ADC word
00043     }else
00044       return PMT::UNDEFINED_WORD;
00045   };

void algo_base::init_checker_info (  )  [protected, virtual, inherited]

Function to initialize checker information.

Definition at line 6 of file algo_base.cc.

References algo_base::_checksum, and algo_base::_nwords.

Referenced by algo_slow_readout_decoder::init_event_info(), algo_trig_decoder::reset(), and algo_base::reset().

00007 {
00008   _checksum=0x0;
00009   _nwords=0;
00010 }

virtual bool algo_tpc_xmit::is_compressed ( const PMT::word_t  word  )  [inline, protected, virtual, inherited]

Definition at line 81 of file algo_tpc_xmit.hh.

Referenced by algo_tpc_xmit::decode_ch_word().

00081 { return ( word & 0xf000 ); };

virtual bool algo_fem_decoder_base::is_event_empty (  )  [inline, virtual, inherited]

A simple method to inquire if the data storage buffer is currently empty or not.

Implements algo_base.

Definition at line 107 of file algo_fem_decoder_base.hh.

References algo_fem_decoder_base::_header_info, algo_fem_decoder_base::InfoFEM_t::event_id, and PMT::INVALID_WORD.

00107 { return (_header_info.event_id == PMT::INVALID_WORD);};

bool algo_tpc_huffman::process_ch_word ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, virtual]

A method to process 16-bit channel word.

Reimplemented from algo_tpc_xmit.

Definition at line 276 of file algo_tpc_huffman.cc.

References algo_tpc_xmit::_ch_data, algo_base::_checksum, algo_tpc_xmit::_event_data, algo_fem_decoder_base::_header_info, algo_base::_nwords, decoder_base::_verbosity, PMT::CHANNEL_HEADER, PMT::CHANNEL_LAST_WORD, tpc_waveform::channel_number(), tpc_waveform::clear_data(), MSG::DEBUG, algo_tpc_xmit::decode_ch_word(), MSG::ERROR, PMT::FEM_HEADER, PMT::FEM_LAST_WORD, get_word_class(), MSG::INFO, process_fem_last_word(), Message::send(), tpc_waveform::set_channel_number(), and algo_tpc_xmit::store_event().

Referenced by process_word().

00278 {
00279 
00280   //
00281   // This function expects either of three kinds:
00282   // ch header ... marked
00283   // ch data (adc) ... unmarked
00284   // ch last word ... marked
00285   //
00286   bool status = true;
00287   PMT::word_t word_class      = get_word_class(word);
00288   PMT::word_t last_word_class = get_word_class(last_word);
00289 
00290   // Check for zero-padding that is allowed after channel last word
00291   if(word == 0x0){
00292 
00293     if(get_word_class(last_word)!=PMT::CHANNEL_LAST_WORD){
00294 
00295       Message::send(MSG::ERROR,__FUNCTION__,
00296             Form("Unexpected Zero-padding found after %x",last_word));
00297       status = false;
00298     }else if(_verbosity[MSG::INFO])
00299      
00300       Message::send(MSG::INFO,__FUNCTION__,
00301             Form("Zero-padding found after %x",last_word));
00302     
00303     return status;
00304   }
00305 
00306   switch(word_class){
00307     
00308   case PMT::CHANNEL_HEADER:
00309    
00310     //
00311     // Check if the last word was event header or channel last word
00312     //
00313     if(last_word_class == PMT::FEM_HEADER ||
00314        last_word_class == PMT::CHANNEL_LAST_WORD ) {
00315       
00316       // New data starts here. 
00317       // Clear data content & assign channel number.
00318       _ch_data.clear_data();
00319 
00320       _ch_data.set_channel_number( (word & 0xfff) );
00321       
00322       if(_verbosity[MSG::DEBUG])
00323 
00324     Message::send(MSG::DEBUG,__FUNCTION__,
00325               Form("New channel header: %d",_ch_data.channel_number()));
00326       
00327     }else{
00328 
00329       Message::send(MSG::ERROR,__FUNCTION__,
00330             Form("Unexpected channel header (%x)! Last word = %x",word,last_word));
00331 
00332       status = false;
00333 
00334     }
00335 
00336     break;
00337 
00338   case PMT::CHANNEL_LAST_WORD:{
00339 
00340     // Check channel number is same as the header
00341     PMT::ch_number_t ch( (word & 0xfff) );
00342     if(ch == _ch_data.channel_number()) {
00343 
00344       if(_verbosity[MSG::DEBUG])
00345     
00346     Message::send(MSG::DEBUG,__FUNCTION__,
00347               Form("Finished reading %zu samples for Ch %d",
00348                _ch_data.size(),_ch_data.channel_number()));
00349       
00350       // Store
00351       _event_data->push_back(_ch_data);
00352       
00353       _ch_data.clear_data();
00354       
00355     }else{
00356 
00357     Message::send(MSG::ERROR,__FUNCTION__,
00358               Form("Ch. number disagreement! Header: %u ... Last: %u!",
00359                _ch_data.channel_number(),ch) );
00360     
00361     status = false;
00362     }
00363 
00364     // Attempt to store data if nwords matches with the expected number
00365     if(status && _nwords == _header_info.nwords){
00366       _nwords++;
00367       _checksum += word;
00368       status = store_event();
00369     }
00370 
00371     break;
00372   }
00373   case PMT::FEM_LAST_WORD:
00374     
00375     if(last_word_class == PMT::CHANNEL_LAST_WORD)
00376 
00377       status = process_fem_last_word(word,last_word);
00378 
00379     else status = decode_ch_word(word,last_word);
00380 
00381     break;
00382 
00383   default:
00384 
00385     status = decode_ch_word(word,last_word);
00386   }
00387 
00388   if(status && _header_info.nwords){
00389     
00390     _nwords++;
00391     _checksum += word;
00392 
00393   }    
00394 
00395   last_word = word;
00396 
00397   return status;
00398 }

bool algo_tpc_huffman::process_event_header ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, virtual]

A method to process 32-bit event header word.

Reimplemented from algo_tpc_xmit.

Definition at line 164 of file algo_tpc_huffman.cc.

References algo_tpc_xmit::_event_data, algo_base::_storage, MSG::ERROR, PMT::EVENT_LAST_WORD, storage_manager::get_data(), get_word_class(), Message::send(), and DATA_STRUCT::TPC_WF_COLLECTION.

Referenced by process_word().

00166 {
00167   bool status = true;
00168 
00169   if(!_event_data)
00170 
00171     _event_data = (tpc_wf_collection*)(_storage->get_data(DATA_STRUCT::TPC_WF_COLLECTION));
00172 
00173   else if(get_word_class(last_word)!=PMT::EVENT_LAST_WORD){
00174 
00175     Message::send(MSG::ERROR,__FUNCTION__,
00176           Form("Unexpected event header (%x) with the previous word %x!",word,last_word));
00177 
00178     status = false;
00179 
00180   }
00181 
00182   last_word = word;
00183 
00184   return status;
00185 }

bool algo_tpc_huffman::process_event_last_word ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, virtual]

A method to process 32-bit end-of-event word.

Store event @ this point.

Reimplemented from algo_tpc_xmit.

Definition at line 230 of file algo_tpc_huffman.cc.

References algo_fem_decoder_base::_header_info, PMT::CHANNEL_LAST_WORD, MSG::ERROR, get_word_class(), PMT::INVALID_WORD, and Message::send().

Referenced by process_word().

00232 {
00233   bool status = true;
00234   
00235   //
00236   // Make an explicit check.
00237   // Previous word should be the channel last word
00238   // By this point data should be saved and _header_info should be cleared.
00239   //
00240   PMT::word_t last_word_class = get_word_class(last_word);
00241 
00242   if(last_word_class != PMT::CHANNEL_LAST_WORD) {
00243 
00244     Message::send(MSG::ERROR,__FUNCTION__,
00245           Form("Unexpected event last word (%x) with the previous word %x!",word,last_word));
00246 
00247     status = false;
00248 
00249   }else if(_header_info.event_id!=PMT::INVALID_WORD){
00250 
00251     Message::send(MSG::ERROR,__FUNCTION__,
00252           Form("End of event (%x) ... but buffer holds data for event %d!",word,_header_info.event_id));
00253 
00254     status = false;
00255 
00256   }
00257 
00258   last_word = word;
00259 
00260   return status;
00261 }

bool algo_tpc_huffman::process_fem_header ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, virtual]

A method to process FEM header word passed from process_word method.

Reimplemented from algo_fem_decoder_base.

Definition at line 187 of file algo_tpc_huffman.cc.

References algo_fem_decoder_base::_event_header_count, algo_fem_decoder_base::_event_header_words, PMT::CHANNEL_LAST_WORD, algo_fem_decoder_base::decode_fem_header(), MSG::ERROR, PMT::EVENT_HEADER, PMT::FEM_HEADER, algo_fem_decoder_base::FEM_HEADER_COUNT, get_word_class(), and Message::send().

Referenced by process_word().

00189 {
00190   bool status = true;
00191   //
00192   // This function must be called for true FEM headers.
00193   // Hence we implement a strict check to make sure this is FEM header
00194   //
00195   PMT::word_t last_word_class = get_word_class(last_word);
00196 
00197   if(last_word_class != PMT::EVENT_HEADER &&
00198      last_word_class != PMT::FEM_HEADER &&
00199      last_word_class != PMT::CHANNEL_LAST_WORD) {
00200 
00201     Message::send(MSG::ERROR,__FUNCTION__,
00202           Form("Unexpected FEM header (%x) with the previous word %x!",word,last_word));
00203 
00204     status = false;
00205   }else if(get_word_class(word>>16)!=PMT::FEM_HEADER) {
00206 
00207     // Event header should come as a 32-bit word which is a pair of two 16-bit header words.
00208     // The first 16-bit is already checked by this point. Check the second part.
00209 
00210     Message::send(MSG::ERROR,__FUNCTION__,Form("Found an odd event header word: %x",word));
00211       
00212     status = false;    
00213   }else{
00214 
00215     _event_header_words[_event_header_count] = word;
00216 
00217     _event_header_count++;
00218 
00219     if(_event_header_count == FEM_HEADER_COUNT)
00220 
00221       status = decode_fem_header(_event_header_words);
00222   
00223   }
00224 
00225   last_word = word;
00226 
00227   return status;
00228 }

bool algo_tpc_huffman::process_fem_last_word ( const PMT::word_t  word,
PMT::word_t last_word 
) [protected, virtual]

A method to process 32-bit end-of-fem word.

Nothing to be done really.

Reimplemented from algo_tpc_xmit.

Definition at line 263 of file algo_tpc_huffman.cc.

References MSG::ERROR, and Message::send().

Referenced by process_ch_word().

00265 {
00266   //
00267   // This function should not be used as of now
00268   //
00269   Message::send(MSG::ERROR,__FUNCTION__,
00270         "This function should not be called...");
00271 
00272   last_word = word;
00273   return false;
00274 }

bool algo_tpc_huffman::process_word ( const PMT::word_t  word  )  [virtual]

Re-implementation of process_word.

All machinaries based on word maker are useless in case of huffman coded TPC data because an entire 15 bits are used for compressed data bits.

Reimplemented from algo_fem_decoder_base.

Definition at line 26 of file algo_tpc_huffman.cc.

References algo_base::_bt_mode, algo_base::_bt_nwords, algo_base::_bt_nwords_filled, algo_base::_bt_words, algo_base::_debug_mode, algo_tpc_xmit::_event_data, algo_fem_decoder_base::_header_info, algo_fem_decoder_base::_last_word, algo_base::_nwords, algo_fem_decoder_base::_search_for_next_event, algo_base::backtrace(), clear_event(), PMT::EVENT_HEADER, PMT::EVENT_LAST_WORD, PMT::FEM_HEADER, get_word_class(), process_ch_word(), process_event_header(), process_event_last_word(), process_fem_header(), Message::send(), algo_tpc_xmit::store_event(), and MSG::WARNING.

00026                                                         {
00027 
00028   // If in back_trace mode, add this word in record
00029   if(_bt_mode){
00030     
00031     // Check if buffer is filled
00032     if(!_bt_nwords_filled)
00033       _bt_nwords_filled = (_bt_nwords == _bt_words.size());
00034 
00035     // If filled, remove the oldest element
00036     if(_bt_nwords_filled)
00037       _bt_words.pop_front();
00038 
00039     // Add new word
00040     _bt_words.push_back(word);
00041 
00042   }
00043 
00044   if(word==0x0)
00045 
00046     return true;
00047 
00048   bool status = true;
00049   PMT::word_t word_class = get_word_class(word);
00050   PMT::word_t last_word_class = get_word_class(_last_word);
00051 
00052   if( _search_for_next_event ) {
00053     
00054     if( !(word_class == PMT::EVENT_HEADER && 
00055       last_word_class == PMT::EVENT_LAST_WORD ) ) {
00056       
00057       _last_word = word;
00058       return status;
00059     }
00060 
00061   }
00062 
00063 
00064 
00065   //
00066   // In case of huffman coded data stream, uniquely marked
00067   // words are only:
00068   // (*) event header
00069   // (*) event last word 
00070   // (*) channel header
00071   // (*) channel last word
00072   //
00073   switch(word_class){
00074 
00075   case PMT::EVENT_HEADER:
00076 
00077     if( (last_word_class == PMT::EVENT_LAST_WORD && !(_header_info.nwords)) || !(_event_data)) {
00078       
00079       _search_for_next_event = false;
00080       
00081       status = process_event_header(word,_last_word);
00082     }
00083     else{
00084 
00085       PMT::word_t first_word  = (word & 0xffff);
00086       PMT::word_t second_word = (word >> 16);
00087       
00088       status = process_ch_word(first_word,_last_word);
00089 
00090       if(status) status = process_ch_word(second_word,_last_word);
00091 
00092     }
00093 
00094     break;
00095 
00096   case PMT::FEM_HEADER:
00097 
00098     if(_nwords && _nwords == _header_info.nwords){
00099 
00100       _nwords++;
00101       status = store_event();
00102 
00103     }
00104 
00105     if(status){ 
00106 
00107       if(!(_header_info.nwords))
00108 
00109     status = process_fem_header(word,_last_word);
00110       
00111       else{
00112 
00113     PMT::word_t first_word  = (word & 0xffff);
00114     PMT::word_t second_word = (word >> 16);
00115     
00116     status = process_ch_word(first_word,_last_word);
00117     
00118     if(status) status = process_ch_word(second_word,_last_word);
00119     
00120       }
00121     }
00122 
00123     break;
00124     
00125   case PMT::EVENT_LAST_WORD:
00126 
00127     //if(last_word_class == PMT::CHANNEL_LAST_WORD){
00128 
00129     status = process_event_last_word(word,_last_word);
00130     break;
00131     //}
00132 
00133   default:
00134 
00135     PMT::word_t first_word  = (word & 0xffff);
00136     PMT::word_t second_word = (word >> 16);
00137     
00138     status = process_ch_word(first_word,_last_word);
00139     
00140     if(status) status = process_ch_word(second_word,_last_word);
00141 
00142   }
00143 
00144   if(!status){
00145 
00146     if(_bt_mode)
00147       backtrace();
00148 
00149     clear_event();
00150 
00151     if(_debug_mode){
00152 
00153       Message::send(MSG::WARNING,__FUNCTION__,"DEBUG MODE => Continue to next event...");
00154       
00155       _search_for_next_event = true;
00156 
00157     }
00158 
00159   }
00160 
00161   return status;
00162 }

void algo_tpc_huffman::reset (  )  [virtual]

Override function to reset the instance.

Reimplemented from algo_tpc_xmit.

Definition at line 12 of file algo_tpc_huffman.cc.

References algo_tpc_xmit::reset().

Referenced by algo_tpc_huffman().

00012                              {
00013 
00014   algo_tpc_xmit::reset();
00015 
00016 }

PMT::word_t algo_fem_decoder_base::round_diff ( PMT::word_t  ref_id,
PMT::word_t  subject_id,
PMT::word_t  diff 
) const [inherited]

A simple round-diff algorithm for binary words.

Definition at line 368 of file algo_fem_decoder_base.cc.

Referenced by algo_pmt_xmit::decode_ch_word(), and algo_fem_decoder_base::decode_fem_header().

00372 {
00373   // Used to recover pmt/trigger frame id from roll over effect.
00374   // One can test this by simply calling this function.
00375   // For instance, to test the behavior for a roll-over of 0x7 ...
00376   //
00377   // > root
00378   // root[0] gSystem->Load("libDecoder")
00379   // root[1] algo_slow_readout_decoder k
00380   // root [6] k.get_pmt_frame(583,584,0x7)
00381   // (const unsigned int)584
00382   // root [7] k.get_pmt_frame(584,583,0x7)
00383   // (const unsigned int)583
00384   //
00385   // I think this implementation works. ... Aug. 12 2013
00386   if( (subject_id > ref_id) && ((subject_id-ref_id) >= diff) )
00387     return subject_id - (diff+1);
00388   else if( (ref_id > subject_id) && ((ref_id-subject_id) >= diff) )    
00389     return subject_id + (diff+1);
00390   else
00391     return subject_id;
00392 
00393 }

virtual void algo_base::set_backtrace_mode ( size_t  nwords = 0  )  [inline, virtual, inherited]

Run utility: set back-trace mode. One should provide number of words to be stored.

Definition at line 65 of file algo_base.hh.

References algo_base::_bt_mode, and algo_base::_bt_nwords.

Referenced by main().

00065                                                   {
00066     _bt_nwords=nwords;
00067     _bt_mode=(bool)(nwords);
00068   };

void algo_base::set_debug_mode ( bool  doit  )  [inline, inherited]

Run utility: set debug mode. Children class defines what-to-do in debug mode.

Definition at line 59 of file algo_base.hh.

References algo_base::_debug_mode.

Referenced by decoder_manager::initialize().

00059 {_debug_mode=doit;};

void algo_base::set_storage_ptr ( storage_manager storage  )  [inline, inherited]

Expects a storage pointer to be provided from a parent class.

Definition at line 62 of file algo_base.hh.

References algo_base::_storage.

Referenced by decoder_manager::initialize().

00062 {_storage=storage;};

void decoder_base::set_verbosity ( MSG::Level  level  )  [inherited]

Setter for the verbosity level.

Reimplemented in ana_processor.

Definition at line 11 of file decoder_base.cc.

References decoder_base::_verbosity, decoder_base::_verbosity_level, MSG::DEBUG, MSG::ERROR, MSG::INFO, MSG::MSG_TYPE_MAX, MSG::NORMAL, and MSG::WARNING.

Referenced by algo_slow_readout_decoder::algo_slow_readout_decoder(), compare_content(), decoder_base::decoder_base(), decoder_manager::decoder_manager(), decoder_manager::initialize(), main(), xmit_event_search::run(), bin_word_search::run(), and ana_processor::set_verbosity().

00011                                               {
00012 
00013   _verbosity_level=level;
00014 
00015   for(size_t i=(size_t)(MSG::DEBUG); i<(size_t)(MSG::MSG_TYPE_MAX); ++i)
00016     _verbosity[i]=false;
00017 
00018   switch(level){
00019   case MSG::DEBUG:
00020     _verbosity[MSG::DEBUG]=true;
00021   case MSG::INFO:
00022     _verbosity[MSG::INFO]=true;
00023   case MSG::NORMAL:
00024     _verbosity[MSG::NORMAL]=true;
00025   case MSG::WARNING:
00026     _verbosity[MSG::WARNING]=true;
00027   case MSG::ERROR:
00028     _verbosity[MSG::ERROR]=true;
00029   case MSG::MSG_TYPE_MAX:
00030     break;
00031   }
00032 
00033 }

bool algo_tpc_xmit::store_event (  )  [protected, virtual, inherited]

A method to store event-wise data.

Implements algo_fem_decoder_base.

Definition at line 291 of file algo_tpc_xmit.cc.

References algo_tpc_xmit::_event_data, algo_fem_decoder_base::_header_info, algo_base::_storage, decoder_base::_verbosity, algo_tpc_xmit::check_event_quality(), algo_tpc_xmit::clear_event(), MSG::ERROR, tpc_wf_collection::event_id(), MSG::INFO, storage_manager::next_event(), Message::send(), tpc_wf_collection::set_checksum(), tpc_wf_collection::set_event_frame_id(), tpc_wf_collection::set_event_id(), tpc_wf_collection::set_module_address(), tpc_wf_collection::set_module_id(), tpc_wf_collection::set_nwords(), tpc_wf_collection::set_trigger_frame_id(), and tpc_wf_collection::set_trigger_timeslice().

Referenced by process_ch_word(), algo_tpc_xmit::process_event_header(), and process_word().

00291                                {
00292 //#########################################################
00293  
00294   bool status = check_event_quality();
00295 
00296   // Store if condition is satisfied
00297   if(status) {
00298 
00299     if(_verbosity[MSG::INFO]){
00300 
00301       Message::send(MSG::INFO,__FUNCTION__,
00302             Form("Storing event %u with %zu channel entries...",
00303              _event_data->event_id(), _event_data->size()));
00304 
00305     }
00306 
00307     _event_data->set_module_address    ( _header_info.module_address    );
00308     _event_data->set_module_id         ( _header_info.module_id         );
00309     _event_data->set_event_id          ( _header_info.event_id          );
00310     _event_data->set_event_frame_id    ( _header_info.event_frame_id    );
00311     _event_data->set_trigger_frame_id  ( _header_info.trigger_frame_id  );
00312     _event_data->set_trigger_timeslice ( _header_info.trigger_timeslice );
00313     _event_data->set_nwords            ( _header_info.nwords            );
00314     _event_data->set_checksum          ( _header_info.checksum          );
00315 
00316     status = _storage->next_event();
00317 
00318   }else{
00319     
00320     Message::send(MSG::ERROR,__FUNCTION__,
00321           Form("Skipping to store event %d...",_header_info.event_id));
00322 
00323     status = false;
00324     
00325   }
00326 
00327   clear_event();
00328 
00329   return status;
00330 }


Member Data Documentation

bool algo_base::_bt_mode [protected, inherited]

Back-trace mode boolean holder.

Definition at line 109 of file algo_base.hh.

Referenced by algo_base::algo_base(), algo_trig_decoder::process_word(), process_word(), algo_slow_readout_decoder::process_word(), algo_fem_decoder_base::process_word(), and algo_base::set_backtrace_mode().

size_t algo_base::_bt_nwords [protected, inherited]

user defined # of words to be temporarily stored in the buffer

Definition at line 133 of file algo_base.hh.

Referenced by algo_base::algo_base(), algo_base::backtrace_mode(), algo_trig_decoder::process_word(), process_word(), algo_slow_readout_decoder::process_word(), algo_fem_decoder_base::process_word(), and algo_base::set_backtrace_mode().

bool algo_base::_bt_nwords_filled [protected, inherited]

run utility boolean to keep a recored of filled buffer

Definition at line 134 of file algo_base.hh.

Referenced by algo_base::algo_base(), algo_trig_decoder::process_word(), process_word(), algo_slow_readout_decoder::process_word(), and algo_fem_decoder_base::process_word().

std::deque<PMT::word_t> algo_base::_bt_words [protected, inherited]

processed words to be stored event-wise for back-trace purpose

Definition at line 132 of file algo_base.hh.

Referenced by algo_base::backtrace(), algo_trig_decoder::process_word(), process_word(), algo_slow_readout_decoder::process_word(), and algo_fem_decoder_base::process_word().

char decoder_base::_buf[200] [protected, inherited]

char buffer for message manipulation

Definition at line 46 of file decoder_base.hh.

Referenced by reco_wf::analyze(), pulse_viewer::analyze(), algo_slow_readout_decoder::check_event_quality(), storage_manager::close(), bin_io_handler::close(), decoder_manager::decode(), algo_slow_readout_decoder::decode_ch_word(), algo_pmt_xmit::decode_ch_word(), algo_slow_readout_decoder::decode_event_header(), pulse_viewer::get_waveform(), ana_processor::initialize(), pulse_viewer::next_pulse(), storage_manager::open(), bin_io_handler::open(), storage_manager::prepare_tree(), pulse_viewer::previous_pulse(), algo_slow_readout_decoder::print_adc_values(), algo_tpc_xmit::process_ch_word(), algo_slow_readout_decoder::process_ch_word(), algo_pmt_xmit::process_ch_word(), algo_fem_decoder_base::process_fem_header(), algo_xmit_decoder::process_header(), algo_slow_readout_decoder::process_header(), algo_slow_readout_decoder::process_word(), bin_io_handler::read_multi_word(), bin_io_handler::read_word(), and ana_processor::run().

tpc_waveform algo_tpc_xmit::_ch_data [protected, inherited]

Definition at line 108 of file algo_tpc_xmit.hh.

Referenced by algo_tpc_xmit::clear_event(), algo_tpc_xmit::decode_ch_word(), algo_tpc_xmit::process_ch_word(), process_ch_word(), and algo_tpc_xmit::reset().

PMT::word_t algo_base::_checksum [protected, inherited]

data checksum

Definition at line 126 of file algo_base.hh.

Referenced by algo_tpc_xmit::check_event_quality(), algo_slow_readout_decoder::check_event_quality(), algo_pmt_xmit::check_event_quality(), algo_slow_readout_decoder::decode_event_header(), algo_fem_decoder_base::decode_fem_header(), algo_base::init_checker_info(), algo_tpc_xmit::process_ch_word(), process_ch_word(), algo_slow_readout_decoder::process_ch_word(), algo_pmt_xmit::process_ch_word(), and algo_trig_decoder::process_word().

bool algo_base::_debug_mode [protected, inherited]

Debug mode boolean holder.

Definition at line 108 of file algo_base.hh.

Referenced by algo_base::algo_base(), algo_slow_readout_decoder::process_ch_word(), algo_fem_decoder_base::process_fem_header(), algo_slow_readout_decoder::process_header(), algo_trig_decoder::process_word(), process_word(), algo_slow_readout_decoder::process_word(), algo_fem_decoder_base::process_word(), and algo_base::set_debug_mode().

tpc_wf_collection* algo_tpc_xmit::_event_data [protected, inherited]

Definition at line 110 of file algo_tpc_xmit.hh.

Referenced by algo_tpc_xmit::clear_event(), algo_tpc_xmit::process_ch_word(), process_ch_word(), algo_tpc_xmit::process_event_header(), process_event_header(), process_word(), algo_tpc_xmit::reset(), and algo_tpc_xmit::store_event().

size_t algo_fem_decoder_base::_event_header_count [protected, inherited]

A counter for event header words.

Definition at line 171 of file algo_fem_decoder_base.hh.

Referenced by algo_fem_decoder_base::clear_event(), process_fem_header(), algo_fem_decoder_base::process_fem_header(), and algo_fem_decoder_base::reset().

PMT::word_t algo_fem_decoder_base::_event_header_words[FEM_HEADER_COUNT] [protected, inherited]

Event header word holder.

Definition at line 165 of file algo_fem_decoder_base.hh.

Referenced by process_fem_header(), algo_fem_decoder_base::process_fem_header(), and algo_fem_decoder_base::reset().

InfoFEM_t algo_fem_decoder_base::_header_info [protected, inherited]

Definition at line 174 of file algo_fem_decoder_base.hh.

Referenced by algo_tpc_xmit::check_event_quality(), algo_pmt_xmit::check_event_quality(), algo_fem_decoder_base::clear_event(), algo_fem_decoder_base::decode_fem_header(), algo_fem_decoder_base::is_event_empty(), process_ch_word(), process_event_last_word(), process_word(), algo_fem_decoder_base::process_word(), algo_tpc_xmit::store_event(), and algo_pmt_xmit::store_event().

PMT::word_t algo_fem_decoder_base::_last_word [protected, inherited]

Last word processed.

Definition at line 170 of file algo_fem_decoder_base.hh.

Referenced by process_word(), algo_fem_decoder_base::process_word(), and algo_fem_decoder_base::reset().

std::string decoder_base::_name [protected, inherited]

class name holder

Definition at line 53 of file decoder_base.hh.

Referenced by algo_base::algo_base(), algo_fem_decoder_base::algo_fem_decoder_base(), algo_fixed_window::algo_fixed_window(), algo_slow_readout_decoder::algo_slow_readout_decoder(), algo_threshold::algo_threshold(), algo_tpc_huffman(), algo_trig_decoder::algo_trig_decoder(), ana_base::ana_base(), ana_processor::ana_processor(), beamgate_debugger::beamgate_debugger(), bin_io_handler::bin_io_handler(), decoder_base::class_name(), led_pulse_analyzer::led_pulse_analyzer(), led_pulse_selector::led_pulse_selector(), pmt_slow_encoder::pmt_slow_encoder(), pmtbaseline::pmtbaseline(), pmtbaseline_ana::pmtbaseline_ana(), preco_algo_base::preco_algo_base(), pulse_analyzer::pulse_analyzer(), pulse_reco::pulse_reco(), pulse_selector_base::pulse_selector_base(), pulse_selector_simple::pulse_selector_simple(), pulse_viewer::pulse_viewer(), reco_wf::reco_wf(), storage_manager::storage_manager(), and waveform_sampler::waveform_sampler().

PMT::word_t algo_base::_nwords [protected, inherited]

number of data word counts processed

Definition at line 127 of file algo_base.hh.

Referenced by algo_tpc_xmit::check_event_quality(), algo_slow_readout_decoder::check_event_quality(), algo_pmt_xmit::check_event_quality(), algo_slow_readout_decoder::decode_event_header(), algo_fem_decoder_base::decode_fem_header(), algo_base::init_checker_info(), algo_tpc_xmit::process_ch_word(), process_ch_word(), algo_slow_readout_decoder::process_ch_word(), algo_pmt_xmit::process_ch_word(), algo_pmt_xmit::process_fem_last_word(), algo_trig_decoder::process_word(), and process_word().

bool algo_fem_decoder_base::_search_for_next_event [protected, inherited]

A run control boolean: skips any action till it finds the new event header.

Definition at line 173 of file algo_fem_decoder_base.hh.

Referenced by process_word(), algo_fem_decoder_base::process_word(), and algo_fem_decoder_base::reset().

bool algo_tpc_huffman::_search_header [protected]

Definition at line 78 of file algo_tpc_huffman.hh.

Referenced by clear_event().

storage_manager* algo_base::_storage [protected, inherited]

Data storage pointer to be provided by a parent process.

Definition at line 121 of file algo_base.hh.

Referenced by algo_base::algo_base(), algo_slow_readout_decoder::process_ch_word(), algo_tpc_xmit::process_event_header(), process_event_header(), algo_pmt_xmit::process_event_header(), algo_trig_decoder::process_word(), algo_slow_readout_decoder::process_word(), algo_base::reset(), algo_base::set_storage_ptr(), algo_tpc_xmit::store_event(), and algo_pmt_xmit::store_event().

bool decoder_base::_verbosity[MSG::MSG_TYPE_MAX] [protected, inherited]

holder for enabled message levels

Definition at line 51 of file decoder_base.hh.

Referenced by reco_wf::analyze(), algo_slow_readout_decoder::check_event_quality(), storage_manager::close(), decoder_manager::decode(), algo_slow_readout_decoder::decode_ch_word(), algo_pmt_xmit::decode_ch_word(), algo_slow_readout_decoder::decode_event_header(), algo_fem_decoder_base::decode_fem_header(), algo_trig_decoder::decode_trigger_words(), decoder_manager::finalize(), beamgate_debugger::finalize(), ana_processor::finalize(), decoder_manager::initialize(), beamgate_debugger::initialize(), ana_processor::initialize(), storage_manager::open(), beamgate_debugger::prepare_histo(), storage_manager::prepare_tree(), algo_tpc_xmit::process_ch_word(), process_ch_word(), algo_slow_readout_decoder::process_ch_word(), algo_pmt_xmit::process_ch_word(), algo_tpc_xmit::process_event_last_word(), algo_pmt_xmit::process_event_last_word(), algo_fem_decoder_base::process_fem_header(), algo_pmt_xmit::process_fem_last_word(), algo_xmit_decoder::process_header(), algo_slow_readout_decoder::process_header(), algo_fem_decoder_base::process_word(), bin_io_handler::read_multi_word(), storage_manager::reset(), beamgate_debugger::reset(), ana_processor::reset(), decoder_manager::run(), ana_processor::run(), decoder_base::set_verbosity(), algo_tpc_xmit::store_event(), and algo_pmt_xmit::store_event().

MSG::Level decoder_base::_verbosity_level [protected, inherited]

holder for specified verbosity level

Definition at line 52 of file decoder_base.hh.

Referenced by pulse_viewer::analyze(), decoder_base::get_verbosity(), pulse_viewer::initialize(), decoder_manager::initialize(), ana_processor::initialize(), bin_io_handler::read_multi_word(), bin_io_handler::read_word(), and decoder_base::set_verbosity().

const size_t algo_base::BEAM_NWORDS = 21 [static, protected, inherited]

Defines # of minimum words to identify beamgate event.

Definition at line 115 of file algo_base.hh.

Referenced by algo_slow_readout_decoder::apply_beamgate_correction(), and algo_slow_readout_decoder::store_ch_data().

const size_t algo_base::BEAM_REF_CHANNEL = 39 [static, protected, inherited]

Defines a reference channel for beamgate.

Definition at line 114 of file algo_base.hh.

Referenced by algo_slow_readout_decoder::store_ch_data().

const size_t algo_fem_decoder_base::FEM_HEADER_COUNT = 6 [static, protected, inherited]

Number of event header words.

Definition at line 159 of file algo_fem_decoder_base.hh.

Referenced by process_fem_header(), algo_fem_decoder_base::process_fem_header(), and algo_fem_decoder_base::reset().

const size_t algo_base::FRAME_WIDTH = 8192 [static, protected, inherited]

Defines # of ADC samples per readout frame.

Definition at line 116 of file algo_base.hh.

Referenced by algo_slow_readout_decoder::apply_beamgate_correction().


The documentation for this class was generated from the following files:
Generated on Mon Apr 7 15:35:12 2014 for MyProject by  doxygen 1.4.7