GSE++ library: reading and writing GSE waveforms

◆ operator()()

std::string GSE2::waveform::TDAT2write::operator() ( const intT value)
inherited

write another value to the stream

Definition at line 203 of file gsexx_TDAT2.cc.

References GSE2::waveform::TDAT2sum::add(), GSE2::waveform::TDAT2sum::checksum(), GSE2::waveform::TDAT2write::convert(), GSE2::waveform::TDAT2sum::GSEID, GSE2::waveform::TDAT2sum::hot(), GSE2::waveform::TDAT2sum::nread(), and GSE2::waveform::TCHK2::write().

204 {
205  std::string retval;
206  if (this->TDAT2sum::nread() == 0)
207  {
208  retval+=TDAT2sum::GSEID;
209  retval+=" \n";
210  }
211  if (!this->TDAT2sum::hot()) throw
212  Terror("ERROR (TDAT2write): writing more samples than specified!");
213  this->TDAT2sum::add(value);
214  retval+=convert(value);
215  if (!TDAT2sum::hot()) {
216  retval+='\n';
217  retval+=this->TDAT2sum::checksum().write();
218  }
219  return(retval);
220 }
static const char *const GSEID
GSE line idetifier.
Definition: gsexx.h:306
std::string write() const
write CHK2 line to string
void add(const intT &value)
count a sample
Definition: gsexx.h:322
bool hot() const
return true if not all samples are processed
Definition: gsexx.h:304
virtual std::string convert(const intT &value)=0
put to stream: user must define
const TCHK2 & checksum() const
return the checksum
Definition: gsexx.h:298
intT nread() const
return the number of samples read
Definition: gsexx.h:300
Here is the call graph for this function: