CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
Merge Namespace Reference

Functions

def mergeProcess
 

Function Documentation

def Merge.mergeProcess (   inputFiles,
  options 
)
_mergeProcess_

Creates and returns a merge process that will merge the provided
filenames

supported options:

- process_name : name of the process, defaults to Merge
- outputmod_label : label of the output module, defaults to Merged
- newDQMIO : specifies if the new DQM format should be used to merge the files
- output_file : sets the output file name
- output_lfn : sets the output LFN
- bypassVersionCheck : to bypass version check in case merging happened in lower version of CMSSW (i.e. UL HLT case). This will be TRUE by default.

Definition at line 16 of file Merge.py.

References popcon_last_value_cfg.Source.

Referenced by Scenario.Scenario.merge().

16 
17 def mergeProcess(*inputFiles, **options):
18  """
19  _mergeProcess_
20 
21  Creates and returns a merge process that will merge the provided
22  filenames
23 
24  supported options:
25 
26  - process_name : name of the process, defaults to Merge
27  - outputmod_label : label of the output module, defaults to Merged
28  - newDQMIO : specifies if the new DQM format should be used to merge the files
29  - output_file : sets the output file name
30  - output_lfn : sets the output LFN
31  - bypassVersionCheck : to bypass version check in case merging happened in lower version of CMSSW (i.e. UL HLT case). This will be TRUE by default.
32 
33  """
34  # //
35  # // process supported options
36  #//
37  processName = options.get("process_name", "Merge")
38  outputModLabel = options.get("outputmod_label", "Merged")
39  outputFilename = options.get("output_file", "Merged.root")
40  outputLFN = options.get("output_lfn", None)
41  dropDQM = options.get("drop_dqm", False)
42  newDQMIO = options.get("newDQMIO", False)
43  bypassVersionCheck = options.get("bypassVersionCheck", True)
44 
45  # //
46  # // build process
47  #//
48  process = Process(processName)
49 
50  # //
51  # // input source
52  #//
53  if newDQMIO:
54  process.source = Source("DQMRootSource")
55  process.add_(Service("DQMStore"))
56  else:
57  process.source = Source("PoolSource")
58  process.source.bypassVersionCheck = CfgTypes.untracked.bool(bypassVersionCheck)
59  if dropDQM:
60  process.source.inputCommands = CfgTypes.untracked.vstring('keep *','drop *_EDMtoMEConverter_*_*')
61  process.source.fileNames = CfgTypes.untracked(CfgTypes.vstring())
62  for entry in inputFiles:
63  process.source.fileNames.append(str(entry))
64 
65  # //
66  # // output module
67  #//
68  if newDQMIO:
69  outMod = OutputModule("DQMRootOutputModule")
70  else:
71  outMod = OutputModule("PoolOutputModule")
72 
73  outMod.fileName = CfgTypes.untracked.string(outputFilename)
74  if outputLFN != None:
75  outMod.logicalFileName = CfgTypes.untracked.string(outputLFN)
76  setattr(process, outputModLabel, outMod)
77 
78  process.outputPath = EndPath(outMod)
79 
80  return process
def mergeProcess
Definition: Merge.py:16