ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/Publisher.py
(Generate patch)

Comparing COMP/CRAB/python/Publisher.py (file contents):
Revision 1.11 by fanzago, Fri May 9 10:03:54 2008 UTC vs.
Revision 1.11.4.1 by fanzago, Fri Jul 4 14:01:01 2008 UTC

# Line 55 | Line 55 | class Publisher(Actor):
55              
56          self.content=file(self.pset).read()
57          self.resDir = common.work_space.resDir()
58 +        
59 +        self.dataset_to_import=[]
60 +        
61          self.datasetpath=cfg_params['CMSSW.datasetpath']
62 +        if (self.datasetpath.upper() != 'NONE'):
63 +            self.dataset_to_import.append(self.datasetpath)
64 +        
65 +        ### Added PU dataset
66 +        tmp = cfg_params.get('CMSSW.dataset_pu',None)
67 +        if tmp :
68 +            datasets = tmp.split(',')
69 +            for dataset in datasets:
70 +                dataset=string.strip(dataset)
71 +                self.dataset_to_import.append(dataset)
72 +        ###        
73 +                
74          self.SEName=''
75          self.CMSSW_VERSION=''
76          self.exit_status=''
# Line 91 | Line 106 | class Publisher(Actor):
106              msg = "Error: Problem with "+file+" file"  
107              common.logger.message(msg)
108              return self.exit_status
109 <        
110 <        if (self.datasetpath.upper() != 'NONE'):
111 <            common.logger.message("--->>> Importing parent dataset in the dbs")
112 <            status_import=self.importParentDataset(self.globalDBS, self.datasetpath)
113 <            if (status_import == 1):
114 <                common.logger.message('Problem with parent import from the global DBS '+self.globalDBS+ 'to the local one '+self.DBSURL)
115 <                self.exit_status='1'
116 <                return self.exit_status
117 <            common.logger.message("Parent import ok")
109 >
110 >        if (len(self.dataset_to_import) != 0):
111 >           for dataset in self.dataset_to_import:
112 >               common.logger.message("--->>> Importing parent dataset in the dbs: " +dataset)
113 >               status_import=self.importParentDataset(self.globalDBS, dataset)
114 >               if (status_import == 1):
115 >                   common.logger.message('Problem with parent '+ dataset +' import from the global DBS '+self.globalDBS+ 'to the local one '+self.DBSURL)
116 >                   self.exit_status='1'
117 >                   return self.exit_status
118 >               else:    
119 >                   common.logger.message('Import ok of dataset '+dataset)
120              
121          #// DBS to contact
122          dbswriter = DBSWriter(self.DBSURL)                        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines