CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalFenixPeakFinder Class Reference

calculates the peak for Fenix strip, barrel input : 18 bits output: boolean More...

#include <EcalFenixPeakFinder.h>

Public Member Functions

 EcalFenixPeakFinder ()
 
 EcalFenixPeakFinder ()
 
virtual std::vector< int > process (std::vector< int > &filtout, std::vector< int > &output)
 
virtual std::vector< int > process (std::vector< int > &filtout, std::vector< int > &output)
 
virtual ~EcalFenixPeakFinder ()
 
virtual ~EcalFenixPeakFinder ()
 

Private Member Functions

int process ()
 
int process ()
 
int setInput (int input)
 
int setInput (int input)
 

Private Attributes

int buffer_ [3]
 
bool disabled
 
int inputsAlreadyIn_
 

Detailed Description

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.

Constructor & Destructor Documentation

EcalFenixPeakFinder::EcalFenixPeakFinder ( )

Definition at line 4 of file EcalFenixPeakFinder.cc.

EcalFenixPeakFinder::~EcalFenixPeakFinder ( )
virtual

Definition at line 9 of file EcalFenixPeakFinder.cc.

9  {
10 }
EcalFenixPeakFinder::EcalFenixPeakFinder ( )
virtual EcalFenixPeakFinder::~EcalFenixPeakFinder ( )
virtual

Member Function Documentation

int EcalFenixPeakFinder::process ( )
private

Definition at line 31 of file EcalFenixPeakFinder.cc.

References buffer_, and inputsAlreadyIn_.

Referenced by process(), EcalFenixStrip::process_part1(), and EcalEBTrigPrimTestAlgo::run().

32 {
33 
34  if(inputsAlreadyIn_<3) return 0;
35  if(buffer_[1]>buffer_[0] && buffer_[1]>buffer_[2]) return 1;
36  else return 0;
37 
38 }
int EcalFenixPeakFinder::process ( )
private
virtual std::vector<int> EcalFenixPeakFinder::process ( std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual
std::vector< int > EcalFenixPeakFinder::process ( std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

Definition at line 40 of file EcalFenixPeakFinder.cc.

References buffer_, mps_fire::i, inputsAlreadyIn_, convertSQLitetoXML_cfg::output, process(), and setInput().

41 {
42 
43  // FIXME: 3
45  for (unsigned int i =0;i<3;i++) buffer_[i]=0;
46 
47  // std::vector<int> output;
48 
49  //std::cout << " EcalFenixPeakFinder::process( " << filtout.size() << std::endl;
50  // attention, we have to shift by one, because the peak is found one too late
51  for (unsigned int i =0;i<filtout.size();i++){
52 
53  setInput(filtout[i]);
54  for (unsigned int i =0;i<3;i++){
55  // std::cout << " buffer_ " << buffer_[i];
56  }
57  //std::cout << " " << std::endl;
58 
59  if (i>0) {
60  // int outone = process();
61  // output.push_back(outone);
62  output[i-1]= process();
63  }
64  }
65  // output.resize(filtout.size());
66 
67  return output;
68 }
int EcalFenixPeakFinder::setInput ( int  input)
private

Definition at line 12 of file EcalFenixPeakFinder.cc.

References buffer_, mps_fire::i, input, and inputsAlreadyIn_.

Referenced by process().

13 {
14  if(inputsAlreadyIn_<3)
15  {
16  //std::cout << " EcalFenixPeakFinder::setInput inputsAlreadyIn_<3 input " << input << std::endl;
19  }
20  else
21  {
22  for(int i=0; i<2; i++) {
23  buffer_[i]=buffer_[i+1];
24  //std::cout << " EcalFenixPeakFinder::setInput inputsAlreadyIn buffer " << buffer_[i] << std::endl;
25  }
26  buffer_[2]=input;
27  }
28  return 1;
29 }
static std::string const input
Definition: EdmProvDump.cc:48
int EcalFenixPeakFinder::setInput ( int  input)
private

Member Data Documentation

int EcalFenixPeakFinder::buffer_
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().