Go to the documentation of this file.00001
00002 globalTag = {
00003 'FULL': 'auto:startup',
00004 'GRun': 'auto:startup',
00005 'data': 'auto:hltonline',
00006 'HIon': 'auto:starthi',
00007 }
00008
00009
00010
00011 class ConnectionL1TMenu(object):
00012 def __init__(self, value):
00013 self.override = None
00014 self.connect = None
00015
00016
00017 if value:
00018 if ':' in value:
00019 self.override = 'L1GtTriggerMenu_%s_mc' % value.rsplit(':', 1)[1]
00020 self.connect = value.rsplit(':', 1)[0]
00021 else:
00022 self.override = 'L1GtTriggerMenu_%s_mc' % value
00023 self.connect = None
00024
00025
00026
00027 class ConnectionHLTMenu(object):
00028 def __init__(self, value):
00029 self.value = value
00030 self.db = None
00031 self.name = None
00032 self.run = None
00033
00034
00035 if value:
00036 if ':' in self.value:
00037 (db, name) = self.value.split(':')
00038 if db == 'run':
00039 self.run = name
00040 elif db in ('hltdev', 'orcoff'):
00041 self.db = db
00042 self.name = name
00043 else:
00044 raise Exception('Unknown ConfDB database "%s", valid values are "hltdev" (default) and "orcoff")' % db)
00045 else:
00046 self.db = 'hltdev'
00047 self.name = self.value
00048
00049
00050
00051 class HLTProcessOptions(object):
00052 def __init__(self):
00053 self.menu = None
00054 self.name = None
00055 self.type = 'GRun'
00056 self.data = True
00057 self.online = False
00058 self.globaltag = None
00059 self.l1 = None
00060 self.unprescale = False
00061 self.open = False
00062 self.timing = False
00063 self.output = 'all'
00064 self.fragment = False
00065 self.fastsim = False
00066
00067
00068
00069 def __setattr__(self, name, value):
00070 if name is 'menu' and type(value) is not ConnectionHLTMenu:
00071
00072 object.__setattr__(self, name, ConnectionHLTMenu(value))
00073 elif name is 'l1' and type(value) is not ConnectionL1TMenu:
00074
00075 object.__setattr__(self, name, ConnectionL1TMenu(value))
00076 elif name is 'fastsim' and value:
00077
00078 object.__setattr__(self, 'fastsim', True)
00079 object.__setattr__(self, 'fragment', True)
00080 object.__setattr__(self, 'data', False)
00081 elif name is 'open' and value:
00082
00083 object.__setattr__(self, 'open', True)
00084 object.__setattr__(self, 'unprescale', True)
00085 elif name is 'timing' and value:
00086
00087 object.__setattr__(self, 'timing', True)
00088 object.__setattr__(self, 'output', 'none')
00089 else:
00090 object.__setattr__(self, name, value)