/** @class OutputQuality @author Brian Magill @date 3/07/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 Class returns a vector of data associated with a given table parameter */ //---------------------------------------------------------------------- // #include #include #include "Event.h" #include "GATS_DB.h" #include "GATS_DB_Exception.h" #include "GATS_Utilities.hpp" #include "OutputQuality.h" #include "MetaQuality.h" #include "ModifyGeneric.h" #include "WritingFactory.h" using namespace std; void OutputQuality::operator() (std::string tableName) const { string strLog; string ParamName; string strErr; vector paramList; vector dataArray; unsigned long i; int j; int event = L1_Output->getEventNumber(); MetaQuality metaQual(*L1_Output, *dbConn, metaQualityTable); WritingFactory factory(*dbConn, metaSumTable, metaStructTable); ModifyGeneric writeOutput; // Only write to table if it stores Quality objects if (!metaQual.TableExists(tableName) ) return; writeOutput = factory(tableName); strLog = string("writing to table: ") + tableName; L1_Output->addLogEntry(strLog); paramList = metaQual.getParameterList(tableName); for(i = 0; i < paramList.size(); i++) { dataArray = metaQual.getData(tableName, paramList[i]); for (j = 0; j < dataArray.size(); j++) writeOutput.insertIntoTable(event, j + 1, paramList[i], dataArray[j]); } }