#ifndef CALCULATE_DRIFT_SIGNAL_1_1_2007 #define CALCULATE_DRIFT_SIGNAL_1_1_2007 /** @class CalcDrift.h @author Brian Magill @creation date 1/1/2007 $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 Calculates the drift signal for a given channel */ #include "ChannelSignals.h" #include "DriftParam.h" class CalcDrift { private: double start_time; // starting time of interval mutable double end_time; // ending time of interval double ref_time; // reference time where drift corrections are applied double minInterval; // minimum interval allowed for calculation unsigned long start_index(std::valarray const &time) const; unsigned long end_index(std::valarray const &time) const; public: CalcDrift(): start_time(0), end_time(0), ref_time(0), minInterval(0) { }; CalcDrift(double start, double finis, double tRef, double min): start_time(start), end_time(finis), ref_time(tRef), minInterval(min) { }; CalcDrift(const CalcDrift &rhs): start_time(rhs.start_time), end_time(rhs.end_time), ref_time(rhs.ref_time), minInterval(rhs.minInterval){ }; CalcDrift const & operator = (const CalcDrift &rhs) { if (this == &rhs) return *this; start_time = rhs.start_time; end_time = rhs.end_time; ref_time = rhs.ref_time; minInterval= rhs.minInterval; return *this; } ~CalcDrift() { }; void operator()(std::valarray const &time, ChannelSignals const &in, DriftParam &, std::string &comments) const; }; #endif