preco_algo_base.cc File Reference

#include "preco_algo_base.hh"

Go to the source code of this file.

Functions

bool check_index (const std::vector< UShort_t > *wf, const size_t &begin, size_t &end)


Function Documentation

bool check_index ( const std::vector< UShort_t > *  wf,
const size_t &  begin,
size_t &  end 
)

Definition at line 7 of file preco_algo_base.cc.

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

Referenced by preco_algo_base::integral(), preco_algo_base::max(), and preco_algo_base::min().

00009 {
00010   if(begin >= wf->size() || end >= wf->size() || begin > end){
00011 
00012     Message::send(MSG::ERROR,__FUNCTION__,
00013           Form("Invalid arguments: waveform length = %zu, begin = %zu, end = %zu!",
00014                wf->size(), begin, end));
00015     return false;
00016 
00017   }
00018 
00019   if(!end) end = wf->size() - 1;
00020 
00021   return true;
00022 }


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