CFEL - ASG Software Suite
2.5.0
CASS
|
#include <histo_updater.h>
Public Member Functions | |
HistogramUpdater (const std::string &server, int port) | |
constructor More... | |
void | syncHistograms () |
update the shown histograms More... | |
void | syncHistogram (const std::string &name) |
copy a single result into a histogram More... | |
void | setServer (const std::string &server) |
set the server More... | |
void | setPort (int port) |
set server port More... | |
void | autoSync (double freq) |
automaticly update More... | |
void | alsoUpdateCanvas (bool update) |
set the updateCanvas flag More... | |
void | writeRootFile (const std::string &name) |
write all histograms to a root file More... | |
void | reloadIni () |
tell the server reload the .ini parameters More... | |
void | controlCalibration (const std::string &command="startDarkcal") |
control the dark calibration More... | |
Private Attributes | |
std::string | _server |
the server More... | |
int | _port |
the server port More... | |
std::auto_ptr< TTimer > | _timer |
the timer for auto update More... | |
bool | _updateCanv |
flag whether after updating the histogram the canvas should also update More... | |
Definition at line 17 of file histo_updater.h.
HistogramUpdater::HistogramUpdater | ( | const std::string & | server, |
int | port | ||
) |
constructor
connects the timers Timeout() signal with the updateHistogram() method of this class
server | the server ip or name |
port | the server port |
Definition at line 411 of file histo_updater.cpp.
References _timer.
|
inline |
set the updateCanvas flag
update | the flag status |
Definition at line 72 of file histo_updater.h.
References _updateCanv.
void HistogramUpdater::autoSync | ( | double | freq | ) |
automaticly update
start autoupdate with requested frequency. If frequency is 0 stop autoupdate.
freq | The frequency with which the histogram should be updated in Hz |
Definition at line 420 of file histo_updater.cpp.
References _timer.
void HistogramUpdater::controlCalibration | ( | const std::string & | command = "startDarkcal" | ) |
control the dark calibration
Definition at line 511 of file histo_updater.cpp.
References _port, _server, and lucassview::TCPClient::controlCalibration().
void HistogramUpdater::reloadIni | ( | ) |
tell the server reload the .ini parameters
Definition at line 496 of file histo_updater.cpp.
References _port, _server, and lucassview::TCPClient::reloadIni().
|
inline |
set server port
port | port that the server listens to |
Definition at line 57 of file histo_updater.h.
References _port.
|
inline |
set the server
server | the server ip or name |
Definition at line 51 of file histo_updater.h.
References _server.
void HistogramUpdater::syncHistogram | ( | const std::string & | name | ) |
copy a single result into a histogram
name | The name of the result to retrieve |
Definition at line 456 of file histo_updater.cpp.
void HistogramUpdater::syncHistograms | ( | ) |
update the shown histograms
create the server address from the _server and _port members. With this create a tcpclient object and use it to retrieve the list of available histograms. Use checkList() to filter out the ones that need to be updated. Now go through the list of to update histograms and call updateHist() for each one of them. After that update all Pads in the Canvases using updateCanvases().
Definition at line 430 of file histo_updater.cpp.
References _port, _server, _updateCanv, lucassview::checkList(), and lucassview::updateCanvases().
void HistogramUpdater::writeRootFile | ( | const std::string & | name | ) |
write all histograms to a root file
first update all available histograms, then go through the list of root histograms and write them to file
name | the name of the root file |
Definition at line 472 of file histo_updater.cpp.
|
private |
the server port
Definition at line 94 of file histo_updater.h.
Referenced by controlCalibration(), reloadIni(), setPort(), syncHistogram(), syncHistograms(), and writeRootFile().
|
private |
the server
Definition at line 91 of file histo_updater.h.
Referenced by controlCalibration(), reloadIni(), setServer(), syncHistogram(), syncHistograms(), and writeRootFile().
|
private |
the timer for auto update
Definition at line 97 of file histo_updater.h.
Referenced by autoSync(), and HistogramUpdater().
|
private |
flag whether after updating the histogram the canvas should also update
Definition at line 100 of file histo_updater.h.
Referenced by alsoUpdateCanvas(), and syncHistograms().