#!/usr/bin/env python # encoding: utf-8 """ FileCollections.py Created by Morten Dam Jørgensen on 2011-11-06. Copyright (c) 2011 . All rights reserved. """ import sys import os from ROOT import * import re import Plotting color = Plotting.new_color() # new color iterator class HistCollection(object): """Collection of histograms""" def __init__(self, hist_array = []): super(HistCollection, self).__init__() self.hist_array = hist_array def merge(self, i=0, j=None): """docstring for merge""" if not j: j = len(self.hist_array)-1 tmpHist = self.hist_array[i].th.Clone("new_%s" % self.hist_array[i].th.GetName()) for h in self.hist_array[i+1:j]: