-
Notifications
You must be signed in to change notification settings - Fork 2
/
cmsDataFlowMakeFolders.py
executable file
·90 lines (79 loc) · 2.97 KB
/
cmsDataFlowMakeFolders.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env python
import os
from Logging import getLogger
log = getLogger()
"""
making theOutput folders
"""
def doMakeFolders(theOutputMergedFolderJSNS, theOutputSMMergedFolderJSNS, theOutputDQMMergedFolderJSNS,
theOutputMergedFolderDATA, theOutputSMMergedFolderDATA, theOutputDQMMergedFolderDATA,
theOutputBadFolder, theOutputSMBadFolder, theOutputSMRecoveryFolder):
if not os.path.exists(theOutputMergedFolderJSNS):
try:
os.makedirs(theOutputMergedFolderJSNS)
msg = "sudo lfs setstripe -c 1 -S 1m {0}".format(theOutputMergedFolderJSNS)
os.system(msg)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputMergedFolderJSNS,e))
if not os.path.exists(theOutputSMMergedFolderJSNS):
try:
os.makedirs(theOutputSMMergedFolderJSNS)
msg = "sudo lfs setstripe -c 1 -S 1m {0}".format(theOutputSMMergedFolderJSNS)
os.system(msg)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputSMMergedFolderJSNS,e))
if not os.path.exists(theOutputDQMMergedFolderJSNS):
try:
os.makedirs(theOutputDQMMergedFolderJSNS)
msg = "sudo lfs setstripe -c 1 -S 1m {0}".format(theOutputDQMMergedFolderJSNS)
os.system(msg)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputDQMMergedFolderJSNS,e))
if not os.path.exists(theOutputMergedFolderDATA):
try:
os.makedirs(theOutputMergedFolderDATA)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputMergedFolderDATA,e))
if not os.path.exists(theOutputSMMergedFolderDATA):
try:
os.makedirs(theOutputSMMergedFolderDATA)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputSMMergedFolderDATA,e))
if not os.path.exists(theOutputDQMMergedFolderDATA):
try:
os.makedirs(theOutputDQMMergedFolderDATA)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputDQMMergedFolderDATA,e))
if not os.path.exists(theOutputBadFolder):
try:
os.makedirs(theOutputBadFolder)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputBadFolder,e))
if not os.path.exists(theOutputSMBadFolder):
try:
os.makedirs(theOutputSMBadFolder)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputSMBadFolder,e))
if not os.path.exists(theOutputSMRecoveryFolder):
try:
os.makedirs(theOutputSMRecoveryFolder)
except Exception, e:
log.error(
"Create directory {0} failed: {1}".format(
theOutputSMRecoveryFolder,e))