Implements CocoaDaqReader.
Definition at line 25 of file CocoaDaqReaderText.cc.
26 std::vector<ALIstring> wordlist;
33 std::cout <<
"@@@@ No more measurements left" << std::endl;
42 if (wordlist[0] ==
"DATE:") {
49 std::cout <<
" Reading " << nMeas <<
" measurements from file " <<
theFilein.
name() <<
" DATE: " << wordlist[1]
50 <<
" " << wordlist[1] << std::endl;
52 for (
ALIint im = 0; im < nMeas; im++) {
55 wordlist[0] ==
ALIstring(
"DISTANCEMETER") || wordlist[0] ==
ALIstring(
"DISTANCEMETER1DIM") ||
57 if (wordlist.size() != 2) {
58 std::cerr <<
"!!!EXITING Model::readMeasurementsFromFile. number of words should be 2 instead of "
59 << wordlist.size() << std::endl;
63 std::vector<Measurement*>::const_iterator vmcite;
72 ALIint fcolon = (*vmcite)->name().find(
':');
76 if (
oname == wordlist[1]) {
79 if ((*vmcite)->type() != wordlist[0]) {
80 std::cerr <<
"!!! Reading measurement from file: type in file is " << wordlist[0] <<
" and should be "
81 << (*vmcite)->type() << std::endl;
89 for (
unsigned int ii = 0;
ii < meastemp->
dim();
ii++) {
100 std::cerr <<
"!!!FATAL ERROR: Measurement value type is " << wordlist[0]
101 <<
" while in setup definition was " << meastemp->
valueType(
ii) << std::endl;
115 std::cerr <<
"MEAS: " << (*vmcite)->name() <<
" " << (*vmcite)->type() << std::endl;
117 std::cerr <<
"!!! Reading measurement from file: measurement not found in list: type in file is " << wordlist[1]
122 std::cerr <<
" wrong type of measurement: " << wordlist[0] << std::endl
123 <<
" Available types are SENSOR2D, TILTMETER, DISTANCEMETER, DISTANCEMETER1DIM, COPS" << std::endl;
References begin, beam_dqm_sourceclient-live_cfg::cerr, Measurement::correctValueAndSigma(), gather_cfg::cout, ALIUtils::debug, Measurement::dim(), ALIUtils::dumpVS(), end, beamvalidation::exit(), Measurement::fillData(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), cuy::ii, Model::MeasurementList(), heppy_report::oname, Measurement::setCurrentDate(), Measurement::setSigma(), Measurement::sigma(), and Measurement::valueType().