Changeset 12356 for fact/tools/rootmacros/factfir.C
- Timestamp:
- 11/01/11 14:59:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/factfir.C
r12304 r12356 2 2 #include <deque> 3 3 4 5 #ifndef FAD_MAX_SAMPLES6 #warning FAD_MAX_SAMPLES not defined. defining: FAD_MAX_SAMPLES to 10247 #define FAD_MAX_SAMPLES 10248 #endif9 10 4 // source vector is 11 // float Ameas[FAD_MAX_SAMPLES];12 5 void factfir(double b, vector<double> &a, int k, vector<float> &source, vector<float> &dest){ 13 6 //dest.clear(); 14 7 15 for (int slice =0; slice < FAD_MAX_SAMPLES; slice++) {8 for (int slice =0; slice < (int)source.size(); slice++) { 16 9 float currentval = 0; 17 10 18 11 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() ]; 20 13 } 21 14 dest[slice] = currentval / b;
Note:
See TracChangeset
for help on using the changeset viewer.