CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
DTTtrigWorkflow.DTttrigWorkflow Class Reference
Inheritance diagram for DTTtrigWorkflow.DTttrigWorkflow:

Public Member Functions

def __init__
 
def add_parser_options
 CLI creation #. More...
 
def get_output_db
 
def prepare_residuals_all
 
def prepare_residuals_check
 
def prepare_residuals_correction
 
def prepare_residuals_dump
 
def prepare_residuals_submit
 prepare functions for residuals # More...
 
def prepare_timeboxes_all
 
def prepare_timeboxes_check
 
def prepare_timeboxes_correction
 
def prepare_timeboxes_dump
 
def prepare_timeboxes_submit
 Prepare functions for timeboxes #. More...
 
def prepare_timeboxes_write
 
def prepare_validation_all
 
def prepare_validation_check
 
def prepare_validation_submit
 prepare functions for validation # More...
 
def prepare_validation_write
 
def prepare_workflow
 
def summary
 

Public Attributes

 all_commands
 
 outpath_command_tag
 
 outpath_workflow_mode_dict
 
 output_db_dict
 
 output_db_file
 
 output_file
 
 output_files
 
 process
 
 pset_name
 
 pset_template
 

Detailed Description

This class creates and performce / submits ttrig workflow jobs

Definition at line 12 of file DTTtrigWorkflow.py.

Constructor & Destructor Documentation

def DTTtrigWorkflow.DTttrigWorkflow.__init__ (   self,
  options 
)

Definition at line 14 of file DTTtrigWorkflow.py.

14 
15  def __init__(self, options):
16  # call parent constructor
17  super( DTttrigWorkflow, self ).__init__( options )
18 
19  self.outpath_command_tag = "TTrigCalibration"
20  # Dict to map workflow modes to output file name
21  output_file_dict ={ "timeboxes" : "DTTimeBoxes.root",
22  "residuals" : 'residuals.root',
23  "validation" : "DQM.root"
24  }
25  # Dict to map workflow modes to output folders in main path
27  "timeboxes" : "TimeBoxes",
28  "residuals" : "Residuals",
29  "validation" : "TtrigValidation"
30  }
31  # Dict to map workflow modes to database file name
32  self.output_db_dict = { "timeboxes" : {
33  "write": "ttrig_timeboxes_uncorrected_"
34  + self.tag
35  + ".db",
36  "correction": "ttrig_timeboxes_"
37  + self.tag
38  + ".db"
39  },
40  "residuals" : "ttrig_residuals_" + self.tag + ".db"}
41  self.output_file = output_file_dict[self.options.workflow_mode]
42  self.output_files = [self.output_file]

Member Function Documentation

def DTTtrigWorkflow.DTttrigWorkflow.add_parser_options (   cls,
  subparser_container 
)

CLI creation #.

Definition at line 268 of file DTTtrigWorkflow.py.

