/usr/include/CLAM/qtmonitors/PolarChromaPeaksMonitor.hxx is in libclam-qtmonitors-dev 1.4.0-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #ifndef PolarChromaPeaksMonitor_hxx
#define PolarChromaPeaksMonitor_hxx
#include <vector>
#include <CLAM/DataTypes.hxx>
#include "PeakDataSource.hxx"
#include <CLAM/PortMonitor.hxx>
class PolarChromaPeaksMonitor : public CLAM::PortMonitor<std::vector<std::pair<CLAM::TData,CLAM::TData> > >, public PeakDataSource
{
const char* GetClassName() const { return "PolarChromaPeaks"; };
const std::string & getLabel(unsigned bin) const
{
static std::string a("A");
return a;
}
const CLAM::TData * positionData()
{
_peaks = FreezeAndGetData();
UnfreezeData();
_size = _peaks.size();
_pos.resize(_size);
_value.resize(_size);
for (unsigned i=0; i<_size; i++)
{
_pos[i] = _peaks[i].first;
_value[i] = _peaks[i].second;
}
return &_pos[0];
}
const CLAM::TData * magnitudeData()
{
return &_value[0];
}
unsigned nBins() const
{
return _size;
}
bool isEnabled() const
{
return IsRunning();
}
private:
unsigned _size;
std::vector<std::pair<CLAM::TData,CLAM::TData> > _peaks;
std::vector<CLAM::TData> _pos;
std::vector<CLAM::TData> _value;
};
#endif//PolarChromaPeaksMonitor_hxx
|