-- BaosongShan - 31 Oct 2013

CASTOR

Now castor files should only be accessed via xrootd:

export STAGE_HOST=castorpublic
export RFIO_USE_CASTOR_V2=YES
export STAGE_SVCCLASS=amsuser
export CASTOR_INSTANCE=castorpublic

/or tcsh/

setenv STAGE_HOST castorpublic
setenv RFIO_USE_CASTOR_V2 YES
setenv STAGE_SVCCLASS amsuser
setenv CASTOR_INSTANCE castorpublic

NB

  • On the fly staging is not supported, file should be retreived on disk first.
  • To query if file is on disk
 stager_qry -M /castor/cern.ch/ams/Data/AMS02/2011B/ISS.B515/std/1308789115.00000001.root
/castor/cern.ch/ams/Data/AMS02/2011B/ISS.B515/std/1308789115.00000001.root 835330748@castorns STAGED

all ams n(r)tuples are in /castor/cern.ch/ams area

use nsls list directory

example of access

/Offline/vdev/exe/linuxx8664icc/amsedcPG root://castorpublic.cern.ch///castor/cern.ch/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root

/Offline/vdev/exe/linuxx8664icc/offmonc root://castorpublic.cern.ch///castor/cern.ch/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root

root
 gSystem->Setenv("AMSWD","/Offline/vdev");
gInterpreter->AddIncludePath(gSystem->ExpandPathName("$AMSWD/include"));

gSystem->Load("$AMSWD/lib/linuxx8664icc/ntuple_slc4_PG.so");
AMSChain a;
a.Add("root://castorpublic.cern.ch///castor/cern.ch/ams/Data/AMS02/2011B/ISS.B620/pass4/1311273186.00000001.root");
a.Print();

NB: to change to the svcClass=xyz access use

/Offline/vdev/exe/linuxx8664icc/amsedcPG 'root://castorpublic.cern.ch///castor/cern.ch/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root?svcClass=xyz'
xrdcp 'root://castorpublic.cern.ch///castor/cern.ch/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root?svcClass=xyz' /tmp/1324333721.00000001.root

example of access via db:

http://pcamss0.cern.ch/cgi-bin/mon/rc.o.cgi?QPartD=BT.B620&QPPer=-1&QTempDataset=Any&QBuildNum=0&NTOUT=ROOT&ROOT=&ROOTACCESS=CASTOR&DataMC=1&SQLQUERY=&queryDB04=DoQueryD

change rfio: -> root://castorpublic.cern.ch//

please ask V. Choutko in case of problems

In case of occasional nonavailability of files

EOS

"EOS is a xroot-managed disk pool for analysis-style data access." https://twiki.cern.ch/twiki/bin/view/EOS

To use EOS, first you need to source the following file:

source /afs/cern.ch/project/eos/installation/ams/etc/setup.sh

/or tcsh/

source /afs/cern.ch/project/eos/installation/ams/etc/setup.csh

All the ams pass4, photon, 2ecal, and beam testing data are in /castor/cern.ch/ams/Data/AMS02/2011B area

Use eos ls to list directory.

A tutorial for starters can be found at https://cern.service-now.com/service-portal/article.do?n=KB0001998 .

Examples of access

/Offline/vdev/exe/linuxx8664icc/amsedcPG root://eosams.cern.ch///eos/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root

/Offline/vdev/exe/linuxx8664icc/offmonc root://eosams.cern.ch///eos/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root

root
 gSystem->Setenv("AMSWD","/Offline/vdev");
gInterpreter->AddIncludePath(gSystem->ExpandPathName("$AMSWD/include"));

gSystem->Load("$AMSWD/lib/linuxx8664icc/ntuple_slc4_PG.so");
AMSChain a;
a.Add("root://eosams.cern.ch//eos/ams/Data/AMS02/2011B/ISS.B620/pass4/1311273186.00000001.root");
a.Print();

xrdcp 'root://eosams.cern.ch///eos/ams/Data/AMS02/2011B/ISS.B620/pass4/1324333721.00000001.root' /tmp/1324333721.00000001.root

example of access via db:

http://pcamss0.cern.ch/cgi-bin/mon/rc.o.cgi?QPartD=BT.B620&QPPer=-1&QTempDataset=Any&QBuildNum=0&NTOUT=ROOT&ROOT=&ROOTACCESS=CASTOR&DataMC=1&SQLQUERY=&queryDB04=DoQueryD

change rfio:/castor/cern.ch -> root://eosams.cern.ch///eos

please ask V. Choutko in case of problems

In case of occasional nonavailability of files

  • send complains describing your problems to B. Shan

Build your own analysis programs

Now dynamic linking is the only way for user analysis programs, and the procedure is like the following

1.build amslib (or use libs in /afs/cern.ch/ams/Offline/vdev )

Typical building commands are as followed.

cvs co AMS  # Check out the AMS source code (of some specific branch)
cd AMS
setenv PGTRACK 1
setenv AMSWD `pwd`
setenv AMSSRC `pwd`
setenv Offline /afs/cern.ch/ams/Offline
source install/amsvar

# uncomment one of the following two lines is you want to use ROOT 5.34
# source $ROOTSYS/../root-v5-34-9-icc64-slc5/amsvar # if you want to use ROOT 5.34 on SLC5
# source $ROOTSYS/../root-v5-34-9-icc64-slc6/amsvar # if you want to use ROOT 5.34 on SLC6

cd install
gmake lib

# use any of the AMSINCLUDES
setenv AMSINCLUDE /afs/cern.ch/Offline
setenv AMSINCLUDE $AMSWD

