Local Offline Overview
The local offline processes LDF into digi and uses calibrations that are installed in the SLAC database to produce reconstructed and high level data analysis files. The goal is to have a way to quick debug and characterize the beam during the set-up. If there is a copy of the database locally then we can use it to process events even when the connection to SLAC is down.
There will also be an offline monitoring running locally.
Computer names in the PS area
Cern is filtering ports below 1024! sshd is running on port 22 by default. I was setting it on 2222 temporarily, but this was not appreciated. Hence, the computers are not accessible from outside CERNCurrently being updated, under construction. The names of the computers and IP's have to be updated.
"Socket-Gleam" PC: name ??? (at Pisa, was called pcglast37), IP ??? pcglast37.cern.ch, IP 137.138.66.137, username online, password * **(ask somebody!). Intended for online analysis using socket-Gleam. BeamtestRelease installations are found in /data/users/online/builds. The latest build is *BR v4r0909p3 in /data/users/online/builds/BeamtestRelease-v4r0909p3-rh9_gcc32opt. For detailed instructions on how to use GLAST software, check the workbook (link?). Here, a quick list only to analyze data:
- source /data/users/online/builds/BeamtestRelease-v4r0909p3-rh9_gcc32opt/BeamtestRelease/v4r0909p3/cmt/setup.sh
- ln -s /pathToDataDir/nameOfLdfFile.ldf file.ldf
- $GLEAMROOT/$CMTCONFIG/Gleam.exe $BEAMTEST06ROOT/jobOptions/ldf2digi.txt
- $GLEAMROOT/$CMTCONFIG/Gleam.exe $BEAMTEST06ROOT/jobOptions/readigi_runrecon.txt
With some luck, you should have digi.root, recon.root, merit.root, and calTuple.root. For creating the beamtest tuple, check $BEAMTESTTUPLEROOT/src/envVarOptions.dat. Set the appropiate env variables, and execute:
- $BEAMTESTTUPLEROOT/$CMTCONFIG/RunRootAnalyzer.exe $BEAMTESTTUPLEROOT/srv/envVarOptions.txt
For updating the calibration database description and the external libraries, there is a simple script ~online/bin/syncWithSLAC. It asks for your SLAC afs user name and password, runs rsync, and destroys the afs token again.
"Data-server" PC: name ??? (at Pisa, was called pcglast30), IP ??? pcglast30.cern.ch, IP 137.138.66.138, username online, password *** (ask somebody!). Has ca. 500GB disk space. Doesn't have a monitor. Intended as data server only. Should store the root files produced in the SLAC pipeline. We need a concept how to do it.
...
Describes policy and steps for updating . When things become stable we will have a CCB.
Policy for
...
Reprocessing
Describes policy and steps for updatinreprocessing. When things become stable we will have a CCB.
Environmental Variables for Database
Setting up the environment so that one can acess the ORACLE database
Source /u/gl/glast/pdb_config/dpf_config_prod.csh (or .sh if you use BASH) to run the pipeline text-mode management tools, which are installed in $PDB_HOME (which is set by the config script).
How to install mySQL as a server
From Leon and is currently udner review by Joanne (Jul 25 2006)
How to install MySQL as as server on your own (Windows) machine, install a local copy of the database, and get Gleam running without a network connection: (Disclaimer: I did all this as a rank novice, so there are probably better ways to do some of these things. But I think they will all work.)
1) Download the binary from www.mysql.com/downloads. You want mysql 3.23.56 (was in April 2003, anyway)
2) Unzip the file into a temporary directory.
3) Run setup.exe; install into the default directory (usually c:\mysql). Add c:\mysql\bin, for example, your path.
4) Write a file called my.cnf (using notepad, for example) containing the following lines:mysqld
basedir=c:/mysql
datadir=c:/mysql/data
and put it in the root directory of your boot drive (c: in our case)
5) Install the server service, and start it:cd c:\mysql\bin
>mysqld --install
>NET Start MySQL
(I believe that the server will restart at each subsequent boot.)
6) Try it out. You need a password, which you can get from Joanne Bogart or Leon Rochester:>mysql -u glastreader -h centaurusa.slac.stanford.edu -p calib
Enter password: ***********
mysql> ...
See http://www.slac.stanford.edu/exp/glast/ground/software/calibration/docs/mysqlDirect.shtml for some examples.
7) Import the calibration database:
"Dump" the database from the central server. I think to do this you need to be logged on to our server, which is centaurusa.slac.stanford.edu. Once logged on, the correct command seems to be:>mysqldump -u glastreader --opt calib -p > mydumpfile.sql
Enter password: ************
(We will eventually have this dumpfile on the glast ftp server.)
Move the file to your machine (ftp, mounted disk, whatever; it's an ascii file) and read it back:>mysql -u root
mysql> create database calib;
mysql> \q
mysql calib < mydumpfile.sql
mysql> use calib
Database changed
mysql> show tables;
-----------------
Tables_in_calib |
-----------------
junk |
metadata_v0 |
metadata_v1 |
metadata_v2 |
metadata_v2r1 |
-----------------
5 rows in set (0.00 sec)
8) Set up users and passwords:
In order for Gleam to work, you need a glastreader user. Set it up as follows:> mysql -u root
mysql> grant usage on . to glastreader@localhost identified by 'glastpassword';
mysql> grant select on calib.* to glastreader@localhost identified by 'glastpassword';
(and maybe...)
mysql> grant usage on . to glastreader@"%" identified by 'glastpassword';
mysql> grant select on calib.* to glastreader@"%" identified by 'glastpassword';
mysql> select host, user, password from mysql.user;
------------------------------
host | user | password |
------------------------------
localhost | root |
|
% | root |
|
localhost |
|
|
% |
|
|
% | glastreader | xxxxxxxxxxxxxxxx |
localhost | glastreader | xxxxxxxxxxxxxxxx |
------------------------------
6 rows in set (0.00 sec)
'xxxx...' is the encrypted form of the password you just typed in... Actually, it's not 'xxxx...' but I x'ed it out so you wouldn't see it. It's what MySQL uses to check the plaintext password. The password 'glastpassword' is the same one that you got from Leon or Joanne, above.
You also want to protect your 'root' user with a password:mysql>set password for root@localhost = password('mynewpassword');
Query OK...
mysql> set password for root@"%" = password('mynewpassword');
Query OK...
mysql> select host, user, password from mysql.user;
------------------------------
host | user | password |
------------------------------
localhost | root | xxxxxxxxxxxxxxxx |
% | root | xxxxxxxxxxxxxxxx |
localhost |
|
|
% |
|
|
% | glastreader | xxxxxxxxxxxxxxxx |
localhost | glastreader | xxxxxxxxxxxxxxxx |
------------------------------
6 rows in set (0.00 sec)
The "password('mynewpassword')" is very important... it does the encryption. If you leave it out, mysql> set password for root@"%" = 'mynewpassword';
ok...
it doesn't get encrypted, and MySQL won't recognize it when you try to login.
Finally, if you see a blank user, you should get rid of it:mysql%gt delete from mysql.user where host='localhost' and user="";
Query OK...
mysql%gt delete from mysql.user where host="&" and user="";
Query OK...
mysql> select host, user, password from mysql.user;
------------------------------
host | user | password |
------------------------------
localhost | root | 4e6064b31f46ea95 |
% | root | 4e6064b31f46ea95 |
% | glastreader | 03559aa07ca50006 |
localhost | glastreader | 03559aa07ca50006 |
------------------------------
4 rows in set (0.00 sec)
That's better!
9) Copy enough calibration files to satisfy Gleam:
Not a problem for now, since all the necessary files are in cvs, hence in calibUtil.
10) Modify the requirements file in calibUtil to point to the local database. (This will be handled from the jobOptions file eventually.):set MYSQL_HOST localhost
set MYSQL_METATABLE metadata_v2r1
10) Push the button!