RCDB/CCDB Ad Hoc Meeting

April 3, 2018

Present: Dmitry, Sean, Thomas, MMI

  • D. wanted to plan roadmap for future development
  • T.: Javascript API
    • Proposed in run browser context
    • D: RCDB Python API should do it
    • May want to scrap Python, run only once, supply dynamic parts via Javascript
    • Python tries to cache RCDB info, that takes a long time.
    • This is a ticked in RCDB, Thomas will review it
  • CCDB Issues on GitHub
    • D.: some have been implemented, just not on the master
    • They may be on branch 1.07
    • S: v1.06.02 reports itself as 1.07, log reporting is wrong
    • Important issues according to S.
      1. log report improvements
      2. deprecated tables
      3. blame: who put in constants
    • Mark added: 4. ancestry date control
      • D.: feature coded, control levers not there
  • High-level analysis results in a timeline
    • T.: Eugene brought this up at morning RC meeting
    • Two options
      1. put into online monitoring database (OMDB, maintained by Sean)
      2. put into RCDB
    • Time-series webpage that uses OMDB not useable at present.
    • OMDB designed for this purpose
    • If in RCDB, new features could be applied to this function
  • Development issues for RCDB, from D.
    • API for extracting info: need tutorial on new best practices
    • Improve usage of features for storing/retrieving data in/from RCDB
      • review methods in DAQ scripts
      • config files stored in RCDB: parsers available to get desired fields
      • better use of aliases where appropriate
  • New features: produce ROOT trees from RCDB (CCDB?)

 

RCDB and SQLiteCPP

January 23, 2018

Code in /home/marki/rcdb_sqlite_work on lorentz.

simple rcdb example

g++ main.cc -I $RCDB_HOME/cpp/include -std=c++11 -DRCDB_MYSQL -DRCDB_SQLITE `mysql_config --include` `mysql_config --libs` -lsqlite3
> ./a.out
RCDB_CONNECTION = sqlite:////group/halld/www/halldweb/html/dist/rcdb.sqlite
solenoid current = 1349.06
> setenv RCDB_CONNECTION sqlite:///$WEB/dist/rcdb.sqlite
> ./a.out
RCDB_CONNECTION = mysql://rcdb@hallddb.jlab.org/rcdb
solenoid current = 1349.06

simple ccdb example

> g++ main_ccdb.cc -o main_ccdb -I $CCDB_HOME/include -std=c++11 -L $CCDB_HOME/lib -l ccdb
> main_ccdb
Connecting to mysql://ccdb_user@hallddb.jlab.org/ccdb
10	2	30	
40	5	60	
> setenv CCDB_CONNECTION sqlite:///$WEB/dist/ccdb.sqlite
> main_ccdb
Connecting to sqlite:////group/halld/www/halldweb/html/dist/ccdb.sqlite
10	2	30	
40	5	60	

simple with both

> g++ main_both.cc -o main_both -I $CCDB_HOME/include -std=c++11 -L $CCDB_HOME/lib -l ccdb -I $RCDB_HOME/cpp/include -DRCDB_MYSQL `mysql_config --libs` `mysql_config --include` -DRCDB_SQLITE  -lsqlite3
> setenv RCDB_CONNECTION sqlite:///$WEB/dist/rcdb.sqlite
> ./main_both
Connecting to sqlite:////group/halld/www/halldweb/html/dist/ccdb.sqlite
10	2	30	
40	5	60	
RCDB_CONNECTION = sqlite:////group/halld/www/halldweb/html/dist/rcdb.sqlite
solenoid current = 1349.06

SQLiteCPP as stand-alone library

cmake -DSQLITECPP_INTERNAL_SQLITE=OFF -DSQLITE_USE_LEGACY_STRUCT=ON ..

To set install path, use “cmake -DCMAKE_INSTALL_PREFIX=/usr” for example.

g++ main.cc -I $RCDB_HOME/cpp/include -std=c++11 -DRCDB_MYSQL -DRCDB_SQLITE `mysql_config --include` `mysql_config --libs` -lsqlite3 -I ~/Desktop/SQLiteCpp/include -DSQLITE_USE_LEGACY_STRUCT=ON -L ~/Desktop/SQLiteCpp/build -l SQLiteCpp
> ./a.out
RCDB_CONNECTION = mysql://rcdb@hallddb.jlab.org/rcdb
solenoid current = 1349.06
> setenv RCDB_CONNECTION sqlite:///$WEB/dist/rcdb.sqlite
> ./a.out
RCDB_CONNECTION = sqlite:////group/halld/www/halldweb/html/dist/rcdb.sqlite
solenoid current = 1349.06

RCDB Not Updating?

  • rcdb on gluondb1 and hallddb share the same last run:
    +--------+---------------------+---------------------+
    | number | started | finished |
    +--------+---------------------+---------------------+
    | 31528 | 2017-06-01 14:47:32 | 2017-06-01 14:48:13 |
    | 31526 | 2017-06-01 14:08:47 | 2017-06-01 14:09:53 |
    | 31525 | 2017-06-01 13:53:00 | 2017-06-01 13:54:12 |
    | 31524 | 2017-06-01 12:46:19 | 2017-06-01 12:47:37 |
    | 31523 | 2017-06-01 11:10:00 | 2017-06-01 11:11:05 |
  • Update of RCDB may be turned off for now.
  • User rcdb needs a password on gluondb1 but not on hallddb.

 

Build problem, conflict in bash between rcdb and rootcling

Error:

In file included from input_line_11:6:
In file included from /u/scratch/marki/launch_build/sim-recon-aa_test/src/programs/Analysis/hdview2/hdv_optionsframe.h:10:
In file included from /u/apps/gcc/4.9.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/iostream:39:
In file included from /u/apps/gcc/4.9.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/ostream:609:
/u/apps/gcc/4.9.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/ostream.tcc:39:10: error: 
      'bits/cxxabi_forced.h' file not found with  include; use "quotes"
      instead
#include <bits/cxxabi_forced.h>
         ^

Only in bash.

unset CPLUS_INCLUDE_PATH

fixes it. Found the solution here.