Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ComplexStatsCollector2.cxx

Go to the documentation of this file.
00001 #include "FastShowerUtils/Pinger/ComplexStatsCollector2.h"
00002 #include "FastShowerUtils/IDebug.h"
00003 #include "FastShowerUtils/FunctionStats.h"
00004 #include <algorithm>
00005 #include <fstream>
00006 
00007 namespace FastShower{
00008   IPinger* ComplexStatsCollector2::clone() const {
00009     IPinger* p = new ComplexStatsCollector2(*this);
00010     return p;
00011   }
00013   ComplexStatsCollector2::ComplexStatsCollector2(const 
00014                                                  ComplexStatsCollector2& rhs):
00015     PrintPingerBase(rhs){
00016     m_fName = rhs.m_fName;
00017   }
00018   void ComplexStatsCollector2::action(const IDebug* d){
00019     
00020     std::fstream ofile;
00021     ofile.open(m_fName.c_str(), ios::out | ios::app);
00022     ofile<<indent()<<d->text()<< endl;
00023     d->statistics()->report(ofile);
00024     ofile.close();
00025 
00026     IDebug::Cpts parts;
00027     d->components(parts);
00028     ComplexStatsCollector2 q(*this);
00029     ++(*this);
00030     std::for_each(parts.begin(), parts.end(), PingEach(*this) );
00031     (*this)=q;
00032    }
00033 }    
00034 
00035 
00036 

Generated on Tue Mar 18 11:49:55 2003 for FastShowerUtils by doxygen1.3-rc1