CMS 3D CMS Logo

Functions
addToDatasets Namespace Reference

Functions

def addToDatasets (sampleAndTier, user=os.getlogin())
 

Function Documentation

def addToDatasets.addToDatasets (   sampleAndTier,
  user = os.getlogin() 
)

Definition at line 9 of file addToDatasets.py.

References castorBaseDir.getUserAndArea().

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 
def addToDatasets(sampleAndTier, user=os.getlogin())
Definition: addToDatasets.py:9
def getUserAndArea(user)
Definition: castorBaseDir.py:5