2. Prepare a simple building script for the compilation of your analysis code. Below are examples for ROOT 5.27 and 5.34, respectively.

mybuild_icc_527.sh

#!/bin/sh
icc  -I/$ROOTSYS/include -I$AMSINCLUDE/include -D__root__new  -D__WRITEROOT__ -D__ROOTSHAREDLIBRARY__ -openmp -O3 -axssse3 $1.C -c -o $1.o
icpc -rdynamic -static-intel -openmp -openmp-link static  -axssse3  -O $1.o -Bstatic -L$AMSINCLUDE/lib/linuxx8664icc -lntuple_slc4_PG     -L$ROOTSYS/lib -lRoot  -L/afs/cern.ch/ams/Offline/CERN/NagLib -lnag64 -L/afs/cern.ch/ams/Offline/CERN/2005.gcc64/lib -lmathlib -lpacklib -lgfortran  -pthread   -lpcre  -llzma -lfreetype -lXrdClient  -lXrd -lXrdNet -lXrdOuc -lXrdSys  -Wl,--allow-multiple-definition  -Bstatic -lifcore  -Bdynamic -lshift -ldl -lrt -o $AMSWD/exe/linux/$1_c

mybuild_icc_534.sh slc5

#!/bin/sh
icc  -I/$ROOTSYS/include -I$AMSINCLUDE/include -D__root__new  -D__WRITEROOT__ -D__ROOTSHAREDLIBRARY__ -openmp -O3 -axssse3 $1.C -c -o $1.o
icpc -rdynamic   -static-intel  -openmp -openmp-link static  -axssse3  -O $1.o -Bstatic -L$AMSINCLUDE/lib/linuxx8664icc5.34 -lntuple_slc4_PG    -L$ROOTSYS/lib -lRoot -L/afs/cern.ch/ams/Offline/CERN/NagLib -lnag64 -L/afs/cern.ch/ams/Offline/CERN/2005.gcc64/lib -lmathlib -lpacklib -lgfortran  -pthread   -lpcre  -lcrypto -llzma -lfreetype -Bdynamic -L$XRDLIB/lib64 -lXrdClient  -lXrdUtils  -Wl,--allow-multiple-definition   -Bstatic -lifcore  -Bdynamic -lshift -ldl -lrt -o $AMSWD/exe/linux/$1_534
chmod +x $AMSWD/exe/linux/$1_534
mybuild_icc_534.sh slc6
icc  -I/$ROOTSYS/include -I$AMSINCLUDE/include -D__root__new  -D__WRITEROOT__ -D__ROOTSHAREDLIBRARY__ -openmp -O3 -axsss $1.C -c -o $1.o
icpc -rdynamic -static-intel  -openmp -openmp-link static  -axssse3  -O $1.o -Bstatic -L$AMSINCLUDE/lib/linuxx8664icc5.34 -lntuple_slc6_PG    -L$ROOTSYS/lib -lRoot -L/afs/cern.ch/ams/Offline/CERN/NagLib -lnag64  -L/afs/cern.ch/ams/Offline/CERN/2005.gcc64/lib -lmathlib -lpacklib   -lgfortran -pthread   -lpcre  -lcrypto -llzma -lfreetype -Bdynamic -L$XRDLIB/lib64 -lXrdClient  -lXrdUtils  -Wl,--allow-multiple-definition  -Bstatic -lifcore  -Bdynamic -lshift -ldl -lrt -o $AMSWD/exe/linux/$1_534_slc6
chmod +x $AMSWD/exe/linux/$1_534_slc6

mybuild_icc_root6.sh slc6,7

source /afs/cern.ch/ams/Offline/vdev/install/amsvar.root6

#!/bin/sh
icc  -I/$ROOTSYS/include -I$AMSINCLUDE/include -D__root__new  -D__WRITEROOT__ -D__ROOTSHAREDLIBRARY__ -openmp -O3 -axssse3,AVX,sse4.2  -DVERSION6 -std=c++11  $1.C -c -o $1.o
icpc -rdynamic  -openmp -openmp-link static  -static-intel -static-libgcc -axssse3  -O $1.o -Bstatic -L$AMSINCLUDE/lib/linuxx8664icc5.34 -lntuple_slc6_PG    -L$ROOTSYS/lib -lRoot -llvm   -lz -lgsl -L/afs/cern.ch/ams/Offline/CERN/NagLib -lnag64  -L/afs/cern.ch/ams/Offline/CERN/2005.icc16/lib -lmathlib -lpacklib  -pthread   -lpcre  -lcrypto -llzma -ltinfo -lfreetype -Bdynamic -L$XRDLIB/lib64 -lXrdClient  -lXrdUtils  -Wl,--allow-multiple-definition  -Bstatic -lifcore  -Bdynamic -lshift -ldl -lrt -o $AMSWD/exe/linux/$1_r6_slc6
chmod +x $AMSWD/exe/linux/$1_r6_slc6

Please kindly notice that, in order to use the above script, you should define the variable AMSINCLUDE to your AMSSRC directory, and put the base name (without .C) of your source file as the first argument.

An example is /afs/cern.ch/ams/Offline/vdev/examples/daqPG_simple.C, you can try to build this example by the following commands.

mkdir -p $AMSINCLUDE/exe/linux
cd /afs/cern.ch/ams/Offline/vdev/examples
<path_to_your_mybuild_icc_527.sh> daqPG_simple
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2015-12-17 - VitaliChoutko
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    AMS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback