1 """! running hadd from in hps-mc jobs"""
12 """! Run ROOT's histogram/TTree merger
15 - **inputs**: input ROOT files to merge
16 - **outputs**: *single* output file to merge into
18 - **ncores**: number of cores to supply to hadd (default 1)
21 logger = logging.getLogger(
'hpsmc.tools.hadd')
26 super().
__init__(
'hadd', command=
'hadd', **kwargs)
33 if self.
ncoresncores
is not None:
34 a += [
'-j', self.
ncoresncores]
35 if len(self.
outputsoutputs) != 1:
36 raise ValueError(
'hadd makes no sense without exactly one output')
38 if self.
inputsinputs
is None or len(self.
inputsinputs) == 0:
39 raise ValueError(
'hadd makes no sense without at least one input')
Run ROOT's histogram/TTree merger.
def optional_parameters(self)
Return a list of optional parameters.
def __init__(self, **kwargs)
def cmd_args(self)
Return the command arguments of this component.
Base class for components in a job.