~vpec/maus/tof_calib_read

« back to all changes in this revision

Viewing changes to workers/LoadTree.py

  • Committer: tunnell
  • Date: 2010-09-20 10:52:02 UTC
  • Revision ID: tunnell@itchy-20100920105202-ce4w9jm59zvgnsxq
moving stuff from tucs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from src.GenericWorker import *
 
2
import cPickle as pickle
 
3
 
 
4
class LoadTree(GenericWorker):
 
5
    "Load tree"
 
6
 
 
7
    def __init__(self, filename='/tmp/dump.p'):
 
8
        self.filename = filename
 
9
 
 
10
    def HandleDetector(self, detector):
 
11
        del detector
 
12
        detector = pickle.load(open(self.filename, 'rb'))
 
13
        return detector
 
14