- balewski's home page
- Posts
- 2013
- 2012
- 2011
- 2010
- 2009
- December (4)
- November (1)
- October (5)
- September (6)
- August (1)
- July (1)
- June (1)
- May (2)
- April (5)
- March (5)
- February (4)
- January (6)
- 2008
- December (1)
- November (1)
- September (3)
- July (1)
- June (4)
- April (2)
- March (2)
- February (3)
- January (2)
- 2007
- October (1)
- My blog
- Post new blog entry
- All blogs
cdev'06 code
Machinery used to archive (and monitor) cdev info in the STAR online Db
- General scheme requires two pairs of processes: acquire (A-->B) and monitor( C-->D) running in 2 independent, infinite loops:
A) Read relevant records from cdev-server and write them to stdout in XML format
B) write XML records to online STAR DB
C) read XML records from online DB
D) unpack XML, generate plots (jpg) & HTML on the disk, post on the web current content of cdev monitoring pages - The code used in 2006 is archived in
$CVSROOT/online/eemc/dataQuery/cdevQuery/
$CVSROOT/online/eemc/webGenerators/cdevWeb/ - the whole monitoring machinery runs simultaneously on several machines under few users and require special I/O prvileges described below in details.
goal of process | main code | user@machine | directory | special priviliges |
---|---|---|---|---|
A) read cdev, write XML | cdevQuery/ askCdev | balewski@onllinux8 | /onllinux/users/balewski/dataQuery/cdevQuery | ssh-key to eemcdb@eemc-sc.starp.bnl.gov |
B) write XML to online DB | eemcDb | eemcdb@eemc-sc.starp.bnl.gov | ~/onlineCdev2006 | ssh-key for balewski & DB write |
C) read XML | mysql... | balewski@onllinux8 | /onllinux/users/balewski/webGenerators/cdevWeb | none |
D) unpack XML, produce HTML | plotCdev2005b.tcl | balewski@onllinux8 | /onllinux/users/balewski/webGenerators/cdevWeb | write to web |
A-details
- login & execute 1 time new.cshrc;
- compile w/ make in sub-dir X86;
- run by hand askCdev and you should see XML file on the screen;
- change cc-code & S6CDEV.DDL if you need different cdev devices or some names have changed. Contact Angelika or Seth for help.
B-details
- Ask Michael to setup a fresh DB-table= Conditions_rhic node=VerA/online/cdev , not sure about DB-port?
- Ask Michael to give you write privileges and setup new
- verify the old exec 'eemcDB' still works and try to write any record to this DB table
- the source code & exec for 'eemcDB' program writing to DB is at rcas6nnn at my private directory /star/u/balewski/dbaseIO/src/eemcDb. The simplest is to just copy this exec to a linux machine of choice and use it. Instruction how to compile on version of eemcDB is at the bottom f this page - FYI: at the moment it does not work.
Make A+B work together
- on onllinux8 there is macro doing one cdev query + one DB-write : oneCdev2Db.sh - make it to work
- the infinite loop is controlled by the macro oneCdev2Db.sh - make it work
C-details all is run as macros
- login to onllinux8
- verify mySql query works: mysql -h onldb.starp.bnl.gov --port 3502 Conditions_rhic -e "SELECT dataS FROM kretDbBlobS WHERE nodeID=9 ORDER By beginTime desc LIMIT 1 " -s -E returns the last written record (by step B)
- Ask Michael to setup destination, web-visible directory seen from onllinux8 as /onlineweb/www/cdev2008, ask for write privileges, change lik from the main STAR-online age, backup and erase 2006 content to make space.
- login to onllinux8 and create set of sub-dirs : wrk/data wrk/jpg wrk/fillHistory/
- verify you can write to /onlineweb/www/cdev2008
- execute mySql query and write output as wrk/outCdev.eve
- exercise tclTk macro plotCdev2005b.tclconverting XML input in to updated web pages - takes ~minute to run, should be no errors
- copy by hand udated HTML files and see via web-browser if you got what you want: cp -rp wrk/data wrk/jpg wrk/*html wrk/*eve wrk/fillHistory/ /onlineweb/www/cdev2008
- start infinite loop: loopCdevDb2Web.sh
Compilation of eemcDB - stand alone, static DB-IO interface
mkdir aaa cd aaa cp -rp /star/u/balewski/dbaseIO/src . cvs co StRoot/StDbLib cd StRoot/StDbLib make clean make cd ../../src make clean makeThis prescription fails in final compiltaon stage - there are some unresolved dependencies in StDbLib.
Note, there are alternatives to uploading tables to DB, e.g. one could write a stand alone .C macro as attached to this page. Such macro is self contained, no supporting compilable code is needed. However one would need to adjust it to write the cdev tables.
Groups:
- balewski's blog
- Login or register to post comments