CMS 3D CMS Logo

Public Member Functions | Public Attributes

CmsswTask::CmsswTask Class Reference

List of all members.

Public Member Functions

def __init__
def initTask
def run

Public Attributes

 configs
 dir
 psets

Detailed Description

Definition at line 3 of file CmsswTask.py.


Constructor & Destructor Documentation

def CmsswTask::CmsswTask::__init__ (   self,
  dir,
  configs,
  psets = None 
)

Definition at line 4 of file CmsswTask.py.

00005                                                 :
00006         self.dir = dir  
00007         self.configs = configs
00008         self.psets = psets
00009         self.initTask()
  

Member Function Documentation

def CmsswTask::CmsswTask::initTask (   self)

Definition at line 10 of file CmsswTask.py.

00011                       :
00012         if self.psets:
00013             if not os.path.exists(self.dir): os.makedirs(self.dir)
00014             for pset_name in self.configs:
00015                 pset = self.psets[pset_name]
00016                 open(self.dir + '/' + pset_name,'w').write(pset)
 
def CmsswTask::CmsswTask::run (   self)

Definition at line 17 of file CmsswTask.py.

00018                  :
00019         if not os.path.exists(self.dir): os.makedirs(self.dir)
00020         cwd = os.getcwd()
00021         for pset in self.configs:
00022             os.chdir(self.dir)
00023             if not os.path.exists(pset): raise RuntimeError,'%s not found in dir %s' % (pset,os.getcwd())
00024 
00025             cmd = 'cmsRun %s' % pset
00026             print "Running", cmd, "in dir", self.dir
00027             os.system(cmd)
00028             os.chdir(cwd)       

Member Data Documentation

Definition at line 4 of file CmsswTask.py.

Definition at line 4 of file CmsswTask.py.

Definition at line 4 of file CmsswTask.py.