FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
PndEmcPSAFPGAFilterCF Class Reference

#include <PndEmcPSAFPGAFilterCF.h>

Inheritance diagram for PndEmcPSAFPGAFilterCF:
PndEmcPSAFPGAFilterLine

Public Member Functions

 PndEmcPSAFPGAFilterCF ()
 
virtual ~PndEmcPSAFPGAFilterCF ()
 
void set (unsigned int newBufferSize, float newRatio)
 
void resetToZero ()
 
virtual float put (float valueToStore)
 

Private Attributes

std::vector< float > buffer
 
unsigned int bpointer
 
float ratio
 

Detailed Description

Definition at line 7 of file PndEmcPSAFPGAFilterCF.h.

Constructor & Destructor Documentation

PndEmcPSAFPGAFilterCF::PndEmcPSAFPGAFilterCF ( )

Definition at line 3 of file PndEmcPSAFPGAFilterCF.cxx.

3  :
4  buffer(0)
5  ,bpointer(0)
6 {
7 }
std::vector< float > buffer
PndEmcPSAFPGAFilterCF::~PndEmcPSAFPGAFilterCF ( )
virtual

Definition at line 9 of file PndEmcPSAFPGAFilterCF.cxx.

References buffer.

10 {
11  buffer.resize(0);
12 }
std::vector< float > buffer

Member Function Documentation

float PndEmcPSAFPGAFilterCF::put ( float  valueToStore)
virtual

Implements PndEmcPSAFPGAFilterLine.

Definition at line 30 of file PndEmcPSAFPGAFilterCF.cxx.

References bpointer, buffer, and ratio.

Referenced by PndEmcPSAFPGADigitalFilterAnalyser::put(), PndEmcPSAFPGAIntegratingAnalyser::put(), and PndEmcPSAFPGAPileupAnalyser::put().

30  {
31  bpointer %= buffer.size();
32  float cfd = buffer[bpointer] - ratio * valueToStore;
33  buffer[bpointer] = valueToStore;
34  bpointer++;
35  return cfd;
36 };
std::vector< float > buffer
void PndEmcPSAFPGAFilterCF::resetToZero ( )

Definition at line 23 of file PndEmcPSAFPGAFilterCF.cxx.

References bpointer, buffer, and i.

Referenced by PndEmcPSAFPGADigitalFilterAnalyser::reset(), PndEmcPSAFPGAIntegratingAnalyser::reset(), and PndEmcPSAFPGAPileupAnalyser::reset().

24 {
25  bpointer = 0;
26  for(unsigned int i=0; i<buffer.size(); i++)
27  buffer[i]=0;
28 }
Int_t i
Definition: run_full.C:25
std::vector< float > buffer
void PndEmcPSAFPGAFilterCF::set ( unsigned int  newBufferSize,
float  newRatio 
)

Definition at line 14 of file PndEmcPSAFPGAFilterCF.cxx.

References bpointer, buffer, i, and ratio.

Referenced by PndEmcPSAFPGASampleAnalyser::init().

15 {
16  buffer.resize(newBufferSize);
17  for(unsigned int i=0; i<newBufferSize; i++)
18  buffer[i]=0;
19  ratio = newRatio;
20  bpointer=0;
21 }
Int_t i
Definition: run_full.C:25
std::vector< float > buffer

Member Data Documentation

unsigned int PndEmcPSAFPGAFilterCF::bpointer
private

Definition at line 17 of file PndEmcPSAFPGAFilterCF.h.

Referenced by put(), resetToZero(), and set().

std::vector<float> PndEmcPSAFPGAFilterCF::buffer
private

Definition at line 16 of file PndEmcPSAFPGAFilterCF.h.

Referenced by put(), resetToZero(), set(), and ~PndEmcPSAFPGAFilterCF().

float PndEmcPSAFPGAFilterCF::ratio
private

Definition at line 18 of file PndEmcPSAFPGAFilterCF.h.

Referenced by put(), and set().


The documentation for this class was generated from the following files: