#ifndef  OUTPUT_EVENT_STATISTICS_2007_09_14
#define  OUTPUT_EVENT_STATISTICS_2007_09_14
/**
      @file OutputEventStats.h
      @author Brian Magill
      @date 3/08/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 writes out the event statistical or figure of merit values      
      
      
*/
//----------------------------------------------------------------------
//
#include<string>
#include<vector>
#include "Event.h"
#include "GATS_DB.h"
#include "GATS_DB_Exception.h"
#include "GATS_Utilities.hpp"

class OutputEventStats
{
private:

    Event *L1_Output;
    gatsDBpp::GATS_DB *dbConn;
    std::string metaSumTable;    
    std::string metaStatsTable;
    std::string metaStructTable;
       
public:

    OutputEventStats():L1_Output(0), dbConn(0), metaSumTable(""), 
                        metaStatsTable(""), metaStructTable("") { };     

    OutputEventStats(Event &out, 
                    gatsDBpp::GATS_DB &conn, 
                    std::string sum,
                    std::string param,
                    std::string st): L1_Output(&out), 
                            dbConn(&conn), metaSumTable(sum), 
                            metaStatsTable(param), metaStructTable(st) { };     

    OutputEventStats(OutputEventStats const&rhs):L1_Output(rhs.L1_Output), 
                                    dbConn(rhs.dbConn), 
                                    metaSumTable(rhs.metaSumTable), 
                                    metaStatsTable(rhs.metaStatsTable), 
                                    metaStructTable(rhs.metaStructTable) { };     

    OutputEventStats& operator = (OutputEventStats const& rhs )
        {
        if (this == &rhs)
                return *this;

        L1_Output   = rhs.L1_Output; 
        dbConn      = rhs.dbConn;
        metaSumTable = rhs.metaSumTable;
        metaStatsTable = rhs.metaStatsTable; 
        metaStructTable = rhs.metaStructTable;;     
        
        return *this;        
        };
                             
    ~OutputEventStats() { };     

    void operator() (std::string TableName) const;
    
};

#endif