Test descriptions for the dCache tests
Attached to this page you will find a small script which tests the different protocols
test-dCacheProtocols.sh.
This is mainly intended for a fast check of the basic functionality, i.e. typically after any kind of change to the system or a service restart.
gsidcap
command line dccp
client
gsidcap and a valid proxy certificate allows writing to and reading from the dCache
dccp /tmp/mytesttree.dat gsidcap://storage01-lcg.projects.cscs.ch:22128/pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat
dccp gsidcap://storage01-lcg.projects.cscs.ch:22128/pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat /tmp/somefile
access from ROOT
This did not work. Maybe some kind of library mismatch. However I have seen no usage of this protocol from other CMS installations, so we ignore it for the moment.
dcap
dcap only allows reading of files (insecure protocol).
command line dccp
client
dccp dcap://storage01-lcg.projects.cscs.ch:22125/pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat /tmp/somefile
access from ROOT
Set up the ROOT environment as outlined
below and start ROOT. Then on the ROOT prompt:
root [0] TFile *f1=TFile::Open("dcap://storage01-lcg.projects.cscs.ch:22125//pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat");
root [1] .ls
TDCacheFile** dcap://storage01-lcg.projects.cscs.ch:22125//pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat
TDCacheFile* dcap://storage01-lcg.projects.cscs.ch:22125//pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat
KEY: TTree t1;1 simple gas example
root [2] f1->Print();
TFile: name=dcap://storage01-lcg.projects.cscs.ch:22125//pnfs/projects.cscs.ch/cms/local_tests/mytesttree.dat, title=, option=READ
Draw an example histogram:
root [3] t1->Draw("px");
xrootd
using command line xrdcp
client
Set up the ROOT environment as outlined
below.
$> xrdcp -d 3 root://storage01-lcg.projects.cscs.ch:1094//pnfs/projects.cscs.ch/cms/local_tests/derek_dccp1.dat /tmp/gaga
access from ROOT
Since xrootd speaks ROOT's native protocol, you can directly use URLs like in the xrdcp example above with ROOT's IO directives.
How to produce a ROOT test tree
To test reading files with ROOT you should produce first some ROOT files containing trees.
- Get the testtree.C file which is attached to this page and save it to your local directory
- Set up the environment for ROOT (I'm using here a version from the CMS SW area)
export ROOTSYS=/experiment-software/cms/slc3_ia32_gcc323/lcg/root/5.13.04e/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
- Start root
$ root -l
- At the root prompt execute the following commands (this compiles
testtree.C
)
root [0] .L testtree.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/dfeich/roottest/./testtree_C.so
- Now you can generate test trees using invocations like the following (where
n
is the amount of records to put in the tree)
root [1] write_testree(10000,"/tmp/mytesttree.dat")
- Quit root (for the uninitiated)
root [1] .q
- Copy the file to the dCache using gsidcap or SRM protocol (I was not able to directly write do dCache with dcap. The xrootd interface to dCache also seems to share this limitation, so these protocols are ok for reading only)
--
DerekFeichtinger - 16 May 2007