TT6 Module Test Analysis Graphical User Interface
The TT6 Module Test Software uses Root for the Graphical User Interface and for Histogramming. The analysis is performed using TT6 Test Beam software from "ApvAnalysis" package of ORCA .


Compilation and Making the Executable
  1. get the source code from CVS following instructions .


  2. the directory structure of the client is the following
     
                                   Client
                                      |
        ---------------------------------------------------------------------------
        |        |       |          |       |      |       |      |       |       |
       suppl   anal    readers    gui    xmldb    socket  bin    lib     doc    macro
    
      
    • suppl : codes supplementary to server codes needed by the client are kept in include and src subdirectories respectively
    • anal : codes related to analysis are kept in include and src subdirectories respectively
    • readers: codes related to event reading from Root File are kept in include and src subdirectories respectively
    • gui : codes related to Graphical User Interface are kept in include and src subdirectories
    • xmldb : codes related to XML file parsing/writing are kept in include and src subdirectories
    • socket : codes related to socket communication (needed to retrieve information from DB) are kept in include and src subdirectories
    • bin : the client executable will be placed here after compilation
    • lib : the shared library will be placed here after compilation
    • doc : the documentation files (in html and normal text format) are stored here
    • macro : the root macros for plotting/analysing histograms of "Root" format are stored here


  3. Requirements :
    • One needs (OPTIONAL) to have the basic DAQ Software
      This is provided in a tar file. One should do
      gunzip official_lyon.tar.gz
      tar xvf official_lyon.tar

    • If the CMS-Like DAQ software is already installed in the PC then there is no need to install the above software.

      Users not interested for DAQ aspect of the client are not REQUIRED to download abobe software.

    • For the corrent application it is mandatory to have Xerces version 2_1_0 which should be installed using following steps
      • Download the source(Xerces-C-src_2_1_0.tar.gz) from Xerces_2_1_0 .
      • Uncompress and open the tar file
        gunzip xerces-c-src2_1_0.tar.gz
        tar xvf xerces-c-src2_1_0.tar
      • Set the environmental variable XERCESCROOT which should point to xerces-c-src2_1_0 directory (which is created from the tar)
        setenv XERCESCROOT xerces_path
      • Now configure and install it!
        cd $XERCESCROOT/src/xercesc
        autoconf
        runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthread
        gmake



    • ROOT Version 3.05 should be installed. The "ROOT 3.05/07 complete source tree" can be obtained from Root_3.05 . Please follow the instructions Root Installation . Make sure during configuration enable thread option is used.
      ./configure linux --enable-thread


  4. one needs the specify a few environmental variables before compilation. The script "Configure" is provided in the top directory. This script should be modified accordingly depending on individuals own system.

    For those who use tcsh shell
    
            setenv DAQ_HOME         server_path   [should point to the 
                                                 ..../official_lyon/Daq
                                                 of the Lyon software]
            setenv ROOTSYS          root_path     [should point to ROOT]
            setenv ROOT_DIR         ${ROOTSYS}
            setenv LD_LIBRARY_PATH  ${LD_LIBRARY_PATH}:${ROOTSYS}/lib
            setenv PATH             ${ROOTSYS}/bin:${PATH}
    
            setenv XERCESCROOT       xerces_path  [should point to xerces2_1_0]
            setenv LD_LIBRARY_PATH  $XERCESROOT/lib:$LD_LIBRARY_PATH
    
            setenv APPL_DIR         application_path [should point to current application]
    
            setenv DAQFLAG -DNO_SHMDAQ   Use this environmental variable if 
                                          you do not want to use the application as a 
                                          shared memory client of CMS_Like DAQ. 
                                          In this case there is no need to set DAQ_HOME 
         


    For those who use bash shell
    
            export DAQ_HOME=server_path         [should point to the 
                                                 ..../official_lyon/Daq
                                                 of the Lyon software]
    
            export ROOTSYS=root_path            [should point to ROOT]
            export ROOT_DIR=${ROOTSYS}
            export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ROOTSYS}/lib
            export PATH=${ROOTSYS}/bin:${PATH}
    
            export XERCESCROOT=xerces_path      [should point to xerces2_1_0]
            export LD_LIBRARY_PATH=$XERCESROOT/lib:$LD_LIBRARY_PATH
    
            export APPL_DIR=application_path    [should point to current application]
    
            export DAQFLAG=-DNO_SHMDAQ   Use this environmental variable if 
                                      you do not want to use the application as a 
                                      shared memory client of CMS_Like DAQ 
           
    Once Configure script is ready one needs to do

    source Configure
  5. after setting environmental variables one needs just to do in the top directory Client :

    gmake

    There individual Makefiles in suppl, anal, readers, gui and xmldb directories respectively and a overall Makefile in the top directory.



