CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, dir, crab_cfg, pset=None, pset_name='mypset.py')
 
def create (self, dir)
 
def getoutput (self)
 
def initializeTask (self, dir)
 
def run (self)
 
def submit (self)
 

Public Attributes

 crab_cfg
 
 crabCfg_name
 
 dir
 
 project
 
 pset
 
 pset_name
 

Detailed Description

Definition at line 7 of file CrabTask.py.

Constructor & Destructor Documentation

def CrabTask.CrabTask.__init__ (   self,
  dir,
  crab_cfg,
  pset = None,
  pset_name = 'mypset.py' 
)

Definition at line 8 of file CrabTask.py.

8  def __init__(self, dir, crab_cfg, pset=None, pset_name='mypset.py'):
9  #Thread.__init__(self)
10  self.dir = dir
11 
12  self.crabCfg_name = 'crab.cfg'
13  self.crab_cfg = crab_cfg
14 
15  self.pset_name = pset_name
16  self.pset = pset
17  self.initializeTask(dir=self.dir)
18 
def initializeTask(self, dir)
Definition: CrabTask.py:19
def __init__(self, dir, crab_cfg, pset=None, pset_name='mypset.py')
Definition: CrabTask.py:8

Member Function Documentation

def CrabTask.CrabTask.create (   self,
  dir 
)

Definition at line 30 of file CrabTask.py.

Referenced by o2olib.O2OTool.execute(), and CrabTask.CrabTask.run().

30  def create(self,dir):
31  self.project = crabCreate(dir,self.crabCfg_name)
32  return self.project
33 
def create(self, dir)
Definition: CrabTask.py:30
def crabCreate(dir='.', crabCfg_name='crab.cfg')
Definition: crabWrap.py:137
def CrabTask.CrabTask.getoutput (   self)

Definition at line 38 of file CrabTask.py.

References crabWrap.getOutput(), and CrabTask.CrabTask.project.

38  def getoutput(self):
39  if not self.project: raise RuntimeError
40  getOutput(self.project)
41 
def getoutput(self)
Definition: CrabTask.py:38
def getOutput(project)
Definition: crabWrap.py:230
def CrabTask.CrabTask.initializeTask (   self,
  dir 
)

Definition at line 19 of file CrabTask.py.

References CrabTask.CrabTask.crabCfg_name, CrabTask.CrabTask.pset, CrabTask.CrabTask.pset_name, and TriggerAnalyzer.write().

19  def initializeTask(self, dir):
20  if not os.path.exists(dir): os.makedirs(dir)
21 
22  # Write pset
23  if self.pset:
24  self.crab_cfg.set('CMSSW','pset',self.pset_name)
25  open(dir + '/' + self.pset_name,'w').write(self.pset)
26 
27  # Write CRAB cfg
28  self.crab_cfg.write(open(dir + '/' + self.crabCfg_name,'w'))
29 
def initializeTask(self, dir)
Definition: CrabTask.py:19
def write(self, setup)
def CrabTask.CrabTask.run (   self)

Definition at line 46 of file CrabTask.py.

References CrabTask.CrabTask.create(), mps_create_file_lists.FileListCreator.create(), CmsswTask.CmsswTask.dir, CrabTask.CrabTask.dir, and CrabTask.CrabTask.submit().

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

46  def run(self):
47  #self.initializeTask(dir=self.dir)
48  proj = self.create(self.dir)
49  self.submit()
50  return proj
51 
def create(self, dir)
Definition: CrabTask.py:30
def submit(self)
Definition: CrabTask.py:34
def run(self)
Definition: CrabTask.py:46
def CrabTask.CrabTask.submit (   self)

Definition at line 34 of file CrabTask.py.

References crabWrap.crabSubmit(), and CrabTask.CrabTask.project.

Referenced by CrabTask.CrabTask.run().

34  def submit(self):
35  if not self.project: raise RuntimeError
36  crabSubmit(self.project)
37 
def submit(self)
Definition: CrabTask.py:34
def crabSubmit(project)
Definition: crabWrap.py:150

Member Data Documentation

CrabTask.CrabTask.crabCfg_name

Definition at line 12 of file CrabTask.py.

Referenced by CrabTask.CrabTask.initializeTask().

CrabTask.CrabTask.project