Giter VIP home page Giter VIP logo

lccd's Introduction

LCCD

Build Status Coverity Scan Build Status

Linear Collider Conditions Data framework

LCCD is distributed under the GPLv3 License

License

Build instructions

In order to build LCCD you need LCIO, ILCUTIL, CMake and optionally CondDBMySQL

if you have access to /cvmfs/ilc.desy.de/ then you will find all this packages under:

/cvmfs/ilc.desy.de/sw/x86_64_gcc49_sl6/

if you do NOT have acces to /cvmfs/ilc.desy.de/ or you do not have an SL6 machine the easiest way is to use ilcinstall (http://ilcsoft.desy.de/portal/software_packages/ilcinstall/).

Once the dependencies are resolved, issue the following commands:

mkdir build
cd build
cmake -C $ILCSOFT/ILCSoft.cmake ..
make install
make tests    # optional step to build LCCD tests

Start test database

  1. select the mysql version you want to use, e.g.
export PATH=/opt/products/mysql/5.0.26/bin:$PATH
  1. create a data directory
mkdir /tmp/mysqlDB
  1. init the database
mysql_install_db --datadir=/tmp/mysqlDB
  1. start the database
mysqld_safe --datadir=/tmp/mysqlDB &

or:

mysqld_safe --datadir=/tmp/mysqlDB --socket=/tmp/mysql.sock --log-error=mysql.log --pid-file=mysql.pid  &
  1. b. you can stop the database - no need to do it now ]
mysqladmin -u root -p shutdown  
  1. set root password (and remember it)
mysqladmin -u root password <mypassword>
  1. create users for LCCD [NOTE: THIS IS FOR TESTING ONLY - BE CAREFUL WITH USER RIGHTS/PRIVILEGES !!!!!]
mysql -u root -p 
grant all privileges on *.* to calvin@localhost identified by 'hobbes' with grant option ;
grant all privileges on *.* to calvin@"%" identified by 'hobbes' with grant option ; 
quit

Run examples

If you built against CondDBMysql and built the tests, you can run them as follows:

cd ../test
./createcalfile hcal.slcio hcal
./readcalfile hcal.slcio hcal

./calfiletodb hcal.slcio hcal myhcal 100 200
./calfiletodb hcal.slcio hcal myhcal 200 300
./calfiletodb hcal.slcio hcal myhcal 300 400
./calfiletodb hcal.slcio hcal myhcal 400 500

./tagdbfolder /lccd/myhcal mytag01 "just a test tag"

./calfiletodb hcal.slcio hcal myhcal 0 500

./calfilefromdb myhcal 120 fromdb.slcio mytag01

./calfilefromdb myhcal 20 fromdb.slcio 

It might be instructive to read the code in parallel and inspect the MySQL database, e.g.

mysql -u calvin -p

Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 to server version: 5.0.26

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| lccd_test          |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)
mysql> use lccd_test

Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show tables ;
+-----------------------+
| Tables_in_lccd_test   |
+-----------------------+
| data_tbl_3_1          |
| databases_tbl         |
| folders_tbl           |
| object_key_tbl_3      |
| object_key_tbl_head_3 |
| partition_tbl_3       |
| tag2folder_tbl        |
| tag2obj_tbl_3         |
| tags_tbl              |
+-----------------------+
9 rows in set (0.01 sec)
mysql> select * from tags_tbl ;
+--------+---------------------+---------+---------+------------------------+
| tag_id | insert_t            | tname   | tattr   | tdesc                  |
+--------+---------------------+---------+---------+------------------------+
|      1 | 2009-10-07 15:16:50 | HEAD    | NO ATTR | Latest objects version |
|      2 | 2009-10-07 15:17:14 | mytag01 | NULL    | just a test tag        |
+--------+---------------------+---------+---------+------------------------+
2 rows in set (0.00 sec)

License and Copyright

Copyright (C), LCCD Authors

LCCD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License long with this program. If not, see http://www.gnu.org/licenses/.

lccd's People

Contributors

jengels avatar gaede avatar criticanalytic avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.