RICH Upgrade Database

Inventory, Bookkeeping and Connectivity Database project

A note describing the functionalities of the database (DB) is available at!master/navigator/document?P:1414255486:100275478:subDocs. The DB structure is based on device types. For the time being the device types are: MAPMT, BaseBoard, FEB, BackBoard, EC, PDMDB, PDM.

How to connect to the database from outside the CERN network



  • Remote Desktop to and from there Remote Desktop to a WINDOWS PC inside the CERN network.
  • OR, use the CERN remote desktop gateway service ( to connect directly to a WINDOWS PC inside the CERN network.
  • OR, use ssh from windows, for instance with PuTTY or sons and do the same sequence of commands explained for linux.

Contact in case of troubles.

DB operations

First select the device type. Then choose between two modes of operations:
Hardware View: click this button if you want to insert new devices in the DB and/or to insert/update/retrieve test, calibration and setting data.
Logical View: click this button if you want to insert/update/retrieve device locations.


Hardware View

You can change the selected device type clicking on the button at the top of the panel shown below. The panel could be slightly different with respect to the one shown in the attached image, since the functionality depend on the selected device type.
In the following sections you can get instructions to operate the different device types.




The Summary button opens a tree containing the serial numbers and the status of the MaPMTs inserted in the DB. There are three available status: NOT_READY (the MaPMT is not validated yet), READY (the MaPMT has been tested and validated) and BROKEN. Type a pattern in the Serial number filter text field at the top to make the search easier. Then click the green tick. Select the corresponding serial number and click on the Show selected button in order to retrieve MaPMT data.


If no calibration data have been inserted yet, a message will appear. Select the desired start of validity date in order to retrieve calibration data. An example of the user interface showing the data for a MaPMT is shown in the image below.


The pixel data are accessible via the 64 buttons to the right of the panel. Clicking on one of these buttons it will appear a panel like the one shown below


It is also possible to access Datasheet, Test Infos and Quantum Efficiency data. The datasheet panel has a color code based on quality assurance facilities requirements to Hamamatsu.


Create Devices

This button allows to insert MaPMTs in the DB.

The automatic creation of MaPMTs, together with the insertion of their datasheet in the DB, is possible if you have the .csv datasheets list provided by Hamamatsu. The csv file must be comma separated!

First specify the delivery batch lab, date and number. Click on the Select file button. By default the search will start in your afs home directory. Click on the Import button to complete MaPMTs insertion in the DB. Wait until the progress bar will close and then check if the MaPMTs are actually imported in the DB as described in the Summary section.

A message of error will appear if there is at least one MaPMT already inserted in the DB. In that case none of the devices in the list will be imported.

You may also create and import the datasheet of a single MaPMT by hand, clicking on the Import values by hand button.


Change Status, Quality Flag

Click this button to change MaPMT properties like status and quality flag. Right-click on the corresponding serial number and select the value you want to change. The available status are described in the Summary section and are NOT_READY, READY and BROKEN. The quality flag is a feature to group and easily identify high and low quality MaPMTs.

Insert/Update Device Properties

Select MAPMT as the default device type. Click on Start Hardware View and then click the Insert/Update Device properties button. To import data from a file, click Import MaPMTs load measurements, select the file you want to import and click Import. By default the search will start in your afs home directory. A popup panel will open to show the serial numbers of the MaPMTs you want to import and if some MaPMTs already have the calibration data. If some PMTs are not present in the DB, an error message will appear asking you to create first that MaPMTs. Click the Continue button to confirm the data import, or the Abort button to not import data.

Export data

Click to export data to a .txt file. First you have to select the data type to export (so far only Datasheet export is implemented). Transfer the serial numbers to the right table clicking on the button with the arrow. Click Export data. The file will appear in your AFS home directory.



Create new devices and open table of preliminary tests

Select BaseBoard as the default device type. Click on "Start Hardware View". Click on "Create Devices". A table with the fields required by the quality assurance procedure is opened. Fill the fields as required. If the date of the tests is different from the date of writing, change it accordingly. The hour/minute/second fields are indicative and required if you want to retrieve the table with the same serial numbers (to distinguish it from another table created in the same day). Press import to create the new devices in the database. A search within the already existing serial numbers will be performed. If any device with the same serial number has been already inserted in the database, the import will be aborted (i.e. none of the devices will be inserted).

Update an existing device with the complete preliminary tests

If the table described above it's not complete, for instance the information on the HV is missing, you can integrate this information later on. Select BaseBoard as the default device type. Click on "Start Hardware View". Click on "Insert/Update Device properties". Click "Retrieve test table by test date", and select the date/time you need. Fill the missing fields in the table and press update.

Update an existing device with the data from anodes and dynodes continuity tests

Important: the files produced with Windows PowerShell must be converted from dos to unix format.
1) Move to the folder containing the files and open them with vi *. Type esc and :setautowriteall. Type ::bufdo %s/\r//ge. Keep pressing enter until all files are modified. Type :wq. Convert them using the dos2unix command.

Select BaseBoard as the default device type. Click on "Start Hardware View". Click on "Insert/Update Device properties". Click "Import anodes/dynodes data". Select the folder containing the files and press



