Main Page
Namespaces
Classes
Package Documentation
Namespace List
Namespace Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Functions
copyFromCastor Namespace Reference
Functions
def
main
Function Documentation
def copyFromCastor.main
(
)
Definition at line
4
of file
copyFromCastor.py
.
References
beamvalidation.exit()
, and
eostools.ls()
.
4
5
def
main
():
6
if
len(sys.argv) < 3:
7
error =
"Usage: cpFromCastor fromDir toDir (optional filter)"
8
exit
(error)
9
user = os.getenv(
"USER"
)
10
castorDir =
"/castor/cern.ch/cms/store/caf/user/"
+ user +
"/"
+ sys.argv[1] +
"/"
11
filter =
""
12
if
len(sys.argv) > 3:
13
filter = sys.argv[3]
14
fileList =
ls
(castorDir,filter)
15
destDir = sys.argv[2]
16
copiedFiles =
cp
(castorDir,destDir,fileList)
17
18
if
len(copiedFiles) != len(fileList):
19
error =
"ERROR: I couldn't copy all files from castor"
20
exit
(error)
eostools.ls
def ls
Definition:
eostools.py:349
hgcal_conditions::parameters
Definition:
HGCConditions.h:86
beamvalidation.exit
def exit
Definition:
beamvalidation.py:52
copyFromCastor.main
def main
Definition:
copyFromCastor.py:4
Generated for CMSSW Reference Manual by
1.8.5