test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
PhysicsTools
HeppyCore
python
utils
addToDatasets.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# Colin
3
# additional layer, on top of cmsBatch.py
4
5
import
os
6
7
from
castorBaseDir
import
getUserAndArea
8
9
def
addToDatasets
(sampleAndTier, user=os.getlogin()):
10
user, _ =
getUserAndArea
(user)
#for if we have a magic user name
11
notThere = os.system(
'grep %s ~%s/public/DataSets.txt'
% (sampleAndTier,user) )
12
if
notThere:
13
os.system(
'echo %s >> ~%s/public/DataSets.txt'
% (sampleAndTier,user) )
14
return
not
notThere
15
16
17
if
__name__ ==
'__main__'
:
18
import
sys
19
addToDatasets
(sys.argv[1], sys.argv[2])
addToDatasets.addToDatasets
def addToDatasets
Definition:
addToDatasets.py:9
castorBaseDir.getUserAndArea
def getUserAndArea
Definition:
castorBaseDir.py:5
addToDatasets
Definition:
addToDatasets.py:1
Generated for CMSSW Reference Manual by
1.8.5