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 procee, defaults to Merge
- output_file  : sets the output file name
- output_lfn   : sets the output LFN

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 procee, defaults to Merge
27  - output_file : sets the output file name
28  - output_lfn : sets the output LFN
29 
30  """
31  # //
32  # // process supported options
33  #//
34  processName = options.get("process_name", "Merge")
35  outputFilename = options.get("output_file", "Merged.root")
36  outputLFN = options.get("output_lfn", None)
37 
38  # //
39  # // build process
40  #//
41  process = Process(processName)
42 
43  # //
44  # // input source
45  #//
46  process.source = Source("PoolSource")
47  process.source.fileNames = CfgTypes.untracked(CfgTypes.vstring())
48  for entry in inputFiles:
49  process.source.fileNames.append(str(entry))
50 
51  # //
52  # // output module
53  #//
54  process.Merged = OutputModule("PoolOutputModule")
55  process.Merged.fileName = CfgTypes.untracked(CfgTypes.string(
56  outputFilename))
57 
58  if outputLFN != None:
59  process.Merged.logicalFileName = CfgTypes.untracked(CfgTypes.string(
60  outputLFN))
61 
62 
63  process.outputPath = EndPath(process.Merged)
64  return process
def mergeProcess
Definition: Merge.py:16