CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
DTVdriftWorkflow.DTvdriftWorkflow Class Reference
Inheritance diagram for DTVdriftWorkflow.DTvdriftWorkflow:
DTWorkflow.DTWorkflow CLIHelper.CLIHelper CrabHelper.CrabHelper

Public Member Functions

def __init__ (self, options)
 
def add_parser_options (cls, subparser_container)
 CLI creation #. More...
 
def prepare_meantimer_all (self)
 
def prepare_meantimer_check (self)
 
def prepare_meantimer_dump (self)
 
def prepare_meantimer_submit (self)
 Mean Timer #. More...
 
def prepare_meantimer_write (self)
 
def prepare_segment_all (self)
 
def prepare_segment_check (self)
 
def prepare_segment_dump (self)
 
def prepare_segment_submit (self)
 
def prepare_segment_write (self)
 
def prepare_workflow (self)
 
- Public Member Functions inherited from DTWorkflow.DTWorkflow
def __init__ (self, options)
 
def add_local_calib_db (self, local=False)
 
def add_local_custom_db (self)
 
def add_local_t0_db (self, local=False)
 
def add_local_vdrift_db (self, local=False)
 
def add_preselection (self)
 
def add_raw_option (self)
 
def all (self)
 
def check (self)
 
def check_missing_options (self, requirements_dict)
 
def correction (self)
 
def dump (self)
 
def dump_options (self)
 
def get_config_name (self, command="")
 
def get_output_files (self, crabtask, output_path)
 
def load_options (self, config_file_path)
 
def load_options_command (self, command)
 
def local_path (self)
 
def outpath_workflow_mode_tag (self)
 
def prepare_common_dump (self, db_path)
 
def prepare_common_submit (self)
 
def prepare_common_write (self, do_hadd=True)
 
def prepare_workflow (self)
 
def pset_path (self)
 
def pset_template_base_bath (self)
 
def remote_out_path (self)
 
def result_path (self)
 
def run (self)
 
def runCMSSWtask (self, pset_path="")
 
def submit (self)
 
def tag (self)
 
def user (self)
 
def write (self)
 
def write_pset_file (self)
 
- Public Member Functions inherited from CLIHelper.CLIHelper
def add_parser_options (cls, parser)
 
def fill_required_options_dict (self)
 
def fill_required_options_prepare_dict (self)
 
def get_check_options_parser (cls)
 
def get_common_options_parser (cls)
 
def get_dump_options_parser (cls)
 
def get_input_db_options_parser (cls)
 
def get_local_input_db_options_parser (cls)
 
def get_submission_options_parser (cls)
 
def get_write_options_parser (cls)
 
- Public Member Functions inherited from CrabHelper.CrabHelper
def __init__ (self)
 
def cert_info (self)
 
def check_crabtask (self)
 
def crab (self)
 
def crab_config_filename (self)
 
def crab_config_filepath (self)
 
def crab_taskname (self)
 
def create_crab_config (self)
 
def fill_options_from_crab_config (self)
 
def submit_crab_task (self)
 
def voms_proxy_create (self, passphrase=None)
 
def voms_proxy_time_left (self)
 
def write_crabConfig (self)
 

Public Attributes

 all_commands
 
 outpath_command_tag
 
 outpath_workflow_mode_dict
 
 output_file
 
 output_files
 
 process
 
 pset_name
 
 pset_template
 
- Public Attributes inherited from DTWorkflow.DTWorkflow
 digilabel
 
 files_reveived
 
 input_files
 
 options
 
 outpath_command_tag
 
 output_files
 
 process
 
 pset_name
 
 required_options_dict
 
 required_options_prepare_dict
 
 run_all_command
 
- Public Attributes inherited from CrabHelper.CrabHelper
 crab_config
 
 crabFunctions
 

Additional Inherited Members

- Static Public Member Functions inherited from DTWorkflow.DTWorkflow
def addPoolDBESSource (process, moduleName, record, tag, connect='sqlite_file:', label='')
 

Detailed Description

This class creates and performce / submits vdrift workflow jobs

Definition at line 11 of file DTVdriftWorkflow.py.

Constructor & Destructor Documentation

◆ __init__()

def DTVdriftWorkflow.DTvdriftWorkflow.__init__ (   self,
  options 
)

Definition at line 13 of file DTVdriftWorkflow.py.

13  def __init__(self, options):
14  # call parent constructor
15  super( DTvdriftWorkflow, self ).__init__( options )
16 
17  self.outpath_command_tag = "VdriftCalibration"
18  output_file_dict = { "segment" : "DTVDriftHistos.root",
19  "meantimer" : "DTTMaxHistos.root",
20  }
21  self.outpath_workflow_mode_dict = { "segment" : "Segments",
22  "meantimer" : "MeanTimer",
23  }
24  self.output_file = output_file_dict[self.options.workflow_mode]
25  self.output_files = [self.output_file]
26 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ add_parser_options()

def DTVdriftWorkflow.DTvdriftWorkflow.add_parser_options (   cls,
  subparser_container 
)

CLI creation #.

Definition at line 196 of file DTVdriftWorkflow.py.

References CLIHelper.CLIHelper.get_check_options_parser(), CLIHelper.CLIHelper.get_common_options_parser(), CLIHelper.CLIHelper.get_dump_options_parser(), CLIHelper.CLIHelper.get_input_db_options_parser(), CLIHelper.CLIHelper.get_local_input_db_options_parser(), CLIHelper.CLIHelper.get_submission_options_parser(), and CLIHelper.CLIHelper.get_write_options_parser().

196  def add_parser_options(cls, subparser_container):
197  vdrift_parser = subparser_container.add_parser( "vdrift",
198  #parents=[mutual_parent_parser, common_parent_parser],
199  help = "" ) # What does ttrig
200 
201 
204  vdrift_subparsers = vdrift_parser.add_subparsers( dest="workflow_mode",
205  help="Possible workflow modes",)
206 
207  vdrift_segment_subparser = vdrift_subparsers.add_parser( "segment",
208  #parents=[mutual_parent_parser, common_parent_parser],
209  help = "" )
210  vdrift_meantimer_subparser = vdrift_subparsers.add_parser( "meantimer",
211  #parents=[mutual_parent_parser, common_parent_parser],
212  help = "" )
213 
216  vdrift_segment_subparsers = vdrift_segment_subparser.add_subparsers( dest="command",
217  help="Possible commands for segments")
218  vdrift_segment_submit_parser = vdrift_segment_subparsers.add_parser(
219  "submit",
220  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
221  super(DTvdriftWorkflow,cls).get_submission_options_parser(),
222  super(DTvdriftWorkflow,cls).get_local_input_db_options_parser(),
223  super(DTvdriftWorkflow,cls).get_input_db_options_parser()],
224  help = "Submit job to the GRID via crab3")
225  vdrift_segment_submit_parser.add_argument("--inputTtrigDB",
226  help="Local alternative calib ttrig db")
227 
228  vdrift_segment_check_parser = vdrift_segment_subparsers.add_parser(
229  "check",
230  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
231  super(DTvdriftWorkflow,cls).get_check_options_parser()],
232  help = "Check status of submitted jobs")
233 
234  vdrift_segment_write_parser = vdrift_segment_subparsers.add_parser(
235  "write",
236  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
237  super(DTvdriftWorkflow,cls).get_write_options_parser()
238  ],
239  help = "Write result from root output to text file")
240 
241  vdrift_segment_dump_parser = vdrift_segment_subparsers.add_parser(
242  "dump",
243  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
244  super(DTvdriftWorkflow,cls).get_dump_options_parser()],
245  help = "Dump database to text file")
246 
247  vdrift_segment_all_parser = vdrift_segment_subparsers.add_parser(
248  "all",
249  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
250  super(DTvdriftWorkflow,cls).get_submission_options_parser(),
251  super(DTvdriftWorkflow,cls).get_check_options_parser(),
252  super(DTvdriftWorkflow,cls).get_input_db_options_parser(),
253  super(DTvdriftWorkflow,cls).get_local_input_db_options_parser(),
254  super(DTvdriftWorkflow,cls).get_write_options_parser(),
255  super(DTvdriftWorkflow,cls).get_dump_options_parser()
256  ],
257  help = "Perform all steps: submit, check, write, dump in this order")
258  vdrift_segment_all_parser.add_argument("--inputTtrigDB",
259  help="Local alternative calib ttrig db")
260 
263  vdrift_meantimer_subparsers = vdrift_meantimer_subparser.add_subparsers( dest="command",
264  help="Possible commands for meantimers")
265  vdrift_meantimer_submit_parser = vdrift_meantimer_subparsers.add_parser(
266  "submit",
267  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
268  super(DTvdriftWorkflow,cls).get_submission_options_parser(),
269  super(DTvdriftWorkflow,cls).get_local_input_db_options_parser(),
270  super(DTvdriftWorkflow,cls).get_input_db_options_parser()],
271  help = "Submit job to the GRID via crab3")
272  vdrift_meantimer_submit_parser.add_argument("--inputTtrigDB",
273  help="Local alternative calib ttrig db")
274 
275  vdrift_meantimer_check_parser = vdrift_meantimer_subparsers.add_parser(
276  "check",
277  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
278  super(DTvdriftWorkflow,cls).get_check_options_parser()],
279  help = "Check status of submitted jobs")
280 
281  vdrift_meantimer_write_parser = vdrift_meantimer_subparsers.add_parser(
282  "write",
283  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
284  super(DTvdriftWorkflow,cls).get_write_options_parser()
285  ],
286  help = "Write result from root output to text file")
287 
288  vdrift_meantimer_dump_parser = vdrift_meantimer_subparsers.add_parser(
289  "dump",
290  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
291  super(DTvdriftWorkflow,cls).get_dump_options_parser()],
292  help = "Dump database to text file")
293 
294  vdrift_meantimer_all_parser = vdrift_meantimer_subparsers.add_parser(
295  "all",
296  parents=[super(DTvdriftWorkflow,cls).get_common_options_parser(),
297  super(DTvdriftWorkflow,cls).get_submission_options_parser(),
298  super(DTvdriftWorkflow,cls).get_check_options_parser(),
299  super(DTvdriftWorkflow,cls).get_input_db_options_parser(),
300  super(DTvdriftWorkflow,cls).get_local_input_db_options_parser(),
301  super(DTvdriftWorkflow,cls).get_write_options_parser(),
302  super(DTvdriftWorkflow,cls).get_dump_options_parser()
303  ],
304  help = "Perform all steps: submit, check, write, dump in this order")
305  vdrift_meantimer_all_parser.add_argument("--inputTtrigDB",
306  help="Local alternative calib ttrig db")
307 

