CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
CrabTask.CrabTask Class Reference

Public Member Functions

def __init__
 
def create
 
def getoutput
 
def initializeTask
 
def run
 
def submit
 

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 
9  def __init__(self, dir, crab_cfg, pset=None, pset_name='mypset.py'):
10  #Thread.__init__(self)
11  self.dir = dir
12 
13  self.crabCfg_name = 'crab.cfg'
14  self.crab_cfg = crab_cfg
15 
16  self.pset_name = pset_name
17  self.pset = pset
18  self.initializeTask(dir=self.dir)

Member Function Documentation

def CrabTask.CrabTask.create (   self,
  dir 
)

Definition at line 30 of file CrabTask.py.

Referenced by CrabTask.CrabTask.run().

30 
31  def create(self,dir):
32  self.project = crabCreate(dir,self.crabCfg_name)
33  return self.project
def crabCreate
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 
39  def getoutput(self):
40  if not self.project: raise RuntimeError
41  getOutput(self.project)
def getOutput
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 TablePrint.write.

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

Definition at line 46 of file CrabTask.py.

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

Referenced by Types.EventID.cppID(), and Types.LuminosityBlockID.cppID().

46 
47  def run(self):
48  #self.initializeTask(dir=self.dir)
49  proj = self.create(self.dir)
50  self.submit()
51  return proj
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 
35  def submit(self):
36  if not self.project: raise RuntimeError
37  crabSubmit(self.project)
def crabSubmit
Definition: crabWrap.py:150

Member Data Documentation

CrabTask.CrabTask.crab_cfg

Definition at line 13 of file CrabTask.py.

Referenced by DTNoiseCalibration.DTNoiseCalibration.initCrab(), DTTTrigProd.DTTTrigProd.initCrab(), DTDQMValidation.DTDQMValidation.initCrab(), DTResidualCalibration.DTResidualCalibration.initCrab(), DTAnalysisResiduals.DTAnalysisResiduals.initCrab(), DTTTrigValid.DTTTrigValid.initCrab(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.initCrab(), and DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.initCrab().

CrabTask.CrabTask.crabCfg_name

Definition at line 12 of file CrabTask.py.

Referenced by CrabTask.CrabTask.initializeTask().

CrabTask.CrabTask.dir

Definition at line 10 of file CrabTask.py.

Referenced by Inspector.Inspector.GetListObjects(), CrabTask.CrabTask.run(), DTValidSummary.DTValidSummary.writeCfg(), DTDqm.DTDqm.writeCfg(), DTDQMMerge.DTDQMMerge.writeCfg(), DTVDriftSegmentWriter.DTVDriftSegmentWriter.writeCfg(), DTVDriftMeanTimerWriter.DTVDriftMeanTimerWriter.writeCfg(), DTTTrigCorrFirst.DTTTrigCorrFirst.writeCfg(), DTTTrigProd.DTTTrigProd.writeCfg(), DTNoiseCalibration.DTNoiseCalibration.writeCfg(), DTDQMHarvesting.DTDQMHarvesting.writeCfg(), DTTTrigTimeBoxesWriter.DTTTrigTimeBoxesWriter.writeCfg(), DTTTrigResidualCorr.DTTTrigResidualCorr.writeCfg(), DTTTrigValid.DTTTrigValid.writeCfg(), DTResidualCalibration.DTResidualCalibration.writeCfg(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.writeCfg(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.writeCfg(), DTDQMValidation.DTDQMValidation.writeCfg(), and DTAnalysisResiduals.DTAnalysisResiduals.writeCfg().

CrabTask.CrabTask.project

Definition at line 31 of file CrabTask.py.

Referenced by CrabTask.CrabTask.getoutput(), CrabWatch.CrabWatch.run(), and CrabTask.CrabTask.submit().

CrabTask.CrabTask.pset

Definition at line 16 of file CrabTask.py.

Referenced by Types._ConvertToPSet.addBool(), Types._ConvertToPSet.addDouble(), Types._ConvertToPSet.addESInputTag(), Types._ConvertToPSet.addEventID(), Types._ConvertToPSet.addEventRange(), Types._ConvertToPSet.addInputTag(), Types._ConvertToPSet.addInt32(), Types._ConvertToPSet.addInt64(), Types._ConvertToPSet.addLuminosityBlockID(), Types._ConvertToPSet.addLuminosityBlockRange(), Types._ConvertToPSet.addNewFileInPath(), Types._ConvertToPSet.addPSet(), Types._ConvertToPSet.addString(), Types._ConvertToPSet.addUInt32(), Types._ConvertToPSet.addUInt64(), Types._ConvertToPSet.addVBool(), Types._ConvertToPSet.addVDouble(), Types._ConvertToPSet.addVESInputTag(), Types._ConvertToPSet.addVEventID(), Types._ConvertToPSet.addVEventRange(), Types._ConvertToPSet.addVInputTag(), Types._ConvertToPSet.addVInt32(), Types._ConvertToPSet.addVInt64(), Types._ConvertToPSet.addVLuminosityBlockID(), Types._ConvertToPSet.addVLuminosityBlockRange(), Types._ConvertToPSet.addVPSet(), Types._ConvertToPSet.addVString(), Types._ConvertToPSet.addVUInt32(), Types._ConvertToPSet.addVUInt64(), and CrabTask.CrabTask.initializeTask().

CrabTask.CrabTask.pset_name

Definition at line 15 of file CrabTask.py.

Referenced by DTNoiseCalibration.DTNoiseCalibration.initCrab(), DTTTrigProd.DTTTrigProd.initCrab(), DTDQMValidation.DTDQMValidation.initCrab(), DTResidualCalibration.DTResidualCalibration.initCrab(), DTAnalysisResiduals.DTAnalysisResiduals.initCrab(), DTTTrigValid.DTTTrigValid.initCrab(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.initCrab(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.initCrab(), CrabTask.CrabTask.initializeTask(), DTValidSummary.DTValidSummary.writeCfg(), DTDqm.DTDqm.writeCfg(), DTDQMMerge.DTDQMMerge.writeCfg(), DTTTrigProd.DTTTrigProd.writeCfg(), DTNoiseCalibration.DTNoiseCalibration.writeCfg(), DTDQMHarvesting.DTDQMHarvesting.writeCfg(), DTTTrigValid.DTTTrigValid.writeCfg(), DTResidualCalibration.DTResidualCalibration.writeCfg(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.writeCfg(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.writeCfg(), DTAnalysisResiduals.DTAnalysisResiduals.writeCfg(), and DTDQMValidation.DTDQMValidation.writeCfg().