// ************************************************************************** /** @mainpage @brief FACT++ - The FACT slow control software @author thomas.bretz@epfl.ch et al.
@section toc Table of contents
  • @ref install_sec
    • @ref rootwarning
    • @ref packages
    • @ref installroot
  • @ref demos
  • @ref dimremarks
  • @ref addtab
  • @ref Documentation
  • @ref References
    • @ref generalref
    • @ref boostref
    • @ref fitsref
    • @ref qtroot
  • @ref availableprograms
  • @ref Examples
@section install_sec Installation FACT++ can be downloaded from the svn by \verbatim svn checkout https://www.fact-project.org/svn/trunk/FACT++ [localdir] \endverbatim it includes a dim version which is automatically compiled. For compilation use \verbatim ./configure make \endverbatim Check the \b ./configure options with \b --help. It might look confusing, but some features like FITS or QT4 can be switched off, if the necessary library is not at hand and the feature is not needed. For example, if the GUI is not needed its compilation can be switched off by disabling QT4 support with \b --without-qt4. If you use a custom built root version on your system without QT support, but have a distribution packe (e.g. debian package) with QT support available, you can give the path to root executables, for example, with --with-rootsys=/usr/bin. All other paths are extracted from subsequent calls to \b root-config. Running \b ./configure will take some time. It tries to really check carefully that everything needed is available on your system, so that you get errors before you start compilation. If \b ./configure fails and you send a bug report please attach the file config.log. If \b make fails and you send a bug report please attach the complete output of make V=1. \b Reminder: These programs use shared libraries, i.e. whenever you re-compile part of the project some of them might be re-compiled as well. As a result already running programs might crash unexpectedly! This is \b not a bug. In principle configure also supports \verbatim make install \endverbatim which would install the package and the libraries in your system, although at the moment this is not recommended @subsection rootwarning ROOT warnings during compilation During compilation of the GUI you get some warning from root's TQtWidget.h. These warnings are completely harmless and can be ignored. However, it is sometimes advicable to get rid of them to get a clean compiler run which makes development easier. Therefore replace \verbatim inline void resize(const QSize &size) { QPixmap newSize(size); *(QPixmap *)this = newSize; } \endverbatim by \verbatim inline void resize(const QSize &sz) { QPixmap newSize(sz); *(QPixmap *)this = newSize; } \endverbatim in TQtWidget.h @subsection packages Required packages The following section gives a list of packages which were necessary after a fresh Ubuntu 11.04 installation. In addition to all the development packages the corresponding package with the library is needed. Note that a recent C++ compiler is needed supporting the latest C++0x standard. Required (configure will fail without them) - subversion - gcc - g++ - make - libreadline6-dev - libboost-all-dev - libx11-dev (needed for lesstif, qt4, root) FITS file support (datalogger, event builder) - libccfits-dev MySQL support (command line options, scheduler) - libmysqlclient-dev (optional for MySQL support) - libmysql++-dev (option for MySQL support) If you want 'did' - lesstif2-dev For JavaScrip support - libv8-dev To compile the GUIs - libqt4-dev - root (see section about root, currently recommended versions 5.18/00b-5.26/00e) To compile the raw data viewer - libglu1-mesa-dev To compile smartfact with astronomy support and moon - libnova-dev To compile tngweather - libsoprano-dev To compile skypeclient - libdbus-1-dev - libdbus-glib-1-dev To create your own documentation - graphviz - doxygen - help2man - groff - ps2pdf To create JavaScript documentation - jsdoc-toolkit For developers - autoconf - autoconf-archive - libtool - qt4-designer If you intend to change only Makefile.am but not configure.ac the \b automake package instead of the \b autoconf package should be enough. Some nice to have (FACT++) - colorgcc - colordiff Some nice to have (system) - fte - efte - htop Documentation (usually accessible through http://localhost/ for the tools above: - autoconf-doc - gcc-doc - graphviz-doc - libboost-doc - libmysql++-doc - libtool-doc - make-doc - qt4-dev-tools [qt4-assistant] - qt4-doc-html @subsection installroot How to install root 5.26/00 on Ubuntu 11.04 (natty) - install gpp4.4, gcc4.4, g++4.4 (root does not compile with gcc4.5) - make links to hidden X11 libraries:
cd /usr/local
sudo ln -s x86_64-linux-gnu/libX* .
- in the root source directory
./configure --enable-qt --with-cc=gcc-4.4 --with-cxx=g++-4.4 --with-xrootd-opts=--syslibs=/usr/lib/x86_64-linux-gnu --prefix=/usr/local
- \b make - sudo make install - pray - don't forget to set LD_LIBRARY_PATH correctly before you try to start the fact gui @section demos Current demonstration programs - \b dserver2: A virtual board (A TCP/IP server). It is sending a "hello" message after accepting a communication and then in 3s intervals the current UTC time. The board can be set to state 1 or back to state 0 (just as a demonstration) - \b dclient5: A control program. It accesses two viratual boards (start them with 'dserver2 5000' and 'dserver2 4001') If both boards are connected the START command can be issued to get them to state 'Running'. In this state an asynchronous time stamp can be requested sending the TIME command. to get back from Running to Connected use STOP. - \b test3: a dim console which allows to control all dim servers by sending commands via the dim network. - Both, \b dclient5 and \b test3 accept the command line options -c0, -c1, -c2 to switch between different console types (or no console in the case of \b dclient5). In the console you get help with 'h' and the available command with 'c' You get the avilable command-line options with --help First start the two dserver2s. Then start a dclient5 (if you want it with console use one of the -c options) and a test3 console (with one of the console options if you like) you can now control the hardware boards with the START, STOP and TIME commands or stop (Ctrl-C) and start one of the programs to see what's happening. In the test3 case you first have to \e cd to the server to which you want to talk by \b DATA_LOGGER. Don't forget to start \b dns if you want to control dclient5 from test3 via Dim. @section dimremarks Remarks about Dim usage To be able to write all received data directly to the FITS files, padding has been disabled calling dic_diable_padding() and dis_disable_padding(). This is done in our own error handler DimErrorRedirecter. Since this should be one of the first objects created in any environment it is quite save. However, every Dim client or server in our network which does not use the DimErrorRedirecter \b must call these two functions as early as possible. @section blocking Blocking programs at startup At startup most programs try to resolve the name of the dim-dns as well as their local IP address. After this Dim is initialized and tries to contact the dns. These are so far the only blocking operations. Be patient at program startup. They will usually timeout after a while and give you proper informations. @section addtab How to add a new tab in the gui? Do the following steps in exactly this order: - Insert the new page from the context menu of the QTabWidget - Copy the QDockWidget from one of the other tabs to the clipboard - Paste the copied QDockWidget and add it to the new tab (only the tab should be highlited) - Now click on the context menu of the region in the tab (QWidget) and change the layout to grid layout @section Documentation Each program has an extensive help text (except the examples). This help text can be displayed with the \b --help option. For each program a man-page is automatically created (from the help-output), which (at the moment) can be accessed with man ./program.man (Don't forget the ./ before the filename). With make program.html and make program.pdf a HTML page and a pdf document can be created from the man-page. With make doxygen-doc the HTML documentation as well as a pdf with the whole code documentation can be created. @subsection FACT++ programs Each documentation is also available with program --help or man ./program.man. In alphabetic order: - biasctrl [pdf] - datalogger [pdf] - dimctrl [pdf] - drivectrl [pdf] - evtserver [pdf] - fadctrl [pdf] - feedback [pdf] - fitsdump [pdf] - fitscheck [pdf] - fitsselect [pdf] - fscctrl [pdf] - ftmctrl [pdf] - getevent [pdf] - gpsctrl [pdf] - lidctrl [pdf] - magiclidar [pdf] - magicweather [pdf] - mcp [pdf] - pfminictrl [pdf] - pwrctrl [pdf] - ratecontrol [pdf] - ratescan [pdf] - showlog [pdf] - smartfact [pdf] - sqmctrl [pdf] - temperature [pdf] - timecheck [pdf] - tngweather [pdf] - zfits [pdf] @section References @subsection generalref General references - The C++ reference - boost.org: The boost C++ libraries - Boris Schäling: Die Boost C++ Bibliotheken - GNU Readline - GNU Ncurses - Distributed Information Management (DIM) - Distributed Information Management (DIM) - C++ reference - Qt homepage - Qt downloads @subsection boostref Boost references - boost::bind (V1.45.0) - boost asio (V1.45.0) - boost date_time (V1.45.0) - boost program_options (V1.45.0) - boost filesystem (V1.45.0) - boost regex (V1.45.0) - boost system (error codes) (V1.45.0) - boost thread (V1.45.0) - boost lexical_cast (V1.45.0) @subsection fitsref FITS references - The FITS data format - FITS homepage - CCfits - A C++ wrapper to cfitsio - fv - A very simple viewer to FITS file contents - topcat - Tool for OPerations on Catalogues And Tables @subsection qtroot How to integrate root in QT? - QT4: Creating custom widgets - root: QT integration (pdf) @section availableprograms Available programs - dns: Dim's domain-name-server (needed for any communication between Dim servers and clients) - did: A simple graphical interface to analyse everything in a Dim network @section Examples There are a few example programs - \b ./argv: Example for usage of the class Configure (command line options, configuration file) - \b ./time: Example for the usage of the class Time (time input/output, conversion) - \b ./log, \b ./logtime: A simple Dim-Service/-Client combination using MessageDimRX/MessageDimTX **/ // **************************************************************************