Running Client for Analysis and Database Application
Users are required the use "DAQFLAG" in the Configure file to be able to compile only relevent parts of the application.
  1. start the application from the top directory Client by typing bin/ModuleTestApp.exe
    Please make sure before starting the application that the environmental variables ( DAQ_HOME, ROOTSYS.....) are properly set. Otherwise use the source Configure to set them properly.
  2. The application will appear with three Tabs .
    • Control : Data Acquisition parameters are set and the control of Acquisition are done here.

      In this case one can ONLY use the option to read data from a ROOT file with Raw Data (before any analysis) taken through XDAQ application e.g. Beam Test Data/System Test Data
    • Online : Histograms during Data Acquisition can be viewed in this Tab.
    • Analysis : Histograms already stored in a Root file can be viewed and analysed in this Tab. There are options for viewing output root files from different ("ARC", "Lt", "HybridDialog") clients. One can also compare few histograms (pedestal, raw-noise, cm-noise, Calibration charge) from local root files with values stored in database.
    • The Documentations are available ONLINE in the client itself. One needs to click Online Help button to get Help.
    • To terminate the application at the end of the end of data taking/analysis... the Exit and Release Channels button should be clicked. These would release the channels (if they are requested) and terminate the application.

Users not interested for the Data Acquisition can neglect the following part of the Documentation

Running the Server and Client and Taking Data
  1. the Shared Memory Servers can be started using the script startSHMServer. Before starting the Servers please check 'daq.xml' file in the 'Daq_CMS_Like/Acquisition/bin' directory and make necessary modifications for your system
  2. The Shared Memory Servers can be stopped at 'one go' using the script stopSHMServer. One can "Switch Off" activation of specific servers, bu commenting the corresponding line in the script startSHMServer.
  3. start the client from the new-gui-test directory by typing bin/ModuleTestApp.exe Please check before starting the application the environmental variables ( DAQ_HOME, ROOTSYS.....) are properly set. Otherwise use the source Config to set them properly.
  4. In the client interface individual Tabs dedicated for initialization/data taking and analysis purposes.
    • TSC : initialization of the Trigger and Sequencer Card are done here.
    • FED-FEC-CCU : initialization of the FED, FEC and CCU channels are done here.
    • APV : initialization of APV chips and setting of their register values are done here.
    • HV Control: initialization of HV Channel settings and switching ON/OFF of the individual channels are done here.
    • Control : Data Acquisition parameters are set here and the control of Acquisition are done here.
    • Online : Histograms during Data Acquisition can be viewed in this Tab.
    • Analysis : Histograms already stored in a Root file can be viewed and analysed in this Tab. There are options for viewing output root files from different ("HybridDialog", "TT6", "ARC", "Lt", "TestBeam") clients.
    • Comparison : Histograms already stored in a Root file can be viewed and compared in this Tab. There are options to view/compare output root files from different ("TT6, "ARC", "LT") clients. One can also compare histograms (pedestal, raw-noise, cm-noise, Calibration charge, rise time) from local root files with values stored in tracker database or local XML file.
    • XY-Control : the control of XY-moving plane is done here.
    • TRHX-Control : the initialization of TRHX channels and their monitoring are done here.
  5. The Documentations are available ONLINE in the client itself. One needs to click Online Help button to get Help.
  6. One can save the Settings (FED, APV...) into the xml file using the Save to XML button in the GUI. This would enable a pop-up menu to select the file name.
  7. The requested Channels can be released using the Release button in the GUI.
  8. The relevant data from a Root File can be saved into a XML file for the database using the button Save Root File to XML . Clicking this button would enable a pop-up menu to select the name of the Root File, Module Id, name of the Operator and the Definition of Bad Channel (if the user wants to avoid the default definition). Once these parameters are selected the information will be written into XML file with the same as the root file name but with .xml extension. The file will be saved in the top directory.
  9. The data taking can be started automatically using the Automatic DAQ Start button. This would enable a pop-up menu to select the name of the XML file with FED, APV.. settings, the mode of APV, the status of the inverter (ON/OF), the HV status and the root file name. One is STRONGLY recommended to use manually the APV tab to start the frame (with hardware, pll, TTCRx and APV Reset) before using the Automatic Data Taking.
  10. To terminate the application at the end of the end of data taking/analysis... the Exit and Release Channels button should be clicked. These would release the channels (if they are requested) and terminate the application.