Changeset 357 for bdm/stat/loggers.h
- Timestamp:
- 06/08/09 02:15:30 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/loggers.h
r347 r357 15 15 16 16 #include "libBM.h" 17 #include "..\user_info.h" 17 18 18 19 namespace bdm{ … … 38 39 public: 39 40 //!Default constructor 40 memlog ( int maxlen0, string itf="" ) : logger(),maxlen ( maxlen0 ),ind ( 0 ),vectors ( 0 ),itfilename(itf) {} 41 memlog ( int maxlen0, string itf="" ) : maxlen ( maxlen0 ),ind ( 0 ),vectors ( 0 ),itfilename(itf) {} 42 43 memlog(): ind ( 0 ),vectors ( 0 ) {} 44 41 45 //! Initialize storage 42 46 void init() { … … 60 64 void finalize() {if (itfilename.length()>0) itsave(itfilename.c_str());}; 61 65 66 67 /*! \brief UI for memlog 68 69 TODO dat tam kam patri, a to celej blok 70 71 \code 72 logger = { 73 type = "itpplog"; 74 filename = "file_name.it"; // resulting filename with results in it format 75 maxlen = 100; // size of memory buffer 76 } 77 \endcode 78 */ 79 void from_setting( const Setting &root ); 80 81 // TODO dodelat void to_setting( Setting &root ) const; 62 82 }; 83 84 UIREGISTER(memlog); 63 85 64 86 /*! … … 69 91 * This format is used to store scalars, hence multivariate RVs must be separated. 70 92 */ 71 72 93 class dirfilelog : public memlog { 73 94 … … 81 102 @param dirname0 name of the directory in which to store the results 82 103 @param maxlen0 length of the memory buffers, when full the buffers will be dumped to HDD and returned to the beginning. */ 83 dirfilelog ( std::string dirname0, int maxlen0 ) : memlog ( maxlen0 ), dirname ( dirname0 ), scalarnames ( 0 ) {} 104 dirfilelog ( string dirname0, int maxlen0 ) : memlog ( maxlen0 ), dirname ( dirname0 ), scalarnames ( 0 ) {} 105 106 dirfilelog() {} 107 84 108 //! Initialize storage 85 109 void init(); … … 90 114 */ 91 115 void write_buffers ( int Len ); 116 117 // TODO dokumentace - aktualizovat 118 /*! \brief UI for dirfilelog (Kst file format) 119 \code 120 logger = { 121 type = "dirfilelog"; 122 dirmane = "directory_for_files"; // resulting files will be stored there 123 maxlen = 100; // size of memory buffer, when full results are written to disk 124 } 125 \endcode 126 */ 127 void from_setting( const Setting &root ); 128 129 // TODO dodelat void to_setting( Setting &root ) const; 92 130 }; 131 132 UIREGISTER(dirfilelog); 93 133 94 134 };