269  def add_parser_options(cls, subparser_container):
270  ttrig_parser = subparser_container.add_parser( "ttrig",
271  #parents=[mutual_parent_parser, common_parent_parser],
272  help = "" ) # What does ttrig
273 
274 
275  ################################################################
276  # Sub parser options for workflow modes #
277  ################################################################
278  ttrig_subparsers = ttrig_parser.add_subparsers( dest="workflow_mode",
279  help="Possible workflow modes",)
280  ## Add all workflow modes for ttrig
281  ttrig_timeboxes_subparser = ttrig_subparsers.add_parser( "timeboxes",
282  help = "" )
283  ttrig_residuals_subparser = ttrig_subparsers.add_parser( "residuals",
284  help = "" )
285  ttrig_validation_subparser = ttrig_subparsers.add_parser( "validation",
286  help = "" )
287  ################################################################
288  # Sub parser options for workflow mode timeboxes #
289  ################################################################
290  ttrig_timeboxes_subparsers = ttrig_timeboxes_subparser.add_subparsers( dest="command",
291  help="Possible commands for timeboxes")
292  ttrig_timeboxes_submit_parser = ttrig_timeboxes_subparsers.add_parser(
293  "submit",
294  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
295  super(DTttrigWorkflow,cls).get_submission_options_parser(),
296  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
297  help = "Submit job to the GRID via crab3")
298 
299  ttrig_timeboxes_check_parser = ttrig_timeboxes_subparsers.add_parser(
300  "check",
301  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
302  super(DTttrigWorkflow,cls).get_check_options_parser(),],
303  help = "Check status of submitted jobs")
304 
305  ttrig_timeboxes_write_parser = ttrig_timeboxes_subparsers.add_parser(
306  "write",
307  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
308  super(DTttrigWorkflow,cls).get_write_options_parser()
309  ],
310  help = "Write result from root output to text file")
311 
312  ttrig_timeboxes_correction_parser = ttrig_timeboxes_subparsers.add_parser(
313  "correction",
314  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
315  super(DTttrigWorkflow,cls).get_local_input_db_options_parser()
316  ],
317  help = "Perform correction on uncorrected ttrig database")
318 
319  ttrig_timeboxes_dump_parser = ttrig_timeboxes_subparsers.add_parser(
320  "dump",
321  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
322  super(DTttrigWorkflow,cls).get_dump_options_parser()],
323  help = "Dump database to text file")
324 
325  ttrig_timeboxes_all_parser = ttrig_timeboxes_subparsers.add_parser(
326  "all",
327  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
328  super(DTttrigWorkflow,cls).get_submission_options_parser(),
329  super(DTttrigWorkflow,cls).get_check_options_parser(),
330  super(DTttrigWorkflow,cls).get_input_db_options_parser(),
331  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
332  super(DTttrigWorkflow,cls).get_write_options_parser(),
333  super(DTttrigWorkflow,cls).get_dump_options_parser()
334  ],
335  help = "Perform all steps: submit, check, write, correction,"\
336  "dump in this order")
337 
338  ################################################################
339  # Sub parser options for workflow mode residuals #
340  ################################################################
341  ttrig_residuals_subparsers = ttrig_residuals_subparser.add_subparsers( dest="command",
342  help="Possible commands for residuals")
343  ttrig_residuals_submit_parser = ttrig_residuals_subparsers.add_parser(
344  "submit",
345  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
346  super(DTttrigWorkflow,cls).get_submission_options_parser(),
347  super(DTttrigWorkflow,cls).get_check_options_parser(),
348  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
349  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
350  help = "Submit job to the GRID via crab3")
351 
352  ttrig_residuals_check_parser = ttrig_residuals_subparsers.add_parser(
353  "check",
354  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
355  super(DTttrigWorkflow,cls).get_check_options_parser(),],
356  help = "Check status of submitted jobs")
357 
358  ttrig_residuals_correct_parser = ttrig_residuals_subparsers.add_parser(
359  "correction",
360  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
361  super(DTttrigWorkflow,cls).get_write_options_parser(),
362  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
363  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
364  help = "Perform residual corrections")
365  ttrig_residuals_correct_parser.add_argument("--globaltag",
366  help="Alternative globalTag. Otherwise the gt for sunmission is used")
367 
368  ttrig_residuals_dump_parser = ttrig_residuals_subparsers.add_parser(
369  "dump",
370  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
371  super(DTttrigWorkflow,cls).get_dump_options_parser()],
372  help = "Dump database to text file")
373 
374  ttrig_residuals_all_parser = ttrig_residuals_subparsers.add_parser(
375  "all",
376  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
377  super(DTttrigWorkflow,cls).get_submission_options_parser(),
378  super(DTttrigWorkflow,cls).get_check_options_parser(),
379  super(DTttrigWorkflow,cls).get_write_options_parser(),
380  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
381  super(DTttrigWorkflow,cls).get_dump_options_parser(),
382  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
383  help = "Perform all steps: submit, check, correct, dump")
384 
385  ################################################################
386  # Sub parser options for workflow mode validation #
387  ################################################################
388  ttrig_validation_subparsers = ttrig_validation_subparser.add_subparsers( dest="command",
389  help="Possible commands for residuals")
390 
391  ttrig_validation_submit_parser = ttrig_validation_subparsers.add_parser(
392  "submit",
393  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
394  super(DTttrigWorkflow,cls).get_submission_options_parser(),
395  super(DTttrigWorkflow,cls).get_check_options_parser(),
396  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
397  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
398  help = "Submit job to the GRID via crab3")
399 
400 
401  ttrig_validation_check_parser = ttrig_validation_subparsers.add_parser(
402  "check",
403  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
404  super(DTttrigWorkflow,cls).get_check_options_parser(),],
405  help = "Check status of submitted jobs")
406 
407  ttrig_validation_write_parser = ttrig_validation_subparsers.add_parser(
408  "write",
409  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
410  super(DTttrigWorkflow,cls).get_write_options_parser()],
411  help = "Create summary for validation")
412 
413  ttrig_validation_all_parser = ttrig_validation_subparsers.add_parser(
414  "all",
415  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
416  super(DTttrigWorkflow,cls).get_submission_options_parser(),
417  super(DTttrigWorkflow,cls).get_check_options_parser(),
418  super(DTttrigWorkflow,cls).get_write_options_parser(),
419  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
420  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
421  help = "Perform all steps: submit, check, summary")
def add_parser_options
CLI creation #.
def DTTtrigWorkflow.DTttrigWorkflow.get_output_db (   self,
  workflow_mode,
  command 
)