◆ prepare_meantimer_all()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_all (   self)

Definition at line 187 of file DTVdriftWorkflow.py.

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

187  def prepare_meantimer_all(self):
188  # individual prepare functions for all tasks will be called in
189  # main implementation of all
190  self.all_commands=["submit", "check", "write", "dump"]
191 

◆ prepare_meantimer_check()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_check (   self)

Definition at line 148 of file DTVdriftWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

148  def prepare_meantimer_check(self):
149  self.load_options_command("submit")
150 

◆ prepare_meantimer_dump()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_dump (   self)

Definition at line 168 of file DTVdriftWorkflow.py.

References CrabHelper.CrabHelper.crab_config_filepath(), CrabHelper.CrabHelper.crabFunctions, DTWorkflow.DTWorkflow.load_options_command(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTWorkflow.DTWorkflow.prepare_common_dump(), DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTVdriftWorkflow.DTvdriftWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTVdriftWorkflow.DTvdriftWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

168  def prepare_meantimer_dump(self):
169  self.pset_name = 'dumpDBToFile_vdrift_cfg.py'
170  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_vdrift_cfg'
171  if self.options.input_dumpDB:
172  try:
173  test = self.result_path
174  self.load_options_command("write")
175  except:
176  pass
177  dbpath = os.path.abspath(self.options.input_dumpDB)
178  else:
179  crabtask = self.crabFunctions.CrabTask(crab_config = self.crab_config_filepath,
180  initUpdate = False)
181  tag = crabtask.crabConfig.Data.outputDatasetTag
182  dbpath = os.path.abspath( os.path.join(self.result_path,
183  "vDrift_meantimer" + tag + ".db"))
184  self.prepare_common_dump(dbpath)
185  self.write_pset_file()
186 

◆ prepare_meantimer_submit()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit (   self)

Mean Timer #.

Definition at line 118 of file DTVdriftWorkflow.py.

References DTWorkflow.DTWorkflow.addPoolDBESSource(), mps_setup.append, DTWorkflow.DTWorkflow.input_files, tools.loadCmsProcess(), DTWorkflow.DTWorkflow.options, DTCalibrationWorker.DTCalibrationWorker.options, DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTVdriftWorkflow.DTvdriftWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_submit(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTVdriftWorkflow.DTvdriftWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTVdriftWorkflow.DTvdriftWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

118  def prepare_meantimer_submit(self):
119  self.pset_name = 'dtVDriftMeanTimerCalibration_cfg.py'
120  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cfg'
121  if self.options.datasettype == "Cosmics":
122  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cosmics_cfg'
123 
124  self.process = tools.loadCmsProcess(self.pset_template)
125  self.process.GlobalTag.globaltag = self.options.globaltag
126  self.process.dtVDriftMeanTimerCalibration.rootFileName = self.output_file
127 
128  if self.options.inputCalibDB:
129  err = "Option inputCalibDB not available for meantimer."
130  err += "Maybe you want to use option inputTtrigDB"
131  raise ValueError(err)
132  self.prepare_common_submit()
133  if self.options.inputTtrigDB:
134  label = ''
135  if self.options.datasettype == "Cosmics":
136  label = 'cosmics'
137  connect = os.path.basename(self.options.inputTtrigDB)
138  self.addPoolDBESSource( process = self.process,
139  moduleName = 'tTrigDB',
140  record = 'DTTtrigRcd',
141  tag = 'ttrig',
142  connect = str("sqlite_file:%s" % connect),
143  label = label
144  )
145  self.input_files.append( os.path.abspath(self.options.inputTtrigDB) )
146  self.write_pset_file()
147 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_meantimer_write()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write (   self)

Definition at line 151 of file DTVdriftWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_vdrift_db(), tools.loadCmsProcess(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTVdriftWorkflow.DTvdriftWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_write(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTVdriftWorkflow.DTvdriftWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTVdriftWorkflow.DTvdriftWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

151  def prepare_meantimer_write(self):
152  self.pset_name = 'dtVDriftMeanTimerWriter_cfg.py'
153  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftMeanTimerWriter_cfg'
154  tag = self.prepare_common_write()
155  merged_file = os.path.join(self.result_path, self.output_file)
156  self.process = tools.loadCmsProcess(self.pset_template)
157 
158  if self.options.inputVDriftDB:
159  self.add_local_vdrift_db(self)
160  vdrift_db = "vDrift_meantimer" + tag + ".db"
161  vdrift_db = os.path.join(self.result_path, vdrift_db)
162  self.process.dtVDriftMeanTimerWriter.vDriftAlgoConfig.rootFileName = "file:///" + merged_file
163  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % vdrift_db
164  self.process.source.firstRun = cms.untracked.uint32(self.options.run)
165  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
166  self.write_pset_file()
167 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_segment_all()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_all (   self)

Definition at line 110 of file DTVdriftWorkflow.py.

110  def prepare_segment_all(self):
111  # individual prepare functions for all tasks will be called in
112  # main implementation of all
113  self.all_commands=["submit", "check", "write", "dump"]
114 

◆ prepare_segment_check()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_check (   self)

Definition at line 71 of file DTVdriftWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

71  def prepare_segment_check(self):
72  self.load_options_command("submit")
73 

◆ prepare_segment_dump()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_dump (   self)

Definition at line 91 of file DTVdriftWorkflow.py.

References CrabHelper.CrabHelper.crab_config_filepath(), CrabHelper.CrabHelper.crabFunctions, DTWorkflow.DTWorkflow.load_options_command(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTWorkflow.DTWorkflow.prepare_common_dump(), DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTVdriftWorkflow.DTvdriftWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTVdriftWorkflow.DTvdriftWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

91  def prepare_segment_dump(self):
92  self.pset_name = 'dumpDBToFile_vdrift_cfg.py'
93  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_vdrift_cfg'
94  if self.options.input_dumpDB:
95  try:
96  test = self.result_path
97  self.load_options_command("write")
98  except:
99  pass
100  dbpath = os.path.abspath(self.options.input_dumpDB)
101  else:
102  crabtask = self.crabFunctions.CrabTask(crab_config = self.crab_config_filepath,
103  initUpdate = False)
104  tag = crabtask.crabConfig.Data.outputDatasetTag
105  dbpath = os.path.abspath( os.path.join(self.result_path,
106  "vDrift_segment"+ tag + ".db"))
107  self.prepare_common_dump(dbpath)
108  self.write_pset_file()
109 

◆ prepare_segment_submit()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_submit (   self)

Definition at line 41 of file DTVdriftWorkflow.py.

41  def prepare_segment_submit(self):
42  self.pset_name = 'dtVDriftSegmentCalibration_cfg.py'
43  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftSegmentCalibration_cfg'
44  if self.options.datasettype == "Cosmics":
45  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftSegmentCalibration_cosmics_cfg'
46 
47  self.process = tools.loadCmsProcess(self.pset_template)
48  self.process.GlobalTag.globaltag = self.options.globaltag
49  self.process.dtVDriftSegmentCalibration.rootFileName = self.output_file
50 
51  if self.options.inputCalibDB:
52  err = "Option inputCalibDB not available for segment."
53  err += "Maybe you want to use option inputTtrigDB"
54  raise ValueError(err)
55  self.prepare_common_submit()
56  if self.options.inputTtrigDB:
57  label = ''
58  if self.options.datasettype == "Cosmics":
59  label = 'cosmics'
60  connect = os.path.basename(self.options.inputTtrigDB)
61  self.addPoolDBESSource( process = self.process,
62  moduleName = 'tTrigDB',
63  record = 'DTTtrigRcd',
64  tag = 'ttrig',
65  connect = str("sqlite_file:%s" % connect),
66  label = label
67  )
68  self.input_files.append( os.path.abspath(self.options.inputTtrigDB) )
69  self.write_pset_file()
70 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_segment_write()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write (   self)

Definition at line 74 of file DTVdriftWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_vdrift_db(), tools.loadCmsProcess(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTVdriftWorkflow.DTvdriftWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_write(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTVdriftWorkflow.DTvdriftWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTVdriftWorkflow.DTvdriftWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

74  def prepare_segment_write(self):
75  self.pset_name = 'dtVDriftSegmentWriter_cfg.py'
76  self.pset_template = 'CalibMuon.DTCalibration.dtVDriftSegmentWriter_cfg'
77  tag = self.prepare_common_write()
78  merged_file = os.path.join(self.result_path, self.output_file)
79  self.process = tools.loadCmsProcess(self.pset_template)
80 
81  if self.options.inputVDriftDB:
82  self.add_local_vdrift_db(self)
83  vdrift_db = "vDrift_segment"+ tag + ".db"
84  vdrift_db = os.path.join(self.result_path, vdrift_db)
85  self.process.dtVDriftSegmentWriter.vDriftAlgoConfig.rootFileName = "file:///" + merged_file
86  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % vdrift_db
87  self.process.source.firstRun = cms.untracked.uint32(self.options.run)
88  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
89  self.write_pset_file()
90 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_workflow()

def DTVdriftWorkflow.DTvdriftWorkflow.prepare_workflow (   self)
Generalized function to prepare workflow dependent on workflow mode

Definition at line 27 of file DTVdriftWorkflow.py.

References __class__< T >.__class__(), DTCalibrationWorker.DTCalibrationWorker.options, and DTWorkflow.DTWorkflow.options.

Referenced by DTWorkflow.DTWorkflow.run().

27  def prepare_workflow(self):
28  """ Generalized function to prepare workflow dependent on workflow mode"""
29  function_name = "prepare_" + self.options.workflow_mode + "_" + self.options.command
30 
31  try:
32  fill_function = getattr(self, function_name)
33  except AttributeError:
34  errmsg = "Class `{}` does not implement `{}`"
35  raise NotImplementedError( errmsg.format(self.__class__.__name__,
36  function_name))
37  log.debug("Preparing workflow with function %s" % function_name)
38  # call chosen function
39  fill_function()
40 

Member Data Documentation

◆ all_commands

DTVdriftWorkflow.DTvdriftWorkflow.all_commands

◆ outpath_command_tag

DTVdriftWorkflow.DTvdriftWorkflow.outpath_command_tag

◆ outpath_workflow_mode_dict

DTVdriftWorkflow.DTvdriftWorkflow.outpath_workflow_mode_dict

Definition at line 21 of file DTVdriftWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.outpath_workflow_mode_tag().

◆ output_file

◆ output_files

DTVdriftWorkflow.DTvdriftWorkflow.output_files

Definition at line 25 of file DTVdriftWorkflow.py.

◆ process

DTVdriftWorkflow.DTvdriftWorkflow.process

Definition at line 47 of file DTVdriftWorkflow.py.

Referenced by adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.__init__(), 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.addCommon(), ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addMaxEvents(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addSource(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.build_production_info(), ConfigBuilder.ConfigBuilder.completeInputCommand(), adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput(), ConfigBuilder.ConfigBuilder.finalizeFastSimHLT(), ConfigBuilder.ConfigBuilder.load(), runTauIdMVA.TauIDEmbedder.load_againstElectronMVA6(), ConfigBuilder.ConfigBuilder.loadAndRemember(), runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017(), ConfigBuilder.ConfigBuilder.loadPhase2GTMenu(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), 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(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), runTauIdMVA.TauIDEmbedder.processDeepProducer(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), runTauIdMVA.TauIDEmbedder.runTauID(), ConfigBuilder.ConfigBuilder.scheduleSequence(), runTauIdMVA.TauIDEmbedder.tauIDMVAinputs(), and DTWorkflow.DTWorkflow.write_pset_file().

◆ pset_name

◆ pset_template