moab
IODebugTrack.hpp
Go to the documentation of this file.
00001 #ifndef moab_IO_DEBUG_TRACK_HPP
00002 #define moab_IO_DEBUG_TRACK_HPP
00003 
00004 #include <list>
00005 #include <iosfwd>
00006 #include <string>
00007 
00008 namespace moab {
00009 
00019 class IODebugTrack {
00020   private:
00021     struct DRange {
00022       unsigned long begin;
00023       unsigned long end;
00024       unsigned long rank;
00025     };
00026   
00027     bool enableOutput;
00028     std::string tableName;
00029     std::list<DRange> dataSet;
00030     std::ostream& ostr;
00031     unsigned long maxSize;
00032     int mpiRank;
00033     bool haveMPI;
00034     
00035     void record_io( DRange data );
00036 
00037   public:
00038   
00044     IODebugTrack( bool enable,
00045                   const std::string table_name,
00046                   std::ostream output_stream,
00047                   unsigned long table_size = 0 ) ;
00048   
00053     IODebugTrack( bool enable,
00054                   const std::string table_name,
00055                   unsigned long table_size = 0 ) ;
00056     
00058     ~IODebugTrack();
00059     
00064     void record_io( unsigned long begin, unsigned long count );
00065     
00070     void all_reduce();
00071 };
00072 
00073 
00074 } // namespace moab
00075 
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines