39 #define DATRW_TRACEREADER_CC_VERSION \ 40 "DATRW_TRACEREADER_CC V1.3" 61 "ERROR (sequentialtracereader): " 62 "a query function was called with no file being open");
69 const std::string& format)
73 std::cerr <<
"DEBUG: sequentialtracereader: " 74 <<
"entered select with parameters:" << std::endl
75 <<
" filename: " << filename << std::endl
76 <<
" itrace: " << itrace << std::endl
77 <<
" format: " << format << std::endl;
80 std::cerr <<
" current filename: " <<
Mfilename << std::endl
81 <<
" current trace: " <<
Mindex << std::endl;
91 std::cerr <<
"DEBUG: sequentialtracereader: " 92 <<
"open file, because no file is open" << std::endl;
102 std::cerr <<
"DEBUG: sequentialtracereader: " 103 <<
"open file, because file name differs" << std::endl;
111 std::cerr <<
"DEBUG: sequentialtracereader: " 112 <<
"open file, because trace index (" << itrace <<
") " 113 <<
"is less than current index (" <<
Mindex <<
")" << std::endl;
124 std::cerr <<
"DEBUG: sequentialtracereader: " 125 <<
"close previous file" << std::endl;
133 datrw::ianystream::openmode(format));
138 std::cerr <<
"DEBUG: sequentialtracereader: " 139 <<
"file " <<
Mfilename <<
" is opened" << std::endl;
144 DATRW_assert(nskip>=0,
"sequentialtracereader::select: " 145 "cannot skip backwards!");
148 std::cerr <<
"DEBUG: sequentialtracereader: " 149 << nskip <<
" skips: " << std::endl;
151 for (
int iskip=0; iskip<nskip; ++iskip)
154 "input is not good!");
158 return(
MPias->good());
167 return(this->
select(filename, itrace,
anyID(format)));
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Eformat anyID(std::string formatstring)
convert identifier from and to string representation
exception class declaration for libdatrwxx (prototypes)
~sequentialtracereader()
destructor
Class to read any type of data file.
Root namespace of library.
datrw::ianystream * MPias
bool select(const std::string &filename, const int &itrace, const Eformat &format)
provide more efficient reading of sequential traces (prototypes)