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

Comparing COMP/CRAB/python/Reporter.py (file contents):
Revision 1.1 by slacapra, Thu Jan 22 18:53:44 2009 UTC vs.
Revision 1.2 by slacapra, Fri Jan 23 11:43:22 2009 UTC

# Line 17 | Line 17 | class Reporter(Actor):
17          """
18          common.logger.debug(5, "Reporter::run() called")
19          task = common._db.getTask()
20 <        #print task
20 >        #print self.cfg_params
21          print "\n----------------------------\n"
22          print "Dataset: ",task['dataset']
23 +        if self.cfg_params.has_key('USER.copy_data') and int(self.cfg_params['USER.copy_data'])==1:
24 +            print "Remote output :"
25 +            ## TODO: SL should come from jobDB!
26 +            from PhEDExDatasvcInfo import PhEDExDatasvcInfo
27 +            stageout = PhEDExDatasvcInfo(self.cfg_params)
28 +            endpoint, lfn, SE, SE_PATH, user = stageout.getEndpoint()
29 +            #print endpoint, lfn, SE, SE_PATH, user
30 +
31 +            print "SE:",self.cfg_params['USER.storage_element'],SE," srmPath:",endpoint
32 +            
33 +        else:
34 +            print "Local output: ",task['outputDirectory']
35 +        #print task
36          from ProdCommon.FwkJobRep.ReportParser import readJobReport
37          possible_status = [ 'Created',
38                              'Undefined',
# Line 39 | Line 52 | class Reporter(Actor):
52                              'retrieved'
53                              ]
54          eventsRead=0
55 +        eventsRequired=0
56          filesRead=0
57 +        filesRequired=0
58          for job in task.getJobs():
59 +            #print job
60              # get FJR filename
61              fjr=task['outputDirectory']+job['outputFiles'][-1]
62              #print fjr
# Line 58 | Line 74 | class Reporter(Actor):
74                      
75                  #print jobReport[0].inputFiles,'\n'
76              else:
77 <                print 'no FJR avaialble'
77 >                print 'no FJR avaialble for job #%s'%job['jobId']
78              #print "--------------------------"
79 <        print "Total Events read: ",eventsRead    
80 <        print "Total Files read: ",filesRead    
79 >        print "Total Events read: ",eventsRead," required: ",eventsRequired
80 >        print "Total Files read: ",filesRead," required: ",filesRequired
81          print "Total Jobs : ",len(task.getJobs())
82          list_ID={}
83          for st in possible_status:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines