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.21 by fanzago, Tue Jan 20 11:20:46 2009 UTC vs.
Revision 1.24 by spiga, Wed Mar 11 17:30:05 2009 UTC

# Line 31 | Line 31 | class Publisher(Actor):
31              raise CrabException('Cannot publish output data, because you did not specify USER.publish_data_name parameter in the crab.cfg file')
32  
33          try:
34 <            if (int(cfg_params['USER.copy_data']) != 1): raise KeyError
34 >            if (int(cfg_params['USER.copy_data']) != 1):
35 >                raise KeyError
36          except KeyError:
37 <            raise CrabException('You can not publish data because you did not selected *** copy_data = 1  *** in the crab.cfg file')
37 >            msg  = 'You can not publish data because you did not selected \n'
38 >            msg += '\t*** copy_data = 1 or publish_data = 1  *** in the crab.cfg file'
39 >            raise CrabException(msg)
40          try:
41              self.pset = cfg_params['CMSSW.pset']
42          except KeyError:
# Line 72 | Line 75 | class Publisher(Actor):
75                  dataset=string.strip(dataset)
76                  self.dataset_to_import.append(dataset)
77          ###        
78 <                
78 >            
79 >        self.skipOcheck=cfg_params.get('CMSSW.pubilish_zero_event',0)
80 >    
81          self.SEName=''
82          self.CMSSW_VERSION=''
83          self.exit_status=''
# Line 94 | Line 99 | class Publisher(Actor):
99              msg += "Source DBS: %s\n" % globalDBS
100              msg += "Destination DBS: %s\n" % self.DBSURL
101              common.logger.message(msg)
102 +            common.logger.write(str(ex))
103              return 1
104          return 0
105            
# Line 193 | Line 199 | class Publisher(Actor):
199              elif (file['LFN'] == ''):
200                  self.noLFN.append(file['PFN'])
201              else:
202 <                if int(file['TotalEvents']) != 0 :
203 <                    #file.lumisections = {}
204 <                    # lumi info are now in run hash
202 >                if  self.skipOcheck==0:
203 >                    if int(file['TotalEvents']) != 0:
204 >                        #file.lumisections = {}
205 >                        # lumi info are now in run hash
206 >                        file.runs = {}
207 >                        for ds in file.dataset:
208 >                            ### Fede for production
209 >                            if (ds['PrimaryDataset'] == 'null'):
210 >                                #ds['PrimaryDataset']=procdataset
211 >                                ds['PrimaryDataset']=self.userprocessedData
212 >                        filestopublish.append(file)
213 >                    else:
214 >                        self.noEventsFiles.append(file['LFN'])
215 >                else:
216                      file.runs = {}
217                      for ds in file.dataset:
218                          ### Fede for production
# Line 203 | Line 220 | class Publisher(Actor):
220                              #ds['PrimaryDataset']=procdataset
221                              ds['PrimaryDataset']=self.userprocessedData
222                      filestopublish.append(file)
223 <                else:
207 <                    self.noEventsFiles.append(file['LFN'])
223 >      
224          jobReport.files = filestopublish
225          ### if all files of FJR have number of events = 0
226          if (len(filestopublish) == 0):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines