~i-taylor/maus/map-base

« back to all changes in this revision

Viewing changes to src/reduce/ReducePyTOFPlot/ReducePyTOFPlot.py

  • Committer: Ian Taylor
  • Date: 2013-08-12 12:52:07 UTC
  • mfrom: (663.8.7 release)
  • Revision ID: i.taylor@warwick.ac.uk-20130812125207-0ybrhlzc1p1ujbhx
Merging with V 0.6.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
# Disable messages about too many branches and too many lines.
24
24
#pylint: disable = R0912
25
25
#pylint: disable = R0915
26
 
 
27
26
import ROOT
28
27
from ReducePyROOTHistogram import ReducePyROOTHistogram
29
28
 
156
155
        """
157
156
        # Read in configuration flags and parameters - these will
158
157
        # overwrite whatever defaults were set in __init__.
159
 
        if 'refresh_rate' in config_doc:
160
 
            self.refresh_rate = int(config_doc["refresh_rate"])
 
158
        if 'reduce_plot_refresh_rate' in config_doc:
 
159
            self.refresh_rate = int(config_doc["reduce_plot_refresh_rate"])
161
160
        # Initialize histograms, setup root canvases, and set root
162
161
        # styles.
163
162
        self.__init_histos()
164
163
        self.run_ended = False
165
164
        return True
166
165
 
 
166
 
167
167
    def _update_histograms(self, spill):
168
168
        """
169
169
        Process a spill, get slab hits via get_slab_hits get space
186
186
                self.run_ended = True
187
187
                return self.get_histogram_images()
188
188
            else:
189
 
                return [{}]
190
 
        # elif spill["daq_event_type"] != "physics_event":
191
 
        #    return spill
 
189
                return []
192
190
 
193
191
        # do not try to get data from start/end spill markers
194
192
        data_spill = True
210
208
            self.update_histos()
211
209
            return self.get_histogram_images()
212
210
        else:
213
 
            return [spill]
 
211
            return []
214
212
 
215
213
    def get_slab_hits(self, spill):
216
214
        """