#include <MCFsbostream.h>
Inheritance diagram for MCFsbostream< Rtmra_t >:


Public Types | |
| typedef Rtmra_t::DataType | Data_t |
Public Member Functions | |
| virtual void | final (Rtmra_t &) |
| MCFsbostream (const string &descript="_", ostream &os=cout) | |
| MCFsbostream< Rtmra_t > & | operator<< (Rtmra_t &) |
| void | threshold (const Data_t threshold) |
| ~MCFsbostream () | |
Protected Attributes | |
| Data_t | _threshold |
|
|||||
|
Definition at line 29 of file MCFsbostream.h. |
|
||||||||||||||||
|
Definition at line 40 of file MCFsbostream.h. References DataType_Code< Data_t >.eval().
00041 : MCFsbostreamBase( descript, os ), _threshold(0) 00042 { 00043 _arraydim = Rtmra_t::ArrayDim; 00044 _datatype_code = DataType_Code<Data_t>::eval(); 00045 } |
|
|||||||||
|
Definition at line 31 of file MCFsbostream.h.
00031 {}
|
|
||||||||||
|
Reimplemented in MCFsbofstream< Rtmra_t >. Definition at line 48 of file MCFsbostream.h. Referenced by MCFsbofstream< Rtmra_t >.final().
00049 {
00050 bool eob = ( x.mcycle() == x.mmax() );
00051 _lockfinalstep = true;
00052 while ( !eob ) {
00053 // x.assign( 0.0 );
00054 x.assign( typename Rtmra_t::DataType(0) );
00055 x++;
00056 (*this) << x;
00057 eob = ( x.mcycle() == x.mmax() );
00058 }
00059 }
|
|
||||||||||
|
Definition at line 62 of file MCFsbostream.h. References MCFsbostreamBase.close(), MCFsbostreamBase.isopen(), MCFsbostreamBase.open(), MCFsbostreamBase.outheader(), and MCFmp< Rtmra_t >.threshold().
00063 {
00064
00065 MCFmp<Rtmra_t> mp( _bplen_mpsizeb, _bplen_coef, _bplen_n, _bplen_a );
00066 mp.threshold(_threshold);
00067
00068 if ( !isopen() ) open();
00069
00070 if ( isopen() ) {
00071 if ( _needheader ) outheader();
00072 int m = x.mcycle();
00073 bool eob = ( m == x.mmax() );
00074 if (eob) {
00075 (*_os) << mp( x, char(m) );
00076 }
00077 while ( m != 0 ) {
00078 (*_os) << mp( x, char(0x80|m) );
00079 m--;
00080 }
00081
00082 if ( !_lockfinalstep ) {
00083 // _finalstep = x.mrastep() & ( ( 1 << _mmax ) - 1 ); HACK
00084 _finalstep = x.mrastep() & ( ( 1 << x.mmax() ) - 1 );
00085 #ifdef STORM_DEBUG
00086 cout << "locked with _finalstep = " << _finalstep << endl;
00087 #endif
00088 }
00089 if (eob) {
00090 close();
00091 _sbn++;
00092 _needheader = true;
00093 }
00094 }
00095 return *this;
00096 }
|
|
||||||||||
|
Definition at line 99 of file MCFsbostream.h.
00100 {
00101 _threshold = threshold;
00102 }
|
|
|||||
|
Definition at line 36 of file MCFsbostream.h. |
1.3.6