2
# Author: Christopher Tunnell <tunnell@hep.uchicago.edu>
7
from src.region import *
8
from datetime import datetime
10
# This processes everything
12
def __init__(self, workers):
13
print 'Welcome to TUCS (pid %d). Building detector tree... ' % os.getpid(),
14
startup = datetime.today()
16
self.detector = constructTileCal()
19
print 'Entering worker loop:'
22
for worker in workers:
24
print 'Running %s - %s' % (worker.__class__.__name__, worker.__class__.__doc__)
26
self.detector = worker.HandleDetector(self.detector)
28
if not isinstance(self.detector, Region):
29
print "The following worker returned non-sense:", worker
33
for region in self.detector.RegionGenerator():
34
region.SetEvents(set())
35
region.SetChildren(set())
39
print 'TUCS finished in:', datetime.today() - startup