ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/Checker.py
Revision: 1.6
Committed: Tue Dec 6 16:47:25 2005 UTC (19 years, 4 months ago) by slacapra
Content type: text/x-python
Branch: MAIN
CVS Tags: CRAB_1_4_0_pre1, CRAB_1_3_0, CRAB_1_3_0_pre6, CRAB_1_3_0_pre5, CRAB_1_3_0_pre4, CRAB_1_3_0_pre3, HEAD_20092006, CRAB_1_2_1, CRAB_1_2_0, CRAB_1_2_0_pre9, CRAB_1_2_0_pre8, CRAB_1_2_0_pre7, post_cmssw_integration_20060527, pre_cmssw_integration_20060527, CRAB_1_1_0, CRAB_1_1_0_pre4, CRAB_1_1_0_pre3, CRAB_1_1_0_pre1, CRAB_1_0_7, CRAB_1_0_7_pre1, CRAB_1_0_6, CRAB_1_0_5, CRAB_1_0_4, CRAB_1_0_3
Branch point for: CRAB_BOSS4
Changes since 1.5: +2 -2 lines
Log Message:
improved runCommand plus cosmetics

File Contents

# User Rev Content
1 slacapra 1.1 from Actor import *
2     import common
3    
4     class Checker(Actor):
5     def __init__(self, cfg_params, nj_list):
6     self.cfg_params = cfg_params
7     self.nj_list = nj_list
8     return
9    
10     def run(self):
11     """
12     The main method of the class.
13     """
14     common.logger.debug(5, "Checker::run() called")
15    
16     if len(self.nj_list)==0:
17     common.logger.debug(5, "No jobs to check")
18     return
19    
20     # run a list-match on first job
21     for nj in self.nj_list:
22 slacapra 1.2 match = common.scheduler.listMatch(nj)
23     flag = ''
24 afanfani 1.4 if not match:
25 slacapra 1.6 flag=' NOT '
26     number=' '
27 fanzago 1.3 if match : number= str(match)
28 slacapra 1.5 common.logger.message("Job #"+str(nj+1)+" does "+flag+" matches " + number + " sites")
29 slacapra 1.1 pass
30    
31     return