USEFUL COMMANDS



Crab

setup the environment

source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh
eval `scramv1 runtime -sh`
source  /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh
voms-proxy-init -voms cms

DBS

from here:

install the DBS query tools

export CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW 
export CVS_RSH=ssh 
cvs -d `echo $CVSROOT | awk -F@ '{print $1":98passwd\@"$2}'` login 
cvs co -r HEAD DBS/Clients/Python 
cd DBS/Clients/Python
source setup.sh

request the number of events in a collection

dbs search --query="find sum(file.numevents) where dataset=/Cosmics/CRUZET4_v1_CRZT210_V1_doubleMuonPath_v1/RECO"

Request the list of runs in a collection

dbs search --query="find run where dataset=/Cosmics/CRUZET4_v1_CRZT210_V1_doubleMuonPath_v1/RECO"

Search for a dataset given a name (with wildchards)

dbs search --query="find dataset where dataset like /Cosmics/*CRUZET4*"

to get the list only:

dbs search --query="find run where dataset=/Cosmics/CRUZET4_v1_CRZT210_V1_doubleMuonPath_v1/RECO" | tail +4

get the number of runs, together with the collection name, in a set of more than one collection:

for DS in `cat doubleMuonDatasets` ;  do 
for NUM in `dbs search --query="find run where dataset=$DS" | tail +4` ; do 
echo $DS $NUM ; 
done ; done > SUMMARY_doubleMuon_CRZ4.txt

get collection name, run number and events per run in a set of more than one collection:

for DS in `cat doubleMuonDatasets` ;  do 
for NUM in `dbs search --query="find run where dataset=$DS" | tail +4` ; do 
echo $DS $NUM `dbs search --query="find sum(file.numevents) where dataset=$DS and run=$NUM" | tail -n 1`; 
done ; done > SUMMARY_doubleMuon_CRZ4.txt

LSF

small template

lo script:

#!/bin/bash
cd CMSSW_folder_on_AFS
eval `scramv1 run -sh`
cd -
cmsRun CMSSW_pset
rfcp output_file output_folder_on_castor

per lanciare:

bsub -u pietro.govoni@gmail.com -q cmsprs -o /dev/null job_name

database

CMSSW generation

how to use cmsDriver

  • put your favorite fragment on Configuration/GenProduction/python (e.g. MY_cff.py)
  • do "scramv1 b" (not sure if this is totally needed, but it will do some preliminary checks)
  • Then do:
cmsDriver.py Configuration/GenProduction/python/MY_cff.py \
           -s GEN,SIM,DIGI,L1,DIGI2RAW,HLT:1E31 \
       --conditions FrontierConditions_GlobalTag,MC_31X_V1::All \
       --datatier 'GEN-SIM-RAW' \
       --eventcontent RAWSIM  \
       -n 10 \
       --no_exec
or GEN only:
cmsDriver.py Configuration/GenProduction/python/MY_cff.py \
       -s GEN \
       --conditions FrontierConditions_GlobalTag,MC_31X_V1::All \
       --datatier 'GEN'  \
       --eventcontent RAWSIM \
       -n 10 \
       --no_exec

AFS quotas

fs lq

AFS management

list my groups:

pts listowned govoni

information on a group:

pts examine govoni:vbf
pts membership govoni:vbf

operation on a group:

pts removeuser skowal govoni:vbf

set permission to a group for a folder

fs setacl -dir `find . -type d -print` -acl <username> rlidwka

GDB

per trovare le eccezioni perse in cmssw

gdb --args cmsRun config.py
b '__cxa_throw'
r
where

usage of SVN server for CMS documents

svn co -N svn+ssh://svn.cern.ch/reps/tdr2 EGM10-003
cd EGM10-003/
svn update utils
svn update -N notes
svn update notes/EGM-10-003
eval `./notes/tdr runtime -csh`  (or -sh)
cd notes/EGM-10-003/trunk
# in trunk dir you'll find EGM-10-003_V1.tex
# once modified use command
tdr --style=pas b EGM-10-003_V1
# the new pdf will appear in directory ../../tmp/


-- PietroGovoni - 23 Oct 2008

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2010-11-09 - PietroGovoni
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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