Home
Install
Use
Develop
Support
News
Credits
hosted by
|
11 #ifndef __ExcisionUnpacker_excision_unpack_h
12 #define __ExcisionUnpacker_excision_unpack_h
14 #include "dsp/ExcisionUnpacker.h"
21 template< class U, class Iter>
33 cerr << "dsp::ExcisionUnpacker::excision_unpack in=" << input_data.ptr()
34 << " out=" << output_data << " nfloat=" << nfloat << "\n\t"
35 << " hist=" << hist << " weights=" << weights
36 << " nweights=" << nweights << endl;
38 const unsigned ndim_dig = get_ndim_per_digitizer();
39 const unsigned nfloat_per_weight = get_ndat_per_weight() * ndim_dig;
40 const unsigned long n_weights = nfloat / nfloat_per_weight;
42 assert (nfloat % nfloat_per_weight == 0);
44 if (weights && n_weights > nweights)
45 throw Error (InvalidParam, "dsp::ExcisionUnpacker::excision_unpack",
46 "weights array size=%d < nweights=%d", nweights, n_weights);
48 const unsigned output_incr = get_output_incr ();
50 const unsigned hist_size = get_ndat_per_weight();
54 for ( unsigned long wt=0; wt<n_weights; wt++)
61 unpack.prepare (input_data, nfloat_per_weight);
64 unpack.unpack (input_data, nfloat_per_weight,
65 output_data, output_incr, n_low);
71 if (hist && n_low < hist_size)
84 n_low<nlow_min || n_low>nlow_max ||
85 (weights && weights[wt] == 0) )
88 cerr << "w[" << wt << "]=0 ";
95 for ( unsigned ifloat=0; ifloat<nfloat_per_weight; ifloat++)
96 output_data [ifloat * output_incr] = 0.0;
99 output_data += nfloat_per_weight * output_incr;
103 cerr << "DONE!" << endl;
void excision_unpack(U &unpack, Iterator &input, float *output_data, uint64_t ndat, unsigned long *hist, unsigned *weights, unsigned nweights) Template method can be used to implement pure virtual dig_unpack.
Generated using doxygen 1.8.17
|