Definition at line 56 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.output_db_dict.

Referenced by DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), and DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump().

56 
57  def get_output_db(self, workflow_mode, command):
58  output_db_file = self.output_db_dict[workflow_mode]
59  if isinstance(output_db_file, dict):
60  return output_db_file[command]
return output_db_file
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_all (   self)

Definition at line 214 of file DTTtrigWorkflow.py.

References DTT0WireWorkflow.DTT0WireWorkflow.all_commands, and DTTtrigWorkflow.DTttrigWorkflow.all_commands.

215  def prepare_residuals_all(self):
216  # individual prepare functions for all tasks will be called in
217  # main implementation of all
218  self.all_commands=["submit", "check", "correction", "dump"]
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_check (   self)

Definition at line 164 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

165  def prepare_residuals_check(self):
166  self.load_options_command("submit")
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction (   self)

Definition at line 167 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), DTWorkflow.DTWorkflow.add_local_custom_db(), DTWorkflow.DTWorkflow.add_local_vdrift_db(), DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), tools.loadCmsProcess(), DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_write(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

169  self.pset_name = "dtTTrigResidualCorrection_cfg.py"
170  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigResidualCorrection_cfg'
172  self.load_options_command("submit")
173  self.process.source.firstRun = cms.untracked.uint32(self.options.run)
174  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
175 
176  tag = self.prepare_common_write()
177  if self.options.inputT0DB:
178  log.warning("Option inputT0DB not supported for residual corrections")
179 
180  if self.options.inputDBTag:
181  self.add_local_custom_db(local=True)
182  if self.options.inputVDriftDB:
183  self.add_local_vdrift_db(local=True)
184  if self.options.inputCalibDB:
185  self.add_local_calib_db(local=True)
186  # Change DB label if running on Cosmics
187  if self.options.datasettype == "Cosmics":
188  self.process.dtTTrigResidualCorrection.dbLabel = 'cosmics'
189  self.process.dtTTrigResidualCorrection.correctionAlgoConfig.dbLabel = 'cosmics'
190  ttrig_ResidCorr_db = os.path.abspath( os.path.join(self.result_path,
191  self.get_output_db("residuals", "write")))
192  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_ResidCorr_db
193  rootfile_path = os.path.abspath( os.path.join(self.result_path, self.output_file))
194  merged_file = os.path.join(self.result_path, self.output_file)
195  self.process.dtTTrigResidualCorrection.correctionAlgoConfig.residualsRootFile = merged_file
196  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump (   self)

Definition at line 197 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), DTWorkflow.DTWorkflow.prepare_common_dump(), DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

