Most of the stuff here is probably outdated. The webpage of the TCK Presenter is


The TCK-Presenter is a tool to visualize a con guration of the High Level Trigger from the LHCb experiment. It should e.g. help the expert shifter to understand the trigger configuration or can be used by somebody working on an offine analysis to understand the trigger state which was used while taking data. The main requirements of the TCK-Presenter Project are:
  • to make an intuitive representation of the given TCK
  • to make the representation technically easy (no additional tools or plugins should be required by the user)
  • to make the code flexible for further implementations
The representation is based on webpages, which show the algorithms of the HLT as a tree. The webpages will conform to the HTML standard, meaning that no plugins for the webbrowser are needed. In addition it is possible to see the rates and retention fractions in the representation. The tree structure contains four levels.
  • HLT1 and HLT2, the two main parts of the HLT
  • alleys
  • lines
  • flow of sequences inside a line (cuts, track extrapolation, vertexing
The nodes contain various information. All nodes have a name, colour and text. There are four types of nodes, which are coloured different. Most of the nodes are green, e.g. the physics alleys and lines. Some of the alleys are for technical reasons and coloured in purple. The cuts in the sequence flow of a line are yellow. The text below a node shows rates and retention fractions. The representation using webpages is split into two parts. The offine and the online part. The difference between them is that the offine part is not filled with any rates or retention fractions, so that no continuous update of the pages is needed. One can choose the TCK, the partition and the modus (off-/online) in the indexpage on plus501. This site contains all available TCKs.

Important points

  • If you change the offline-scripts or the http-server, you might need to reproduce the webpages. If so, just delete the old folder for the TCKs you want to reproduce and rerun the script.
  • pydot and pyROOT are running on plus501. But it was configured very fast. Contact Niko if problems appear.


  • Hlt Commissioning meeting: every week Monday at 16h00 (2-1-027).


use the TCK-Presenter

  • The directory used for the TCKs is /var/www/vhosts/Tck presenter/httpdocs/TCKs/ on plus501
To use the TCK-Presenter one needs to go on http://plus501. The Indexpage with various options shows up. If a TCK webpage structure was already created the TCK is available in the combobox of the Indexpage. One needs to choose only a TCK for the offline view and a partition in addition for the online view. If a TCK is not available in the combobox, the TCK needs to be created. Start the TCK-Presenter on plus501 with:
  • python TCKPresenter <TCK> /var/www/vhosts/Tck presenter/httpdocs/TCKs/
The webpages will be created and are ready for the use of the http-server. If you want to create all TCKs which are not yet created just run:
  • python TCKProducer (the Path is hardcoded in the script, you might want to change it there)

To create trend plots for the rates, please launch the Online Presenter using the following switches:

  • -K: key-file of the trigger configuration rate services to be trended. This is a simple text file, each line of which is a service identifier, such as: RICH1_Adder_1/GauchoJob/MonitorSvc/monRate/Hlt1Hlt1GlobalLineAccepts. An example file can be found in: /var/www/vhosts/tck_presenter/httpdocs/TCKs/TCK>/basic/dump
  • -I: image path, to dump the plots of the trends, so that the TCKPresenter can pick up the plots. This would currently be: /var/www/vhosts/tck_presenter/httpdocs/historys/ The size can be set using -W and -H. Image plots have a timestamp and partition tag when created, please be careful when monitoring!
  • -M: mode to run the Presenter, in this case "batch" to bypass the GUI.
  • -P: partition to use. This will replace the first member of the service identifiers given in the key file with the partition specified (i.e. FEST)


Several different modules are used in the implementation of the TCK-Presenter. The basis for the visualisation are the return values of the getAlgorithms-function and the getProperties-function in the TCKUtils package. Both functions take a TCK as an argument. The return value of the getAlgorithms function shows the collection of algorithms used in the high level trigger. The getProperties gives thresholds back used in the trigger configuration. The dotcreater script takes those strings and converts them into a dot-string for each webpage (written in the dot language for graph representations), which is then converted into an svg picture embedded into a xhtml site. The conversion is done by pydot. Two main webpage structures are created. One is for the offline view the other is for the online view. The tree structures remain the same. However it is possible to fill additional data in the basic structure for the online view, which will be done by the apache server. After the webpages are created they are saved in a certain directory on plus501. Typically the directory is /var/www/vhosts/tck presenter/hhtpdoc/TCKs/. The basic structure will be put in directory/TCKs/TCK/basic/ the offline structure in directory/TCKs/TCK/offline/. The access to the webpages is given through a startpage, which takes the TCK, partition and the modus (on-/offine). The apache server will load a basic structure or a offline structure of the TCK tree in respect to which modus was choosen.
  • It is important to point out that the view is separated into an offline and online part as well as the creation of the webpages. Both are independent from each other and mean something different.

File structure

The fi le structure on plus501 (basic and offine):

  • /var/www/vhost/tck presenter/httpdocs/TCKs/TCK/basic/ + basic_<pagename>.xhtml
  • /var/www/vhost/tck presenter/httpdocs/TCKs/TCK/offline/ + extended_<pagename>.xhtml
Where <pagename> is de fined as <pagename> := <Hlt>(_<system>(_<alley>(_<line>))) Brackets mean that these part of the naming is optional. Examples for them are:
  • <Hlt>_<system>_<alley>_<line> = Hlt_Hlt1_DiMuon_Hlt1DiMuonNoIPL0Seg
  • <Hlt>_<system>_<alley>_<line> = Hlt_Hlt1_Hadron_Hlt1SoftDiHadron


TCKUtils.utils is a package in Moore, which contains functions. The getAlgorithms-function returns a string of algorithms deployed by a given TCK. The string contains already the HLT algorithm hierarchy. The string is read in by the dotcreater, who will transform the string in a tree structure.

beschreibe die struktur (whitespaces), hierarchie,

First of all the dot creator reads in the data for a certain TCK given by TCKUtils.utils. Somehow some of the line names may contain letters which can make problems in the svg representation. For this reason, the names are coded in a distinct way.

Important for the handling are the following functions:

  • replacer_to_code( word ) replaces some letters to codings. Important is that "_" is replaced first.
  • replacer_to_html( word ) replaces some letters to html readable signs.
  • replacer_to_sign( word ) replaces some codes back to there original letters.

It should be the case that replacer_to_sign(replacer_to_code( word )) = word for all possible words. As well as the fact that all possible siges which can appear are handled. The rules are in myConst. Here an example:

replacer_to_html(replacer_to_code( "Hlt1L0DiMuon,low_Mult>bla" )) = replacer_to_html( "Hlt1L0DiMuon_002_low_001_Mult_003_bla" ) = "Hlt1L0DiMuon‚low_Mult>bla"

  • "_" was substituted by "_002_"
  • ">" was substituted by "_003_"

-- KlausNeumann - 2009-08-25

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng graphstructure.png r1 manage 6.6 K 2009-08-06 - 16:33 KlausNeumann the structure of the TCK tree
PNGpng offline_access.PNG r1 manage 31.7 K 2009-08-25 - 11:29 UnknownUser use case: client wants to see the offline representation of a given TCK
PNGpng online_access.PNG r1 manage 34.4 K 2009-08-25 - 11:30 UnknownUser use case: client wants to see the online representation of a given TCK
PNGpng presenterproject.png r1 manage 2.9 K 2009-08-06 - 15:22 KlausNeumann representes the relations between the scripts
Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r14 - 2010-03-03 - JeskoMerkel
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback