SetiLoc Class Reference
Represents a SETI@home location. More...
#include <setiloc.h>
Inherits SetiContainer.
Inheritance diagram for SetiLoc:
Detailed Description
Represents a SETI@home location.This is a central class in the Ksetiwatch application. For every S@h location the user wishes to monitor, an object based on this class is created. It extends the features of the SetiContainer class (which basically does the monitoring of the sah files and data structures of the client) by the ability to start and stop the S@h client, and to log the results of completed work units.
Upon creation of a SetiLoc object, a unique identifier string is generated. This is because S@h locations can in principle have the same name, but different working directories. Use the ID string (obtained via id()) to distinguish between the different locations.
Definition at line 117 of file setiloc.h.
Member Enumeration Documentation
|
Identifiers for the three different graph widgets.
|
Constructor & Destructor Documentation
|
The constructor.
Definition at line 138 of file setiloc.cpp. References client, clientOutput, LocSettings::color, QObject::connect(), LocSettings::description, LocSettings::directory, initMaxScore(), QFontMetrics::lineSpacing(), newWorkUnit(), QString::number(), sets, slotDumpClientOutput(), slotInitMaxScore(), sresult_timestamp, thisId, and QFontMetrics::width(). |
|
The destructor.
Definition at line 169 of file setiloc.cpp. References clientOutput. |
Member Function Documentation
|
Returns the unique ID string. Upon creation of a SetiLoc object, a unique identifier string is generated. This ID string can be used to safely identify the correct location. Definition at line 175 of file setiloc.cpp. References thisId. Referenced by Ksetiwatch::Ksetiwatch(), logResults(), UserInfo::refreshList(), DataInfo::refreshList(), Analysis::refreshList(), UserInfo::refreshListItem(), DataInfo::refreshListItem(), showGraph(), Analysis::slotAdjustAllStatusIcons(), CompletedWUList::slotSelect(), UserInfo::slotUpdateList(), DataInfo::slotUpdateList(), Analysis::slotUpdateList(), Analysis::updateAnalysisList(), CompletedWUList::updateList(), Analysis::updateListItemGaussianData(), Analysis::updateListItemPulseData(), Analysis::updateListItemSpikeData(), Analysis::updateListItemTimeData(), Analysis::updateListItemTripletData(), and Analysis::updateStateIcon(). |
|
Sets all options of the location.
Definition at line 181 of file setiloc.cpp. References LocSettings::arguments, LocSettings::directory, initMaxScore(), SetiContainer::setDirectory(), sets, and QString::simplifyWhiteSpace(). Referenced by Analysis::handlePopupCommand(), and Ksetiwatch::readConfig(). |
|
Returns the settings of the location.
Definition at line 146 of file setiloc.h. Referenced by CompletedWUList::checkForRedirect(), Analysis::handlePopupCommand(), and Ksetiwatch::saveConfig(). |
|
|
Returns the color used for the location.
Definition at line 150 of file setiloc.h. References LocSettings::color, and sets. Referenced by SkyMap::addLocation(), CompletedWUList::addLoggedWU(), CompletedWUList::handleWUListPopupCommand(), TelescopePath::setLocation(), slotInitMaxScore(), and TelescopePath::TelescopePath(). |
|
Returns TRUE, if the S@h client is started at start-up of Ksetiwatch.
Definition at line 153 of file setiloc.h. References sets, and LocSettings::startSeti. Referenced by Ksetiwatch::startClients(). |
|
Returns TRUE, if the S@h client is stopped at shut-down of Ksetiwatch.
Definition at line 156 of file setiloc.h. References sets, and LocSettings::stopSeti. Referenced by Ksetiwatch::stopClients(). |
|
Returns TRUE, if the S@h client shall be restarted whenevever it shuts down unexpectedly.
Definition at line 159 of file setiloc.h. References LocSettings::keepClientAlive, and sets. Referenced by Analysis::updateStateIcon(). |
|
Sets the time stamp of the last WU logged by Ksetiwatch. The time stamp is used to prevent multiple logging of the same WU.
Definition at line 166 of file setiloc.h. References sresult_timestamp. Referenced by checkWUStatus(), and Ksetiwatch::readConfig(). |
|
Returns the time stamp of the last WU logged by Ksetiwatch.
Definition at line 168 of file setiloc.h. References sresult_timestamp. Referenced by checkWUStatus(), and Ksetiwatch::saveConfig(). |
|
Returns the path to the log directory.
Definition at line 271 of file setiloc.cpp. References SetiContainer::directory(), QString::isEmpty(), LocSettings::logDirectory, LocSettings::redirectLog, and sets. Referenced by CompletedWUList::addLoggedWU(), CompletedWUList::checkForRedirect(), CompletedWUList::fillSigList(), CompletedWUList::fillSigSumList(), CompletedWUList::fillTotalList(), CompletedWUList::fillWUList(), loggedTripletProfile(), logResults(), logWorkUnit(), LoggedSigs::readLoggedSigs(), slotInitMaxScore(), and storeTripletData(). |
|
Displays a window with one of the three different signal graphs.
Definition at line 191 of file setiloc.cpp. References clientOutput, and id(). Referenced by Analysis::handleShowPopupCommand(). |
|
Returns the state of the graph widget specified by identifier id.
|
|
Starts the SETI@home client.
Definition at line 612 of file setiloc.cpp. References LocSettings::arguments, KProcess::clearArguments(), client, QFile::close(), QDir::currentDirPath(), LocSettings::customStartExe, SetiContainer::directory(), LocSettings::email, QFile::exists(), SetiContainer::getClientPid(), LocSettings::graphics, SetiContainer::isClientRunning(), QString::isEmpty(), QString::number(), QFile::open(), LocSettings::priority, LocSettings::proxyPort, LocSettings::proxyServer, QFile::remove(), QDir::setCurrent(), sets, QStringList::split(), KProcess::start(), LocSettings::stopAfterProcess, LocSettings::stopAfterSend, stoppedNormally, LocSettings::useCustomStartExe, and LocSettings::useProxy. Referenced by DockWidget::handlePopupCommand(), Analysis::handlePopupCommand(), Analysis::slotStartAll(), Ksetiwatch::startClients(), and Analysis::updateStateIcon(). |
|
Stops the SETI@home client.
Definition at line 694 of file setiloc.cpp. References KProcess::clearArguments(), client, LocSettings::customStopExe, QString::isEmpty(), sets, QStringList::split(), KProcess::start(), stoppedNormally, stopProc, and LocSettings::useCustomStopExe. Referenced by DockWidget::handlePopupCommand(), Analysis::handlePopupCommand(), Analysis::slotStopAll(), and Ksetiwatch::stopClients(). |
|
TRUE if the client has been stopped upon user request.
Definition at line 196 of file setiloc.h. Referenced by Analysis::updateStateIcon(). |
|
Initializes the structure that stores the score of the best signals of the WU in progress.
Definition at line 219 of file setiloc.cpp. References WUScore::gaussian, SetiContainer::initWUScore(), mymax, SpikeScore::power, WUScore::pulse, TripletScore::score, PulseScore::score, GaussianScore::score, WUScore::spike, and WUScore::triplet. Referenced by SetiLoc(), setOptions(), and Analysis::slotUpdateList(). |
|
Sets the structure containing the best signals to score.
Definition at line 204 of file setiloc.h. References mymax. Referenced by Analysis::updateMaxScore(). |
|
Returns a structure with the parameters of the best signals found in the WU in progress.
Definition at line 207 of file setiloc.h. Referenced by Analysis::updateMaxScore(). |
|
Writes triplet data (power, period, and profile) to a temporary file. This information will be merged into the result log later on.
Definition at line 292 of file setiloc.cpp. References QFile::close(), TripletScore::data, logDirectory(), QFile::open(), TripletScore::period, TripletScore::power, QString::sprintf(), TripletScore::tpotind0_0, TripletScore::tpotind1_0, and TripletScore::tpotind2_0. Referenced by Analysis::updateMaxScore(). |
|
Checks if the client has completed a work unit.
If the client has created the file Definition at line 250 of file setiloc.cpp. References QFileInfo::lastModified(), LocSettings::log, logResults(), logWorkUnit(), sets, setTimestamp(), timestamp(), QDateTime::toString(), and workUnitLogged(). Referenced by Analysis::updateStateIcon(). |
|
Returns the parameters of a logged spike signal.
The S@h client stores the parameters of signals which are to be returned to the server in a single line of the form
This method can be applied to lines in the files
Definition at line 797 of file setiloc.cpp. References SpikeScore::chirprate, SpikeScore::dec, SpikeScore::fft_len, SpikeScore::frequency, SetiContainer::initWUScore(), SpikeScore::power, SpikeScore::ra, SetiContainer::readEntry(), QString::replace(), WUScore::spike, QStringList::split(), QString::toDouble(), and QString::toInt(). Referenced by CompletedWUList::fillSigList(), CompletedWUList::fillSigSumList(), and LoggedSigs::readLoggedSigs(). |
|
Returns the parameters of a logged gaussian signal. See loggedSpikeSignal() for details.
Definition at line 819 of file setiloc.cpp. References calcGaussianFFTIndex(), GaussianScore::chirprate, GaussianScore::chisq, GaussianScore::data, GaussianScore::data_len, GaussianScore::dec, GaussianScore::fft_index, GaussianScore::fft_len, GaussianScore::frequency, WUScore::gaussian, SetiContainer::initWUScore(), GaussianScore::power, GaussianScore::ra, SetiContainer::readDataString(), SetiContainer::readEntry(), QString::replace(), GaussianScore::score, GaussianScore::sigma, QStringList::split(), QString::toDouble(), QString::toInt(), and GaussianScore::true_mean. Referenced by CompletedWUList::fillSigList(), CompletedWUList::fillSigSumList(), and LoggedSigs::readLoggedSigs(). |
|
Returns the parameters of a logged pulse signal. See loggedSpikeSignal() for details.
Definition at line 891 of file setiloc.cpp. References PulseScore::chirprate, PulseScore::data, PulseScore::data_len, PulseScore::dec, PulseScore::fft_len, PulseScore::frequency, SetiContainer::initWUScore(), PulseScore::mean, PulseScore::period, PulseScore::power, WUScore::pulse, PulseScore::ra, SetiContainer::readDataString(), SetiContainer::readEntry(), QString::replace(), PulseScore::score, QStringList::split(), QString::toDouble(), and QString::toInt(). Referenced by CompletedWUList::fillSigList(), CompletedWUList::fillSigSumList(), and LoggedSigs::readLoggedSigs(). |
|
Returns the parameters of a logged triplet signal. See loggedSpikeSignal() for details.
Definition at line 929 of file setiloc.cpp. References TripletScore::chirprate, TripletScore::data, TripletScore::data_len, TripletScore::dec, TripletScore::fft_len, TripletScore::frequency, SetiContainer::initWUScore(), TripletScore::mean, TripletScore::period, TripletScore::power, TripletScore::ra, SetiContainer::readDataString(), SetiContainer::readEntry(), QString::replace(), TripletScore::score, QStringList::split(), QString::toDouble(), QString::toInt(), TripletScore::tpotind0_0, TripletScore::tpotind0_1, TripletScore::tpotind1_0, TripletScore::tpotind1_1, TripletScore::tpotind2_0, TripletScore::tpotind2_1, and WUScore::triplet. Referenced by CompletedWUList::fillSigList(), CompletedWUList::fillSigSumList(), and LoggedSigs::readLoggedSigs(). |
|
Logs all important results of a processed WU.
The results are written to the file Definition at line 319 of file setiloc.cpp. References QString::arg(), QFile::atEnd(), SetiContainer::clientVersion(), QFile::close(), CSVDataBase::columnCount(), constructEntry(), QDate::currentDate(), QTime::currentTime(), QDateTime::date(), QDate::day(), description(), KMessageBox::error(), SetiContainer::exists(), QFile::exists(), QDateTime::isValid(), QFileInfo::lastModified(), QString::left(), QString::length(), logDirectory(), QDate::month(), QFile::open(), QFile::putch(), SetiContainer::readEntry(), QTextStream::readLine(), QString::sprintf(), QDateTime::time(), QTime::toString(), QIODevice::writeBlock(), and QDate::year(). Referenced by checkWUStatus(). |
|
Creates a string that can be appended to a line of the log file This is a helper method for logWorkUnit(). It takes a string obtained from a sah file by readEntry(), and prepares it in a way that it can be added to the log file.
Definition at line 522 of file setiloc.cpp. References QString::append(), QString::insert(), and QString::isEmpty(). Referenced by logWorkUnit(). |
|
Logs the signals found in the result file
The information about the signals ( a one-line string) is copied verbatim to the file Definition at line 545 of file setiloc.cpp. References QFile::atEnd(), QFile::close(), QFile::exists(), QString::find(), id(), SetiContainer::key(), QString::left(), logDirectory(), loggedTripletProfile(), QString::mid(), QFile::open(), SetiContainer::readEntry(), QTextStream::readLine(), and QString::sprintf(). Referenced by checkWUStatus(). |
|
Takes the given string with triplet data and compares it with the triplets stored in . If a match is found a string with data describing the triplet profile is returned. The motivation behind this is to provide a possibility to log triplet graph data (which the client itself doesn't offer).
Definition at line 738 of file setiloc.cpp. References QString::arg(), QTextStream::atEnd(), QFile::close(), QString::isEmpty(), logDirectory(), QFile::open(), SetiContainer::readEntry(), QTextStream::readLine(), QStringList::split(), and QString::toDouble(). Referenced by logResults(). |
|
Determines the index value (i.e the position) of the fitted gaussian.
This is done by calculating the least-square sum over the data set. We need this method because the client doesn't store the index value of logged gaussians (in
Definition at line 858 of file setiloc.cpp. References GaussianScore::data, GaussianScore::power, GaussianScore::sigma, and GaussianScore::true_mean. Referenced by loggedGaussianSignal(). |
|
Initializes the processing of a new WU.
In addition to resetting the structure with the best signal scores, any open graph window is hidden, the hidden temporary file . This slot should only be called when starting the processing of a new (downloaded) WU. Definition at line 231 of file setiloc.cpp. References color(), description(), QWidget::hide(), SetiContainer::initWUScore(), logDirectory(), mymax, newWorkUnit(), and QDir::remove(). Referenced by SetiLoc(). |
|
No descriptions.
Definition at line 719 of file setiloc.cpp. References clientOutput, QString::find(), QString::length(), and QString::right(). Referenced by SetiLoc(). |
|
This signal is emitted whenever a new WU has been started. Arguments are a structure with the new work unit data, the name of the corresponding S@h location, and the color used for the location. This signal is equivalent to the newWorkUnit() signal of the SetiContainer class, only with extended number of arguments. Referenced by SetiLoc(), and slotInitMaxScore(). |
|
This signal is emitted whenever a work unit has been logged. The argument is a pointer to the SetiLoc object. Referenced by checkWUStatus(). |
Member Data Documentation
|
The unique id string of the location.
|
|
The settings and options of the location.
Definition at line 340 of file setiloc.h. Referenced by checkWUStatus(), color(), description(), logDirectory(), optionKeepClientAlive(), optionStartSeti(), optionStopSeti(), SetiLoc(), setOptions(), startClient(), and stopClient(). |
|
The time stamp of the result file. Required to prevent multiple logging. Definition at line 343 of file setiloc.h. Referenced by SetiLoc(), setTimestamp(), and timestamp(). |
|
Controls the SETI@home client.
Definition at line 345 of file setiloc.h. Referenced by SetiLoc(), startClient(), and stopClient(). |
|
Controls a customized shut-down process.
Definition at line 347 of file setiloc.h. Referenced by stopClient(). |
|
Stores the best signal scores found for the WU in progress.
Definition at line 349 of file setiloc.h. Referenced by initMaxScore(), setMaxScore(), and slotInitMaxScore(). |
|
This widget catches the output of the S@h client.
Definition at line 352 of file setiloc.h. Referenced by SetiLoc(), showGraph(), slotDumpClientOutput(), and ~SetiLoc(). |
|
Only TRUE if the client has been stopped via the menu action in the popup menu.
Definition at line 355 of file setiloc.h. Referenced by startClient(), and stopClient(). |
The documentation for this class was generated from the following files: