Pixel-ROD-Crate-Controller(Pxl-RCC) @ CPPM

Atlas

STcontrol

Atlas

Recipe for download, assembly, compilation and use of STcontrol

written by Jan <valenta@fzu.cz>; November 10th, 2005 (was: mar*.in2p3.fr:~valenta/work/README.txt)

Prerequisites

  • gcc 3.2 (right now with backward compatibility with old libraries, ie. 'ini gcc3' on CPPM computers)
  • ldd 2.14 (ini ld214)
  • CVSROOT=/afs/cern.ch/user/s/sctpixel/private/cvsroot
    (Don't forget klog -cell cern.ch -principal <username>)
  • All necessary environment variables (including those for Qt and Root) with respect to /atlas/valenta/work are set in /atlas/valenta/work/setup.csh:
    source /atlas/valenta/work/setup.csh

Fetching & Compilation of the Needed Software

Qt

Recently, the recommended Qt version is 3.3, downloadable at www.trolltech.com. The compilation is very time-consuming, however straightforward, and usually without errors (see included INSTALL file for settings of necessary environment variables etc.): ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.0.tar.bz2

USpinBox

Copy /afs/cern.ch/user/s/sctpixel/private/uspinbox.tgz, unpack, set paths, compile ('make' also the plugin directory). If you have the Qt in some non-standard location, copy these files:
cp libuspinbox.so.* $QTDIR/lib
cp uspinbox.h $QTDIR/include
for development using the designer IDE (not tested):
cp uspinbox.h $QTDIR/plugins/designer # probably unnecessary
cp plugin/libuintspinbox.so $QTDIR/plugins/designer
cp plugin/uspinbox.xpm /usr/share/icons # I didn't do that

Root

The recommended version is 3.10. The compilation is not needed, binary package for gcc3.2 is provided. Again, set the environment variables correctly, according to README/README. ftp://root.cern.ch/root/root_v3.10.02.Linux.RH7.3.gcc32.tar.gz

Pixel software

cvs checkout VmeInterface
cvs checkout RodDaq/CommonForHosts
cvs checkout RodDaq/RodCrate
cvs checkout -r Rod-Pixel-1-48 RodDaq/Dsp/Pixel
cvs checkout -r Rod-Pixel-1-48 RodDaq/CommonWithDsp 
(Check for newer revisions in the CVS. DSP code and CommonWithDsp revisions have to match!)
cvs checkout Applications/Pixel/PixLib
cvs checkout Applications/Pixel/ModuleAnalysis
cvs checkout Applications/Pixel/STcontrol
Compilation should go fine in this order: VmeInterface, RodCrate, PixLib, ModuleAnalysis, STcontrol. Always proceed according to the appropriate README.

Note 1: I had to define DF_INCL_DIR (/atlas/DataFlowSW/DF-00-09-00/installed/include) variable and add it to "include" lines in Makefiles of:

VmeInterface
Applications/Pixel/PixLib/PixTrigController
Applications/Pixel/PixLib/PixController
Applications/Pixel/PixLib/PixBoc
Applications/Pixel/STcontrol (Makefile is generated by qmake)

Example:
CFLAGS     = -DTSTAMP -funsigned-char -Wall \
             -I. -I$(DAQ_INCL_DIR) -I$(DF_INCL_DIR) -I$(ROD_DAQ)/CommonWithDsp
Note 2: Creation of libModuleAnalysis.so needed for STcontrol: In the linking (the last one, very long) command of compilation of ModuleAnalysis executable change the name of the output file to libModuleAnalysis.so and add "-shared" option.

Note 3: In STcontrol, I had to add #include "uspinbox.h" to ConfigWizardBase.cpp, BocEditor.cpp and RodEditorBase.cpp. These file are generated automatically during the compilation from the respective .ui files (using uic) so you have to alter them after one round of compilation. If you didn't #include the "uspinbox.h", the compilation outputs the following non-stopping warnings:

BocEditor.h:27: forward declaration of `struct USpinBox'
BocEditor.cpp:969: invalid use of undefined type `struct USpinBox'
and the compiled STcontrol crashes at the moment of opening of the
configuration wizard.

Generating Config File

  1. In ModuleAnalysis (MA), select "Get ROOT files for stave/sector" from the main menu, and fill in the panel. Measurement type should be BURN, LOAD,...
  2. Still in MA, select "Create config files for stave/sector" from the main menu to generate all configs, fdacs, tdacs, and masks files from those root files. If you have saved all the files in the previous step in one directory, change the "variable path" to match! (E.g. M%s_%t%i.root, see MA Help Website)
  3. In STcontrol, the module tab of the config wizard (File->New Cfg) will allow to specify an entire stave. When you select the directory where you've saved the config+co files from above action, it will display them in the module table.
  4. Now you can save (File->Save cfg file) the configuration as .cfg.root and load it again later.

Configuring the Modules

  1. Make sure cooling is on and modules are powered.
  2. Load the configuration (File->Open cfg file)
  3. Right Panel->Tool Panel: Initialize all RODs. Send Command. (to test the correct SBC-ROD communication, highlight the ROD in the left panel and select Edit->Show ROD HW Info)
  4. Right Panel->Tool Panel: Configure all modules. Send Command.

Scanning the Modules

  1. Right Panel->PixScan Panel
  2. Select the configuration, alter necessary scan parameters. Select file to save results to, fill in the scan label. Start scan.
  3. To view the results: Right Panel->Data panel. Main Menu->Load Root DB Data File, select the file saved in previous step. Select the desired scan, according to its label.
  4. Navigate to the desired result and enjoy!
Note: For the Threshold scan (and may be also others) disable filling and keeping of the occupancy histos in the Histos tab. Occupancy histos cause extreme memory consumption which results in STcontrol being killed.

Remarks, Comments

void
Let us know, if these recipes works or you want to suggest improvements.
(Valenta@cppm.in2p3.fr, Hoffmann@cppm.in2p3.fr)


Created: June 2004; last updated: June, 14th 2004