The Objectivity runtime and development tools are installed
in AFS at the RCF. Klog to AFS. Make sure that you belong to the "system:oodbusers"
AFS group. Find it out like this:
> pts mem $USER
Groups _user_ (id: XXXX) is a member of:
system:oodbusers
phnxlib:software
phenix
If you don't have "oodbusers" permission, ask Martin Purschke or submit a CTS ticket asking for it.
If you have properly sourced PHENIX login file (phenix_setup.csh) you will have the following basic environment variables defined:
$OBJYSYS = /afs/rhic/oodb/pro
$PHENIX_FD_BOOT = phnxobjy.phenix.bnl.gov::/database/main_federation/PHENIX_26000.boot
$XAPPLRESDIR = $OBJYSYS/etc/app-defaults
(to
run ootoolmgr)
Mind that the directory of your default Federation $OO_FD_BOOT is not set when you log in (this allows you e.g. to perform your tests with your privately defined database). phenix_setup.csh provides instead a convenient variable PHENIX_FD_BOOT pointing to the official Federation.
Therefore, if you just want to use PHENIX Federation type:
> setenv OO_FD_BOOT $PHENIX_FD_BOOT
Otherwise, if you want to create your own private Federation, go on
with the following steps:
> mkdir /phenix/data24/${USER}/objy/
> chmod g+w
/phenix/data24/${USER}/objy/
> setenv OO_FD_BOOT
/phenix/data24/${USER}/objy/myFDB_BOOT
> setenv OBJY_FID
26XXX
> oonewfd \
-fdnumber $OBJY_FID
\
-fdfilehost
rmine204.rcf.bnl.gov
\
-fdfilepath
/phenix/data24/${USER}/objy/myFDB
\
-lockserverhost
phnxobjy.phenix.bnl.gov
\
-jnldirpath
/phenix/data24/${USER}/objy
\
-pagesize 8192
\
$OO_FD_BOOT
(or rmine204.rcf.bnl.gov::/phenix/data24/${USER}/objy/myFDB_BOOT)
Objy will respond:
Objectivity/DB (TM) Create Federated Database Utility, Version 5.2.1
Copyright (c) Objectivity, Inc 1993, 2000. All rights reserved.
Federated Database "/phenix/data24/user/objy/myFDB_BOOT" created.
> oodeletefd -f $OO_FD_BOOT
If you want to make a database within the federation, do:
> oodumpcatalog
Objectivity/DB (TM) List Database Files Utility, Version 5.2.1
Copyright (c) Objectivity, Inc 1990, 2000. All rights reserved.
FD Name = myFDB_BOOT
FD ID = 26XXX
FD File = rmine204.rcf.bnl.gov::/phenix/data24/user/objy/myFDB
Boot File = rmine204.rcf.bnl.gov::/phenix/data24/user/objy/myFDB_BOOT
Jnl Dir = rmine204.rcf.bnl.gov::/phenix/data24/user/objy
Lock Host = phnxobjy.phenix.bnl.gov
DB Name = myDatabase
DB ID = 2
DB Image = rmine204.rcf.bnl.gov::/phenix/data24/enterria/objy/myDatabase.myFDB_BOOT.DB
Finally, if you want to store some objects in your database do the following:
> cd /phenix/workarea/${USER}
> gunzip ${HOME}/myObject-1.0.tar.gz
> tar -xvf ${HOME}/myObject-1.0.tar
> mkdir myObject-build
> cd myObject-build
> ../myObject-1.0/configure --with-bootfile=$OO_FD_BOOT
> make
./ooInsert
./ooScan
I am an object of class `myObject' created with ID = 1
I am an object of class `myObject' created with ID = 2
> ooschemadump
schema *
0
1000001 1000000
{
class myObject
basic
1000000 1000000
1 0 2 0 2 0 0
{
Embedded
: public ooObj
1001
1 0 0 0
Basic
protected int32 _id
2 1 0 0
}
}
Previous:
3. Objy Administration
Tools. | 4. Setting up your Federated Database |
Next:
5. Adding your own classes to the PHENIX Federation