CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CmsswTask.CmsswTask Class Reference

Public Member Functions

def __init__ (self, dir, configs, psets=None)
 
def initTask (self)
 
def run (self)
 

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.

4  def __init__(self, dir, configs, psets=None):
5  self.dir = dir
6  self.configs = configs
7  self.psets = psets
8  self.initTask()
9 
def initTask(self)
Definition: CmsswTask.py:10
def __init__(self, dir, configs, psets=None)
Definition: CmsswTask.py:4

Member Function Documentation

def CmsswTask.CmsswTask.initTask (   self)

Definition at line 10 of file CmsswTask.py.

References CmsswTask.CmsswTask.configs, pos::PixelConfigList.configs, CmsswTask.CmsswTask.dir, CmsswTask.CmsswTask.psets, and TriggerAnalyzer.write().

10  def initTask(self):
11  if self.psets:
12  if not os.path.exists(self.dir): os.makedirs(self.dir)
13  for pset_name in self.configs:
14  pset = self.psets[pset_name]
15  open(self.dir + '/' + pset_name,'w').write(pset)
16 
def initTask(self)
Definition: CmsswTask.py:10
def write(self, setup)
def CmsswTask.CmsswTask.run (   self)

Definition at line 17 of file CmsswTask.py.

References CmsswTask.CmsswTask.configs, pos::PixelConfigList.configs, and CmsswTask.CmsswTask.dir.

Referenced by Types.EventID.cppID(), Types.LuminosityBlockID.cppID(), and o2olib.O2OTool.execute().

17  def run(self):
18  if not os.path.exists(self.dir): os.makedirs(self.dir)
19  cwd = os.getcwd()
20  for pset in self.configs:
21  os.chdir(self.dir)
22  if not os.path.exists(pset): raise RuntimeError('%s not found in dir %s' % (pset,os.getcwd()))
23 
24  cmd = 'cmsRun %s' % pset
25  print "Running", cmd, "in dir", self.dir
26  os.system(cmd)
27  os.chdir(cwd)

Member Data Documentation

CmsswTask.CmsswTask.psets

Definition at line 7 of file CmsswTask.py.

Referenced by Config.Process.dumpPython(), and CmsswTask.CmsswTask.initTask().