198  def prepare_residuals_dump(self):
199  self.pset_name = 'dumpDBToFile_ResidCorr_cfg.py'
200  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'
201  if self.options.input_dumpDB:
202  dbpath = os.path.abspath(self.options.input_dumpDB)
203  else:
204  try:
205  test = self.result_path
206  self.load_options_command("write")
207  except:
208  pass
209  dbpath = os.path.abspath( os.path.join(self.result_path,
210  self.get_output_db("residuals",
211  "write")))
212  self.prepare_common_dump(dbpath)
213  self.write_pset_file()
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit (   self)

prepare functions for residuals #

Definition at line 146 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), tools.loadCmsProcess(), DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_submit(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

147  def prepare_residuals_submit(self):
148  self.pset_name = 'dtResidualCalibration_cfg.py'
149  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cfg'
150  if self.options.datasettype == "Cosmics":
151  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cosmics_cfg'
153  #~ self.process.GlobalTag.globaltag = cms.string(self.options.globaltag)
154  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
155  self.process.dtResidualCalibration.rootFileName = self.output_file
156  self.prepare_common_submit()
157  if self.options.fromMuons:
158  self.process.dtResidualCalibration.Muons = cms.InputTag("muons")
159  if self.options.histoRange:
160  self.process.dtResidualCalibration.histogramRange = cms.double(float(self.options.histoRange))
161  if self.options.inputCalibDB:
162  self.add_local_calib_db()
163  self.write_pset_file()
def prepare_residuals_submit
prepare functions for residuals #
def loadCmsProcess
Definition: tools.py:56
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_all (   self)

Definition at line 138 of file DTTtrigWorkflow.py.

139  def prepare_timeboxes_all(self):
140  # individual prepare functions for all tasks will be called in
141  # main implementation of all
142  self.all_commands=["submit", "check", "write", "correction", "dump"]
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_check (   self)

Definition at line 80 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

80 
81  def prepare_timeboxes_check(self):
82  self.load_options_command("submit")
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction (   self)

Definition at line 99 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), tools.loadCmsProcess(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, FWLite.ElectronMVAID.tag, Entry< Mode >.tag, Entry< T >.tag, tnp::TagProbePair.tag, MeasurementEstimator::OpaquePayload.tag, cond::IOVKeysDescription.tag(), cond::persistency::IOVEditorData.tag, LHERunInfoProduct::Header.tag(), ConeIsolationAlgorithm.tag(), Inspector.Inspector.tag, ImpactParameterAlgorithm.tag(), Herwig::HerwigUIProvider.tag(), BeamSpotFakeConditions.tag, cond::persistency::IOVEditor.tag(), cond::service::PoolDBOutputService.tag(), TrackListMerger::TkEDGetTokenss.tag, FWLite.WorkingPoints.tag, MuIsolatorResultProducer< BT >::DepositConf.tag, L1MuKBMTCombinedStub.tag(), SoftLepton.tag(), CollHandle< EEDigiCollection >.tag(), CollHandle< EBDigiCollection >.tag(), CollHandle< FEDRawDataCollection >.tag(), CollHandle< T >.tag(), CollHandle< std::vector< PCaloHit > >.tag(), CollHandle< edm::SortedCollection >.tag(), DQMNet::CoreObject.tag, cond::DataProxyWrapperBase.tag(), L1MuDTTrackSegPhi.tag(), L1MuBMTrackSegPhi.tag(), querying.connection.tag(), personalPlayback.FrameworkJob.tag, DTWorkflow.DTWorkflow.tag(), and DTWorkflow.DTWorkflow.write_pset_file().

99 
101  self.load_options_command("submit")
102  self.pset_name = 'dtTTrigCorrection_cfg.py'
103  self.pset_template = "CalibMuon.DTCalibration.dtTTrigCorrection_cfg"
104  ttrig_timeboxes_db = "ttrig_timeboxes_"+ self.tag + ".db"
105  ttrig_timeboxes_db = os.path.join(self.result_path,
106  self.get_output_db("timeboxes", "correction"))
108  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
109  self.process.source.firstRun = self.options.run
110  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_timeboxes_db
111 
112  if not self.options.inputCalibDB:
113  self.options.inputCalibDB = os.path.join(self.result_path,
114  self.get_output_db( "timeboxes", "write" ) )
115  if self.options.inputVDriftDB:
116  log.warning("Options inputVDriftDB has no effect for timeboxes correction")
117  if self.options.inputT0DB:
118  log.warning("Options inputT0DB has no effect for timeboxes correction")
119  self.add_local_calib_db(local=True)
120  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump (   self)

Definition at line 121 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), DTWorkflow.DTWorkflow.prepare_common_dump(), DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

