100 bool inchannels=
false;
102 std::string inputline;
104 if (debug) { std::cout <<
"<" << inputline <<
">" << endl; }
108 int linelength=theline.theline().length();
109 if ((!indata) && (linelength > 0))
110 {
Mfree.push_back(theline.theline()); }
111 if (theline.hastag() && (linelength > 0))
123 { cout <<
"found data tag " << theline.thetag() << endl; }
130 { cout <<
"found channels tag " << theline.thetag() << endl; }
137 { cout <<
"found units tag " << theline.thetag() << endl; }
143 "missing content in tagged line");
145 "file ID is not TSOFT or not supported");
147 { cout <<
"found fileid tag " << theline.thetag() << endl; }
153 "missing content in tagged line");
155 "time format is not supported");
157 { cout <<
"found timeformat tag " << theline.thetag() << endl; }
163 "missing content in tagged line");
164 std::istringstream iss(theline.thecontent());
167 { cout <<
"found undetval tag " << theline.thetag() << endl; }
173 "missing content in tagged line");
175 std::istringstream iss(theline.thecontent());
180 { cout <<
"found increment tag " << theline.thetag() << endl; }
183 else if (indata && (linelength>0))
186 cout <<
"go for data line #" << count+1 << endl;
194 cout <<
"go for info for channel #" << count+1 << endl;
198 cout <<
"have access to channelinfo for channel " << count+1 << endl;
201 ci.setchannelinfo(inputline);
204 cout <<
"read info for channel #" << count << endl;
209 ci.setunits(inputline);
212 cout <<
"read units for channel #" << count << endl;
216 if (debug) { std::cout <<
"<" << inputline <<
">" << endl; }
223 std::cerr <<
"mandatory fields in input file are missing!" 228 "mandatory fields are missed");
bool allchecked() const
check whether all are checked
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
libtime::TRelativeTime Mincrement
sampling interval
const char * tagdata
TSOFT data tag.
Checklist Mchecklist
my checklist
Datacontainer Mdatacontainer
store channel info
contains takes one line and splits it into tag and information.
double Mundetval
store undetval
libtime::TRelativeTime dt()
return sampling interval of HPMO data acquisition (i.e. 5 sec)
const char * tagtimeformat
TSOFT timeformat tag.
const char * tagunits
TSOFT units tag.
const char * tagincrement
TSOFT increment tag.
void report(std::ostream &os) const
report check status
const char * tagfileid
TSOFT fileid tag.
void push_data(const std::string &line, const double &undetval, const libtime::TRelativeTime &dt, const bool &debug=false)
push a data line
void flushchannels()
flush all channels
const char * tagchannels
TSOFT channels tag.
const char * TSOFTID
string constant to check TSOFT file id
std::string getDOSline(std::istream &is)
helper function getDOSline
const char * tagundetval
TSOFT undetval tag.