def __init__(self, interval=1): '''Counts events and prints updates at specified interval, just like the C++ RAT processor.''' Processor.__init__(self) self.count = 0 self.triggers = 0 self.interval = interval
def __init__(self, selector, xbin, xmin, xmax, title=None, interval=10, wait=False): '''Creates and draws a histogram as the RAT job progresses.''' Processor.__init__(self) self.selector = selector if title is None: title = selector self.count = 0 self.interval = interval self.canvas = ROOT.TCanvas('c'+ROOT.TUUID().AsString(), self.selector, 800, 600) self.hist = ROOT.TH1D('', title, xbin, xmin, xmax) self.hist.Draw() self.canvas.Update() self.wait = wait
def __init__(self, selector, xbin, xmin, xmax, title=None, interval=10, wait=False): '''Creates and draws a histogram as the RAT job progresses.''' Processor.__init__(self) self.selector = selector if title is None: title = selector self.count = 0 self.interval = interval self.canvas = ROOT.TCanvas('c' + ROOT.TUUID().AsString(), self.selector, 800, 600) self.hist = ROOT.TH1D('', title, xbin, xmin, xmax) self.hist.Draw() self.canvas.Update() self.wait = wait
def __init__(self): # Calculates the time since the last event in ns. Processor.__init__(self) self.t0 = ROOT.TTimeStamp() self.first = True