31 std::vector<ALIstring> wordlist;
36 if( theFilein.getWordsInLine(wordlist) == 0 ) {
46 if( wordlist[0] ==
"DATE:" ) {
53 std::cout <<
" Reading " << nMeas <<
" measurements from file " << theFilein.name()
54 <<
" DATE: " << wordlist[1] <<
" " << wordlist[1] << std::endl;
56 for(
ALIint im = 0; im < nMeas; im++) {
57 theFilein.getWordsInLine(wordlist);
59 if( wordlist.size() != 2 ) {
60 std::cerr <<
"!!!EXITING Model::readMeasurementsFromFile. number of words should be 2 instead of " << wordlist.size() << std::endl;
64 std::vector< Measurement* >::const_iterator vmcite;
73 ALIint fcolon = (*vmcite)->name().find(
':');
75 oname = oname.substr(fcolon+1,oname.length());
77 if( oname == wordlist[1] ) {
80 if( (*vmcite)->type() != wordlist[0] ) {
81 std::cerr <<
"!!! Reading measurement from file: type in file is " 82 << wordlist[0] <<
" and should be " << (*vmcite)->type() << std::endl;
90 for (
unsigned int ii=0;
ii < meastemp->
dim();
ii++){
91 theFilein.getWordsInLine( wordlist );
100 theFilein.ErrorInLine();
101 std::cerr <<
"!!!FATAL ERROR: Measurement value type is " << wordlist[0] <<
" 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] << std::endl;
121 std::cerr <<
" wrong type of measurement: " << wordlist[0] << std::endl
122 <<
" Available types are SENSOR2D, TILTMETER, DISTANCEMETER, DISTANCEMETER1DIM, COPS" << std::endl;
128 if( theFilein.eof() ) {
static ALIFileIn & getInstance(const ALIstring &name)
const ALIuint dim() const
const ALIstring valueType(ALIuint ii) const
static GlobalOptionMgr * getInstance()
virtual void BuildMeasurementsFromOptAlign(std::vector< OpticalAlignMeasurementInfo > &measList)
void fillData(ALIuint coor, const std::vector< ALIstring > &wl)
CocoaDaqReaderText(const std::string &fileName)
void setSigma(ALIint coor, ALIdouble val)
const ALIdouble * sigma() const
virtual ~CocoaDaqReaderText()
static void SetDaqReader(CocoaDaqReader *reader)
virtual bool ReadNextEvent()
static void dumpVS(const std::vector< ALIstring > &wl, const std::string &msg, std::ostream &outs=std::cout)
dumps a vector of strings with a message to outs
virtual void correctValueAndSigma()
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
static std::vector< Measurement * > & MeasurementList()
static void setCurrentDate(const std::vector< ALIstring > &wl)
set the date of the current measurement