CMS 3D CMS Logo

Functions
addToDatasets Namespace Reference

Functions

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

Function Documentation

◆ addToDatasets()

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

Definition at line 10 of file addToDatasets.py.

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 
17 

References castorBaseDir.getUserAndArea().

addToDatasets.addToDatasets
def addToDatasets(sampleAndTier, user=os.getlogin())
Definition: addToDatasets.py:10
castorBaseDir.getUserAndArea
def getUserAndArea(user)
Definition: castorBaseDir.py:7