def __init__(self, *args):
     super(Rebin, self).__init__(*args)
     bins = fetch_list(self.main_settings, "bins")
     if bins == ["None"]:
         raise self.BadInputError(
             "Rebin needs the key 'bins' in main_settings."
         )
     self.bins = array("d", [float(f) for f in bins])
    def __init__(self, *args):

        # some checking...
        samples = getattr(self, "samples", 1)
        if type(samples) != str:
            raise self.BadInputError(
                "An input needs to declare 'samples' as a string."
            )
        all_samples = fetch_list(self.main_settings, self.samples)

        histos = getattr(self, "histos", 1)
        if type(histos) != str:
            raise self.BadInputError(
                "An input needs to declare 'histos' as a string."
            )
        histos = fetch_list(self.main_settings, self.histos)

        self.histos = []
        for sample in all_samples:
            input = Input([sample], histos)
            self.histos.append(input)

        super(SampleSumInput, self).__init__()