122  def prepare_timeboxes_dump(self):
123  self.pset_name = 'dumpDBToFile_ResidCorr_cfg.py'
124  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'
125  if self.options.input_dumpDB:
126  try:
127  test = self.result_path
128  self.load_options_command("correction")
129  except:
130  pass
131  dbpath = os.path.abspath(self.options.input_dumpDB)
132  else:
133  dbpath = os.path.abspath( os.path.join(self.result_path,
134  self.get_output_db("timeboxes",
135  "correction")))
136  self.prepare_common_dump(dbpath)
137  self.write_pset_file()
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_submit (   self)

Prepare functions for timeboxes #.

Definition at line 64 of file DTTtrigWorkflow.py.

64 
66  self.pset_name = 'dtTTrigCalibration_cfg.py'
67  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cfg'
68  if self.options.datasettype == "Cosmics":
69  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cosmics_cfg'
70  log.debug('Using pset template ' + self.pset_template)
72  self.process.GlobalTag.globaltag = self.options.globaltag
73  self.process.dtTTrigCalibration.rootFileName = self.output_file
74  self.process.dtTTrigCalibration.digiLabel = self.digilabel
75 
76  if self.options.inputDBTag:
77  self.add_local_custom_db()
78  self.prepare_common_submit()
79  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
def prepare_timeboxes_submit
Prepare functions for timeboxes #.
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_write (   self)

Definition at line 83 of file DTTtrigWorkflow.py.

83 
85  self.output_db_file = self.output_db_dict[self.options.workflow_mode]
86  if isinstance(self.output_db_dict[self.options.workflow_mode], dict):
87  self.output_db_file = self.output_db_file[self.options.command]
88  self.prepare_common_write()
89  merged_file = os.path.join(self.result_path, self.output_file)
90  ttrig_uncorrected_db = os.path.join(self.result_path,
91  self.get_output_db("timeboxes", "write"))
92  self.pset_name = 'dtTTrigWriter_cfg.py'
93  self.pset_template = "CalibMuon.DTCalibration.dtTTrigWriter_cfg"
95  self.process.dtTTrigWriter.rootFileName = "file:///" + merged_file
96  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_uncorrected_db
97  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
98  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_all (   self)

Definition at line 259 of file DTTtrigWorkflow.py.

260  def prepare_validation_all(self):
261  # individual prepare functions for all tasks will be called in
262  # main implementation of all
263  self.all_commands=["submit", "check","write"]
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_check (   self)

Definition at line 237 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

238  def prepare_validation_check(self):
239  self.load_options_command("submit")
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit (   self)

prepare functions for validation #

