CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
addToDatasets Namespace Reference

Functions

def addToDatasets
 

Function Documentation

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

Definition at line 9 of file addToDatasets.py.

References castorBaseDir.getUserAndArea().

9 
10 def addToDatasets(sampleAndTier, user=os.getlogin()):
11  user, _ = getUserAndArea(user) #for if we have a magic user name
12  notThere = os.system( 'grep %s ~%s/public/DataSets.txt' % (sampleAndTier,user) )
13  if notThere:
14  os.system('echo %s >> ~%s/public/DataSets.txt' % (sampleAndTier,user) )
15  return not notThere
16