GSE++ library: reading and writing GSE waveforms

◆ read()

void read ( std::istream &  fis)
related

Read a checksum CHK2-line from a GSE data file.

Definition at line 117 of file gsexx_TCHK2.cc.

References Msum.

118 {
119  // read lineID first to pass newline after last data character
120  std::string lineID;
121  fis >> lineID;
122  // DEBUG: std::cerr << lineID << std::endl;
123  // now read a full line to chomp newline after checksum too
124  std::string theline;
125  // DEBUG: std::cerr << theline << std::endl;
126  std::getline(fis, theline);
127  std::istringstream is(theline);
128  if (!GSEIDmatch<TCHK2>(lineID)) throw
129  Terror("ERROR (CHK2::read): missing CHK2 line!");
130  is >> this->Msum;
131 /* former code (01/07/2005)
132  std::string lineID;
133  is >> lineID;
134  if (!GSEIDmatch<TCHK2>(lineID)) throw
135  Terror("ERROR (TCHK2::read): missing CHK2 line!");
136  is >> this->Msum;
137 */
138 }
intT Msum
checksum value
Definition: gsexx.h:191