calculates the peak for Fenix strip, barrel input : 18 bits output: boolean More...
#include <EcalFenixPeakFinder.h>
Public Member Functions | |
EcalFenixPeakFinder () | |
virtual std::vector< int > | process (std::vector< int > &filtout, std::vector< int > &output) |
virtual | ~EcalFenixPeakFinder () |
Private Member Functions | |
int | process () |
int | setInput (int input) |
Private Attributes | |
int | buffer_ [3] |
bool | disabled |
int | inputsAlreadyIn_ |
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
\ class EcalFenixPeakFinder --->gets the sample where the value is max. the value is 1 for this max sample, 0 for the others .needs 3 samples to proceed. ----> do we really need caloVShape?
Definition at line 16 of file EcalFenixPeakFinder.h.
EcalFenixPeakFinder::EcalFenixPeakFinder | ( | ) |
Definition at line 3 of file EcalFenixPeakFinder.cc.
:inputsAlreadyIn_(0){ }
EcalFenixPeakFinder::~EcalFenixPeakFinder | ( | ) | [virtual] |
Definition at line 8 of file EcalFenixPeakFinder.cc.
{ }
int EcalFenixPeakFinder::process | ( | ) | [private] |
Definition at line 26 of file EcalFenixPeakFinder.cc.
References buffer_, and inputsAlreadyIn_.
Referenced by process(), and EcalFenixStrip::process_part1().
{ if(inputsAlreadyIn_<3) return 0; if(buffer_[1]>buffer_[0] && buffer_[1]>buffer_[2]) return 1; else return 0; }
std::vector< int > EcalFenixPeakFinder::process | ( | std::vector< int > & | filtout, |
std::vector< int > & | output | ||
) | [virtual] |
Definition at line 35 of file EcalFenixPeakFinder.cc.
References buffer_, i, inputsAlreadyIn_, convertSQLitetoXML_cfg::output, process(), and setInput().
{ // FIXME: 3 inputsAlreadyIn_=0; for (unsigned int i =0;i<3;i++) buffer_[i]=0; // std::vector<int> output; // attention, we have to shift by one, because the peak is found one too late for (unsigned int i =0;i<filtout.size();i++){ setInput(filtout[i]); if (i>0) { // int outone = process(); // output.push_back(outone); output[i-1]= process(); } } // output.resize(filtout.size()); return output; }
int EcalFenixPeakFinder::setInput | ( | int | input | ) | [private] |
Definition at line 11 of file EcalFenixPeakFinder.cc.
References buffer_, i, collect_tpl::input, and inputsAlreadyIn_.
Referenced by process().
{ if(inputsAlreadyIn_<3) { buffer_[inputsAlreadyIn_]=input; inputsAlreadyIn_++; } else { for(int i=0; i<2; i++) buffer_[i]=buffer_[i+1]; buffer_[2]=input; } return 1; }
int EcalFenixPeakFinder::buffer_[3] [private] |
Definition at line 24 of file EcalFenixPeakFinder.h.
Referenced by process(), and setInput().
bool EcalFenixPeakFinder::disabled [private] |
Definition at line 19 of file EcalFenixPeakFinder.h.
int EcalFenixPeakFinder::inputsAlreadyIn_ [private] |
Definition at line 23 of file EcalFenixPeakFinder.h.
Referenced by process(), and setInput().