elaird/supy — pull request #105 by davidegerbaudo (2012-05-23 19:55:26+00:00)
Title: Sampleholder add tuple

I often get confused when passing all the arguments of
SampleHolder.add
as a string that's then evaluated.
This change allows to pass in filesCommand=(function, dictOfParameters)

I tested with eos, and it works; if you agree with this change, we should also define in 'sites' a function returning a dict with default parameters (see supy.sites.eosPars).
Example usage:

exampleDict.add("sampleName",
(supy.utils.fileListFromEos,
dict(supy.sites.eosPars().items()
+{'location':"/eos/atlas/blah"
}.items())),
lumi = 1.0)
One bit that I don't like (but I couldn't come up with a better solution)
is to concatenate the dict of the default parameters with the ones in the analysis file:

dict( dict1.items() + dict2.items() )

Thanks,

davide