CMS 3D CMS Logo

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

Functions

def addToDatasets
 

Function Documentation

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

Definition at line 10 of file addToDatasets.py.

References castorBaseDir.getUserAndArea().

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