Jeff Dech's Code Locations

From tigwiki

Jump to: navigation, search

Contents

[edit] Audience

This page is for people who work with TIGRESS. This has links to various pieces of code I have developed over the summer and a brief overview of how to use it. The code is commented so if you need to, go ahead and check out the source code as well as CAEN's documentation on their library. Their library is very non-uniform and all of the functions do things a bit differently so keep that in mind when reading through the code.

[edit] Locations

All of the source code can be found in the gg account. SSH into the account and then go to /home/gg/public_html/hv, everything is in that folder or a sub folder.

[edit] HV Status

All of the PHP code for the page is in /home/gg/public_html/hv. The main code is in hv_status.php. It calls all of its XML reading functions from read_xml.php and the rest of its functions from hv_functions.php. All class declarations are found in classes.php. The PHP code calls a C program that gets all of the status info from the crate and then writes it to an XML file that is then parsed by the PHP code. The C program is HV_Control_v2 and its source code is all contained in /home/gg/public_html/hv/HV_C_Code.

[edit] C Component

The C component has a very simple scheme. It calls an initialization function that sets up some wrappers and some semaphores. It parses the command line arguments and calls a function that sets up with communication with the crate over the network. Once that is set up, it gets a map of the crate and then gets the data from the crate and dumps everything into an XML file and just sets up the tags. Information on the tag scheme can be found at the wiki page on the High Voltage Status Page. After it dumps the data into XML, it cleans up its pointers, closes the link to the crate and calls a finalizing function that closes down the semaphores and other things that the initialization function set up.

[edit] Crystal Info Database

The crystal database code consists of 2 pages. The first, found here (source code can be found at /home/gg/public_html/database/show_all.php) looks up all of the data about every crystal in the database (name, detector serial number, operating parameters, resistivities, etc). The second, found here (source code can be found at /home/gg/public_html/database/find_missing.php) goes through the database and determines any entries that are missing data and lists them and what data sheets are missing. For a legible version of the SQL queries used, look at /home/gg/public_html/database/queries.txt.

Personal tools
Experiment Pages