Ignore:
Timestamp:
11/01/11 14:59:46 (13 years ago)
Author:
neise
Message:
adjusted fbsl for ISDC cluster .. I basically renamed a few variables and generally tidied up a bit ... not sure what actually helped... maybe its still not solved.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/factfir.C

    r12304 r12356  
    22#include <deque>
    33
    4 
    5 #ifndef FAD_MAX_SAMPLES
    6         #warning FAD_MAX_SAMPLES not defined. defining: FAD_MAX_SAMPLES to 1024
    7         #define FAD_MAX_SAMPLES 1024
    8 #endif
    9 
    104// source vector is
    11 // float Ameas[FAD_MAX_SAMPLES];
    125void factfir(double b, vector<double> &a, int k, vector<float> &source, vector<float> &dest){
    136        //dest.clear();
    147
    15         for (int slice =0; slice < FAD_MAX_SAMPLES; slice++) {
     8        for (int slice =0; slice < (int)source.size(); slice++) {
    169                float currentval = 0;
    1710
    1811                for (int i=0; i < k ; i++){
    19                         currentval += a[i] * source[ (slice - i + FAD_MAX_SAMPLES) % FAD_MAX_SAMPLES ];
     12                        currentval += a[i] * source[ (slice - i + source.size()) % source.size() ];
    2013                }
    2114                dest[slice] = currentval / b;
Note: See TracChangeset for help on using the changeset viewer.