Skip to content
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ Each-session setup
cd $HOME/scratch0/prod_dir/
source RazorProduction/cert.sh

A CMSSW python environement will have to be available for the crabAPI to function, so be sure to have it sourced properly.

Campaign setup
--------------
See at the bottom

Vizualisation of on-going production
--------------
Browse to https://cms-caltech-db.cern.ch/ from within cern network
Restricted acces to "razor-cms" e-group.
Browse to https://cms-caltech-db.cern.ch/
Restricted acces to "razor-cms" e-group (request to be added in case).

Specifying specific tasks
--------------
Expand Down Expand Up @@ -112,7 +114,6 @@ To create a new production setup

The mandatory parameters are better provided by the ./setup.py --help, but some are listed here
* --installation is a command line to install the production software
* --setup is a command line to set oneself into the production software
* --admins is a coma separated list of username as admins

The optional parameters are better liste by the ./setup.py --help, but some are listed here
Expand Down
4 changes: 2 additions & 2 deletions cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export X509_USER_PROXY=$HOME/cert/voms_proxy.cert
## create a long lived proxy in the designated location
cat $HOME/private/$USER.txt | voms-proxy-init -voms cms --valid 48:00 -pwstdin

## make sure the protection is right
#chmod 400 $HOME/cert/voms_proxy.cert
## and get crab setup
source /cvmfs/cms.cern.ch/crab3/crab.sh
6 changes: 3 additions & 3 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def show(self):
print rid

def get_campaigns( self ):
print "available productions"
for dn in self.cdb.view('prods/label-version'):
print "\t",dn['key'][0],dn['key'][1]
print len(self.cdb.view('prods/label-version')),"available productions"
#for dn in self.cdb.view('prods/label-version'):
# print "\t",dn['key'][0],dn['key'][1]


def get_campaign( self, label, version=None,status=None):
Expand Down
24 changes: 24 additions & 0 deletions prod2list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python

import os
import sys
from optparse import OptionParser
from db import db
import ssl
ssl.match_hostname = lambda cert, hostname: hostname == cert['subjectAltName'][0][1]

parser = OptionParser("")
parser.add_option("--label")
parser.add_option("--version",default=1,type=int)
parser.add_option("--prepend",default='root://eoscms//eos/cms/')
(options,args) = parser.parse_args()

d = db()
tasks = d.tasks(label=options.label, version=options.version)

for t in tasks:
files = d.filelist( t['_id'] )
filelist = open( t['_id']+'.txt','w')
filelist.write('\n'.join([options.prepend+s for s in files]+['']))
filelist.close()

Loading