#include <EntryData.h>
Public Member Functions | |
EntryData () | |
const ALIstring & | entryName () const |
void | fill (const std::vector< ALIstring > &wordlist) |
const ALIstring & | longOptOName () const |
const ALIstring & | optOName () const |
ALIint | quality () const |
void | setValueDisplacement (const ALIdouble val) |
const ALIstring & | shortOptOName () const |
ALIdouble | sigma () const |
ALIdouble | valueDisplacement () const |
ALIdouble | valueOriginal () const |
~EntryData () | |
Protected Attributes | |
ALIstring | fEntryName |
ALIstring | fLongOptOName |
ALIuint | fQuality |
ALIstring | fShortOptOName |
ALIdouble | fSigma |
ALIdouble | fValueDisplacement |
ALIdouble | fValueOriginal |
Friends | |
std::ostream & | operator<< (std::ostream &os, const EntryData &c) |
Definition at line 15 of file EntryData.h.
EntryData::EntryData | ( | ) |
Definition at line 16 of file EntryData.cc.
{ }
EntryData::~EntryData | ( | ) |
Definition at line 86 of file EntryData.cc.
{ }
const ALIstring& EntryData::entryName | ( | ) | const [inline] |
Definition at line 30 of file EntryData.h.
References fEntryName.
Referenced by operator<<().
{ return fEntryName; }
void EntryData::fill | ( | const std::vector< ALIstring > & | wordlist | ) |
Definition at line 20 of file EntryData.cc.
References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), EntryMgr::extractShortName(), fEntryName, fLongOptOName, fQuality, fShortOptOName, fSigma, fValueDisplacement, fValueOriginal, ALIUtils::getFloat(), and EntryMgr::getInstance().
Referenced by EntryMgr::readEntryFromReportOut().
{ if (ALIUtils::debug >=4) std::cout << "Filling entry data:" << std::endl; //----------- Check there are > 10 words if ( wordlist.size() < 10 ) { //t ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine(); ALIUtils::dumpVS( wordlist, " !!! Incorrect format for EntryData:", std::cerr ); std::cerr << std::endl << " There should be at least 10 words" << std::endl; abort(); } EntryMgr* entryMgr = EntryMgr::getInstance(); //----- set name and type fLongOptOName = wordlist[2]; fShortOptOName = entryMgr->extractShortName(wordlist[2]); fEntryName = wordlist[3]; //----- set value fValueOriginal = ALIUtils::getFloat( wordlist[4] ); fValueDisplacement = 0.; // fValueOriginal = ALIUtils::getFloat( wordlist[7] ); // fValueDisplacement = ALIUtils::getFloat( wordlist[12] ); /* done in Entry.cc if( wordlist[3].substr(0,6) == "centre" ) { fValue *= entryMgr->getDimOutLengthVal(); if(ALIUtils::debug >= 5) std::cout << "value " << fValue << " " << entryMgr->getDimOutLengthVal() << std::endl; } else if( wordlist[3].substr(0,6) == "angles" ) { fValue *= entryMgr->getDimOutAngleVal(); } else { std::cerr << "!!!FATAL ERROR: reading from 'report.out' only supports centre or angles, NOT " << wordlist[3] << std::endl; abort(); } */ //----- set sigma fSigma = ALIUtils::getFloat( wordlist[6] ); /* done in Entry.cc if( wordlist[3].substr(0,6) == "centre" ) { fSigma *= entryMgr->getDimOutLengthSig(); }else if( wordlist[3].substr(0,6) == "angles" ) { fSigma *= entryMgr->getDimOutAngleSig(); } */ //----- set quality if( wordlist[0] == ALIstring("UNK:") ) { fQuality = 2; } else if( wordlist[0] == ALIstring("CAL:") ) { fQuality = 1; } else if( wordlist[0] == ALIstring("FIX:") ) { fQuality = 0; } else { //- ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine(); std::cerr << " quality should be 'UNK:' or 'CAL:' or 'FIX:', instead of " << wordlist[0] << std::endl; abort(); } if (ALIUtils::debug >= 4) { //t std::cout << *this << std::endl; } }
const ALIstring& EntryData::longOptOName | ( | ) | const [inline] |
Definition at line 27 of file EntryData.h.
References fLongOptOName.
Referenced by EntryMgr::findEntryByLongName(), operator<<(), and optOName().
{ return fLongOptOName; }
const ALIstring& EntryData::optOName | ( | ) | const [inline] |
ALIint EntryData::quality | ( | ) | const [inline] |
Definition at line 34 of file EntryData.h.
References fQuality.
Referenced by Entry::fillFromReportOutFileQuality(), and operator<<().
{ return fQuality; }
void EntryData::setValueDisplacement | ( | const ALIdouble | val | ) | [inline] |
Definition at line 35 of file EntryData.h.
References fValueDisplacement.
Referenced by Entry::fillFromReportOutFileValue().
{ fValueDisplacement = val; }
const ALIstring& EntryData::shortOptOName | ( | ) | const [inline] |
ALIdouble EntryData::sigma | ( | ) | const [inline] |
Definition at line 33 of file EntryData.h.
References fSigma.
Referenced by Entry::fillFromReportOutFileSigma(), and operator<<().
{ return fSigma; }
ALIdouble EntryData::valueDisplacement | ( | ) | const [inline] |
Definition at line 32 of file EntryData.h.
References fValueDisplacement.
Referenced by Entry::fillFromReportOutFileValue(), operator<<(), and Model::SetValueDisplacementsFromReportOut().
{ return fValueDisplacement; }
ALIdouble EntryData::valueOriginal | ( | ) | const [inline] |
Definition at line 31 of file EntryData.h.
References fValueOriginal.
Referenced by Entry::fillFromReportOutFileValue(), and operator<<().
{ return fValueOriginal; }
std::ostream& operator<< | ( | std::ostream & | os, |
const EntryData & | c | ||
) | [friend] |
Definition at line 92 of file EntryData.cc.
{ os << "ENTRY: " << ent.longOptOName() << " : " << ent.entryName() << " valueOriginal " << ent.valueOriginal() << " valueDisplacement " << ent.valueDisplacement() << " sigma " << ent.sigma() << " quality " << ent.quality() << std::endl; return os; }
ALIstring EntryData::fEntryName [protected] |
Definition at line 44 of file EntryData.h.
Referenced by entryName(), and fill().
ALIstring EntryData::fLongOptOName [protected] |
Definition at line 42 of file EntryData.h.
Referenced by fill(), and longOptOName().
ALIuint EntryData::fQuality [protected] |
Definition at line 48 of file EntryData.h.
ALIstring EntryData::fShortOptOName [protected] |
Definition at line 43 of file EntryData.h.
Referenced by fill(), and shortOptOName().
ALIdouble EntryData::fSigma [protected] |
Definition at line 47 of file EntryData.h.
ALIdouble EntryData::fValueDisplacement [protected] |
Definition at line 46 of file EntryData.h.
Referenced by fill(), setValueDisplacement(), and valueDisplacement().
ALIdouble EntryData::fValueOriginal [protected] |
Definition at line 45 of file EntryData.h.
Referenced by fill(), and valueOriginal().