/****************************************************************************** * Copyright (c) 2006 Hewlett-Packard Development Company, L.P. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE ********************************************************************************/ /****************************************************************************** * SVN MACROS * * $LastChangedDate: 2008-07-18 15:00:39 +0530 (Fri, 18 Jul 2008) $ * $Revision: 561 $ * $Author: sharmnid $ * ************************************************************************/ /************************************************************************ * FILE DESCR: Implementation of LTKTraceGroup which holds a sequence of LTKTrace type objects * * CONTENTS: * getAllTraces * getTraceAt * getNumTraces * addTrace * setAllTraces * * AUTHOR: Balaji R. * * DATE: December 23, 2004 * CHANGE HISTORY: * Author Date Description of change * Deepu V. March 7, 2005 Added new assignment operator (from LTKTrace) * and copy constructor (from LTKTrace ) * Thanigai 09-AUG-2005 Added a to empty the trace group ************************************************************************/ #include "LTKTraceGroup.h" #include "LTKTrace.h" #include "LTKErrors.h" #include "LTKErrorsList.h" #include "LTKLoggerUtil.h" #include "LTKException.h" #include "LTKMacros.h" /****************************************************************************** * AUTHOR : Balaji R. * DATE : 23-DEC-2004 * NAME : LTKTraceGroup * DESCRIPTION : Default Constructor * ARGUMENTS : * RETURNS : * NOTES : * CHANGE HISTROY * Author Date Description of change ******************************************************************************/ LTKTraceGroup::LTKTraceGroup() : m_xScaleFactor(1.0), m_yScaleFactor(1.0) { LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Enter: LTKTraceGroup::LTKTraceGroup()"<= m_traceVector.size() ) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "< outXMax ) { outXMax = x; } if ( y < outYMin ) { outYMin = y; } if ( y > outYMax ) { outYMax = y; } } } LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exit: LTKTraceGroup::getBoundingBox()"< scaledTracesVec; // holds the scaled traces floatVector scaledXVec; // scaled x channel values of a trace floatVector scaledYVec; // scaled y channel values of a trace float x=0.0f; float y=0.0f; float xToPreserve=0.0f; float yToPreserve=0.0f; float xMin=0.0f; float yMin=0.0f; float xMax=0.0f; float yMax=0.0f; int numTraces=0; int traceIndex=0; int index=0; int numPoints=0; int errorCode=0; if(xScaleFactor <= 0) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "< translatedTracesVec; // holds the translated traces floatVector translatedXVec; // translated x channel values of a trace floatVector translatedYVec; // translated y channel values of a trace float xValue, yValue; float xReference, yReference; float xMin=0.0f; float yMin=0.0f; float xMax=0.0f; float yMax=0.0f; int errorCode; int traceIndex, index; int numPoints; if((errorCode = getBoundingBox(xMin,yMin,xMax,yMax))!=SUCCESS) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: LTKTraceGroup::translateTo()"< scaledTracesVec; // holds the scaled traces floatVector scaledXVec; // scaled x channel values of a trace floatVector scaledYVec; // scaled y channel values of a trace float x, y; float xReference, yReference; float xMin=0.0f; float yMin=0.0f; float xMax=0.0f; float yMax=0.0f; int traceIndex, index; int errorCode; int numPoints; if(xScaleFactor <= 0) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "<& tracesVec = getAllTraces(); //traces in trace group int numTraces = tracesVec.size(); if(numTraces == 0) { LOG( LTKLogger::LTK_LOGLEVEL_DEBUG)<< "Numer of traces in the tracegroup=0 " " LTKTraceGroup::containsAnyEmptyTrace()" <