Other devices

  • Summary : open a table with all the devices of the selected type contained in the DB.

  • Create a Device : see here. For the time being no datasheet informations are required.

  • Change Status : a table will be opened. Right click on the corresponding serial number and select the new device status.

  • Insert/Update Device Properties : a table will be opened. Select the corresponding serial number and click on Insert/update Device properties to insert new lens data.

Logical View


Search by device type

Click to see current device locations of the selected type.


To retrieve the device location history, with interval of validity date, select the corresponding row and click on the See device history button.


Search by location

Click to retrieve the devices installed in a selected location at any time. First you have to select the location type. For the time being the available location types are LAB and TestBeam.

  • LAB : select the LAB and click on the See location history button. A table with the devices of the device type selected at the beginning will appear.

  • TestBeam : First select the testbeam date. Then navigate down through the hardware structure to show devices of the selected device type installed in the corresponding location.

Insert Devices

A table with all devices not yet allocated will appear. If the wanted device does not appear, it means either that the device have not been yet inserted in the DB or it is located somewhere else (see Remove Devices).


Multiple selections are allowed only for the Lab location type. Select the devices, the location type and click Ok.

  • LAB: a validation panel will appear. Insert all the informations and click Ok.

  • TestBeam : Only READY devices can be inserted in Testbeam location type (to change the status you need to use the Hardware View. See here to know how to change device status). First select the testbeam date. Then navigate through to the hardware structure and click on the desired location. A validation panel will appear. Insert all the informations and click Ok.

Remove a Device from a location

A table with all allocated devices will appear. Select the devices you want to remove and click on Remove selected devices from their locations. A validation panel will appear. Insert all the informations and click Ok.

IBCDB technicalities

The IBCDB project is running as an autostart service on the pclbrich02 CentOS 7 machine.
The WinCC 3.15 project name is lbRichUpgradeIBCDB and the project path is /localdisk/WinCC/lbRichUpgradeIBCDB.
The local git repository can be found in /home/Packages/git/ECS. The remote repository is at

To stop the service connect on pclbrich02 with the lbrich account name and type: sudo systemctl stop lbRichUpgradeIBCDB

The service has been created using the following steps:
- the .lbRichUpgradeConf file has been created in /etc containing: proj=-PROJ lbRichUpgradeIBCDB
- the .lbRichUpgradeIBCDB.service file has been created in /etc/systemd/system/ containing:

Description=lbRichUpgradeIBCDB WinCC OA project

ExecStart=/opt/WinCC_OA/3.15/bin/WCCILpmon $proj


Follow the instruction at this this link to manage the service.

-- GiovanniCavallero - 2015-11-19

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng DBlogic.png r1 manage 21.3 K 2016-11-10 - 18:35 GiovanniCavallero  
PNGpng DBoperations.png r1 manage 46.6 K 2016-11-10 - 17:19 GiovanniCavallero  
PNGpng EC.png r1 manage 36.4 K 2018-06-05 - 10:19 GiovanniCavallero  
PNGpng HWview.png r1 manage 21.8 K 2016-11-10 - 17:32 GiovanniCavallero  
PNGpng Logic.png r1 manage 29.8 K 2015-11-19 - 22:39 GiovanniCavallero  
PNGpng MaPMT.png r1 manage 29.9 K 2015-11-19 - 22:39 GiovanniCavallero  
PNGpng MaPMTdata.png r1 manage 48.4 K 2016-11-10 - 17:45 GiovanniCavallero  
PNGpng MaPMTval.png r1 manage 48.9 K 2015-11-19 - 22:39 GiovanniCavallero  
PNGpng StartPanel.png r1 manage 43.3 K 2015-11-19 - 22:35 GiovanniCavallero  
PNGpng data.png r1 manage 92.8 K 2018-06-05 - 10:02 GiovanniCavallero  
PNGpng datasheet.png r1 manage 68.6 K 2018-06-05 - 10:19 GiovanniCavallero  
PNGpng deviceHistory.png r1 manage 39.8 K 2016-11-10 - 18:41 GiovanniCavallero  
PNGpng export.png r1 manage 20.3 K 2016-11-10 - 18:28 GiovanniCavallero  
PNGpng exportData.png r1 manage 43.2 K 2018-06-05 - 10:19 GiovanniCavallero  
PNGpng hwView.png r1 manage 30.7 K 2018-06-05 - 10:00 GiovanniCavallero  
PNGpng insertDev.png r1 manage 45.7 K 2016-11-10 - 18:45 GiovanniCavallero  
PNGpng insertPMT.png r1 manage 15.4 K 2016-11-10 - 18:20 GiovanniCavallero  
PNGpng logical.png r1 manage 45.2 K 2016-06-19 - 18:57 GiovanniCavallero  
PNGpng logicalHistory.png r1 manage 45.9 K 2016-11-10 - 18:38 GiovanniCavallero  
PNGpng moveDevices.png r1 manage 37.1 K 2018-06-05 - 10:19 GiovanniCavallero  
PNGpng pixelData.png r1 manage 32.6 K 2018-06-05 - 10:19 GiovanniCavallero  
PNGpng startDB.png r1 manage 30.1 K 2018-06-05 - 09:50 GiovanniCavallero  
PNGpng summary.png r1 manage 85.8 K 2018-06-05 - 10:01 GiovanniCavallero  
Edit | Attach | Watch | Print version | History: r36 < r35 < r34 < r33 < r32 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r36 - 2019-05-27 - GiovanniCavallero
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback