42 #define DATRW_OSFF_CC_VERSION \    47 #include <datrwxx/sffwriters.h>    57                          const std::string& modifier,
    60     Mwid2iswaiting(false),
    61     Mfreeiswaiting(false),
    62     Minfoiswaiting(false),
    63     Mnormmode(::sff::NM_maxdyn)
    67     if (subformat.
isset(
"dontscale")) 
    69     else if (subformat.
isset(
"scaleifneeded")) 
    74                    "new instance established");
    83       "SFF writing functions" << std::endl <<
    84       "---------------------" << std::endl <<
    88       "This module writes SFF data. SFF (Stuttgart File Format) is\n"    89       "based on GSE subformat CM6. GSE is an integer format with\n"    90       "a dynamic range of little more than 27 bits. Second differences\n"    91       "are saved such that in the worst case two bits are consumed by the\n"    92       "second differences and one additional bit for the sign. The\n"    93       "underlying libgsexx aborts if numbers larger than 2**26-1 are\n"    94       "to be written. For this reason floating point data must be\n"    95       "scaled appropriately before being written to SFF data. The\n"    96       "default is to scale to maximum dynamic range (i.e. 2**26-1).\n"    97       "Two other scaling options are available through format modifiers:"   100       "dontscale        Write data as is. This is appropriate for integer\n"   101       "                 data in particlular.\n"   102       "scaleifneeded    Scale only if largest value in time series is\n"   103       "                 larger than 2**26-1. Sample values smaller than\n"   104       "                 will be truncated to zero silently."   113                    "write file header to file");
   114     ::sff::FileHeader fileheader;
   115     if (this->
hassrce()) { fileheader.setsrce(this->
srce()); }
   116     if (this->
hasfree()) { fileheader.setfree(this->
free()); }
   125                    "write series of type double to file");
   135                    "write series of type float to file");
   145                    "write series of type integer to file");
   155                    "flush previous trace data to file");
   171                       "file is to be closed and no data was written");
   193                    "new instance established");
   201     os << 
"This module writes standard GSE data." << std::endl;
   202     os << 
"Essentially SFF data is written but without normalising"   204     os << 
"them. Notice that floating point data will by truncated to"   206     os << 
"integers." << std::endl;
 
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception. 
bool hasinfo() const
info is available 
macro function for debugging output (prototypes) 
void setdatatype(const Edatatype &daty)
bool hassrce() const
srce is available 
sff::WID2 wid2() const
return WID2 data 
std::ostream & Mos
output stream to be used by this class 
bool haswid2() const
wid2 is available 
#define DATRW_OSFF_CC_VERSION
virtual void writefileheader()
actually write the file header 
read sff data (prototypes) 
virtual void writetrace(const Tdseries::Tcoc &series)
write double data 
static void help(std::ostream &os=std::cout)
sff::INFO info() const
return SRCE data 
bool debug()
indicate debug mode 
Root namespace of library. 
osffstream(std::ostream &os, const std::string &modifier="", const bool &debug=false)
sff::SRCE srce() const
return SRCE data 
sff::FREE free() const
return FREE data 
void flushwaitingtrace(const bool &last=false)
static const std::ios_base::openmode openmode
void writesfftrace(std::ostream &os, const ::sff::TraceHeader &traceheader, const datrw::util::seriesreservoir &series, const ::sff::Enormmode &normmode)
function to write an SFF trace from a series reservoir 
#define DATRW_debug(C, N, M)
produce debug output 
::sff::Enormmode Mnormmode
bool Mdebug
global debug flag 
static void help(std::ostream &os=std::cout)
datrw::util::seriesreservoir Mserieswaiting
bool hasfree() const
free is available 
ogsestream(std::ostream &os, const bool &debug=false)