#ifndef CHANNEL_SIGNALS_CLASS_11_17_2006 #define CHANNEL_SIGNALS_CLASS_11_17_2006 /** @class ChannelSignals.h @author Brian Magill @creation date 11/17/2006 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief Data class for one channel. Contains strong, weak, and difference signals */ #include #include #include //#include "SOFIE_namespace.h" class ChannelSignals { private: int gasID; std::vector atten; std::vector > signalData; public: ChannelSignals():gasID(-999), atten(0), signalData(0) { }; ChannelSignals(int id, double strong_atten, double weak_atten, std::valarray const &strong, std::valarray const &weak, std::valarray const &diff) { gasID = id; atten.push_back(strong_atten); atten.push_back(weak_atten); signalData.push_back(strong); signalData.push_back(weak); signalData.push_back(diff); }; ChannelSignals(ChannelSignals const &rhs); ChannelSignals const & operator = (ChannelSignals const &rhs); ~ ChannelSignals() { }; void getSignal(int type, std::valarray &v_out) const; std::valarray getSignal(int type) const; unsigned long size() const { return signalData.size() ? signalData.at(0).size():0; }; int getID() const {return gasID; }; double getAttenuation(int type) const { return atten.at(type); }; double average(int type) const; double rms(int type) const; void dump() const; }; #endif