Definition at line 223 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), tools.loadCmsProcess(), DTWorkflow.DTWorkflow.prepare_common_submit(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

224  def prepare_validation_submit(self):
225  self.pset_name = 'dtCalibValidation_cfg.py'
226  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cfg'
227  if self.options.datasettype == "Cosmics":
228  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cosmics_cfg'
229  if self.options.fromMuons:
230  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidationFromMuons_cfg'
232  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
233  self.prepare_common_submit()
234  if self.options.inputCalibDB:
235  self.add_local_calib_db()
236  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
def prepare_validation_submit
prepare functions for validation #
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write (   self)

Definition at line 240 of file DTTtrigWorkflow.py.

References tools.loadCmsProcess(), DTWorkflow.DTWorkflow.local_path(), DTWorkflow.DTWorkflow.prepare_common_write(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

241  def prepare_validation_write(self):
242  self.pset_name = 'dtDQMClient_cfg.py'
243  self.pset_template = 'CalibMuon.DTCalibration.dtDQMClient_cfg'
245  self.prepare_common_write(do_hadd = False)
246  dqm_files = glob.glob(os.path.join( self.local_path,
247  "unmerged_results",
248  "DQM_*.root"))
249  dqm_files[:] = ["file://"+txt for txt in dqm_files]
250  self.process.source.fileNames = dqm_files
251  self.process.dqmSaver.dirName = os.path.abspath(self.result_path)
252  self.process.dqmSaver.workflow = str(self.options.datasetpath)
253  if self.process.DQMStore.collateHistograms == True:
254  self.process.dqmSaver.forceRunNumber = self.options.run
255  self.write_pset_file()
def loadCmsProcess
Definition: tools.py:56
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_workflow (   self)
Generalized function to prepare workflow dependent on workflow mode

Definition at line 43 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.run().

43 
44  def prepare_workflow(self):
45  """ Generalized function to prepare workflow dependent on workflow mode"""
46  function_name = "prepare_" + self.options.workflow_mode + "_" + self.options.command
47  try:
48  fill_function = getattr(self, function_name)
49  except AttributeError:
50  errmsg = "Class `{}` does not implement `{}`"
51  raise NotImplementedError( errmsg.format(self.__class__.__name__,
52  function_name))
53  log.debug("Preparing workflow with function %s" % function_name)
54  # call chosen function
55  fill_function()
def DTTtrigWorkflow.DTttrigWorkflow.summary (   self)

Definition at line 256 of file DTTtrigWorkflow.py.

257  def summary(self):
258  pass

Member Data Documentation

DTTtrigWorkflow.DTttrigWorkflow.all_commands

Definition at line 141 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.all(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_all(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_all(), and DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_all().

DTTtrigWorkflow.DTttrigWorkflow.outpath_command_tag

Definition at line 18 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.local_path(), and DTWorkflow.DTWorkflow.remote_out_path().

DTTtrigWorkflow.DTttrigWorkflow.outpath_workflow_mode_dict

Definition at line 25 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.outpath_workflow_mode_tag().

DTTtrigWorkflow.DTttrigWorkflow.output_db_dict

Definition at line 31 of file DTTtrigWorkflow.py.

Referenced by DTTtrigWorkflow.DTttrigWorkflow.get_output_db().

DTTtrigWorkflow.DTttrigWorkflow.output_db_file

Definition at line 84 of file DTTtrigWorkflow.py.

DTTtrigWorkflow.DTttrigWorkflow.output_file

Definition at line 40 of file DTTtrigWorkflow.py.

Referenced by mergeLHE.DefaultLHEMerger.merge(), mergeLHE.MG5LOLHEMerger.merge(), mergeLHE.ExternalCppLHEMerger.merge(), DTWorkflow.DTWorkflow.prepare_common_write(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), and DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write().

DTTtrigWorkflow.DTttrigWorkflow.output_files

Definition at line 41 of file DTTtrigWorkflow.py.

DTTtrigWorkflow.DTttrigWorkflow.process

Definition at line 70 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.add_local_calib_db(), DTWorkflow.DTWorkflow.add_local_custom_db(), DTWorkflow.DTWorkflow.add_local_t0_db(), DTWorkflow.DTWorkflow.add_local_vdrift_db(), DTWorkflow.DTWorkflow.add_preselection(), DTWorkflow.DTWorkflow.add_raw_option(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.completeInputCommand(), adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write(), runTauIdMVA.TauIDEmbedder.processDeepProducer(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), runTauIdMVA.TauIDEmbedder.runTauID(), ConfigBuilder.ConfigBuilder.scheduleSequence(), and runTauIdMVA.TauIDEmbedder.tauIDMVAinputs().

DTTtrigWorkflow.DTttrigWorkflow.pset_name

Definition at line 65 of file DTTtrigWorkflow.py.

Referenced by DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_dump(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_dump(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write(), DTWorkflow.DTWorkflow.pset_path(), and DTWorkflow.DTWorkflow.runCMSSWtask().

DTTtrigWorkflow.DTttrigWorkflow.pset_template

Definition at line 66 of file DTTtrigWorkflow.py.

Referenced by DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_dump(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_dump(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit(), and DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write().