Tags:
create new tag
view all tags

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 No

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.

  1. Get the testtree.C file which is attached to this page and save it to your local directory
  2. 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
       
  3. Start root
    $ root -l
       
  4. 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
       
  5. 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")
       
  6. Quit root (for the uninitiated)
    root [1] .q
       
  7. 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

Topic attachments
I Attachment History Action Size Date Who Comment
Unix shell scriptsh test-dCacheProtocols.sh r2 r1 manage 1.7 K 2007-05-16 - 07:41 DerekFeichtinger little test script to check protocols
C source code fileC testtree.C r1 manage 0.8 K 2007-03-19 - 15:15 DerekFeichtinger  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2007-08-08 - DerekFeichtinger
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback